Home
last modified time | relevance | path

Searched refs:ipv4 (Results 1 – 25 of 419) sorted by relevance

12345678910>>...17

/linux-6.15/tools/testing/selftests/net/packetdrill/
H A Ddefaults.sh14 sysctl -q net.ipv4.tcp_timestamps=1
17 sysctl -q net.ipv4.tcp_syn_retries=5
18 sysctl -q net.ipv4.tcp_synack_retries=5
21 sysctl -q net.ipv4.tcp_frto=2
24 sysctl -q net.ipv4.tcp_sack=1
27 sysctl -q net.ipv4.tcp_dsack=1
30 sysctl -q net.ipv4.tcp_fack=0
33 sysctl -q net.ipv4.tcp_reordering=3
42 sysctl -q net.ipv4.tcp_early_retrans=4 net.ipv4.tcp_recovery=1
48 sysctl -q net.ipv4.tcp_ecn=0
[all …]
/linux-6.15/net/ipv4/
H A Dsysctl_net_ipv4.c60 net->ipv4.ip_local_ports.warned = true; in set_local_port_range()
105 ipv4.sysctl_ip_prot_sock); in ipv4_privileged_ports()
206 ipv4.sysctl_ip_fwd_update_priority); in ipv4_fwd_update_priority()
219 ipv4.tcp_congestion_control); in proc_tcp_congestion_control()
292 ipv4.sysctl_tcp_fastopen); in proc_tcp_fastopen_key()
726 .data = &init_net.ipv4.sysctl_tcp_ecn,
937 .data = &init_net.ipv4.sysctl_igmp_qrv,
1169 .data = &init_net.ipv4.sysctl_tcp_sack,
1248 .data = &init_net.ipv4.sysctl_tcp_fack,
1287 .data = &init_net.ipv4.sysctl_tcp_frto,
[all …]
H A Dtcp_plb.c30 if (!READ_ONCE(net->ipv4.sysctl_tcp_plb_enabled)) in tcp_plb_update_state()
34 if (cong_ratio < READ_ONCE(net->ipv4.sysctl_tcp_plb_cong_thresh)) in tcp_plb_update_state()
37 READ_ONCE(net->ipv4.sysctl_tcp_plb_rehash_rounds)) in tcp_plb_update_state()
52 if (!READ_ONCE(net->ipv4.sysctl_tcp_plb_enabled)) in tcp_plb_check_rehash()
56 READ_ONCE(net->ipv4.sysctl_tcp_plb_rehash_rounds); in tcp_plb_check_rehash()
58 idle_rehash = READ_ONCE(net->ipv4.sysctl_tcp_plb_idle_rehash_rounds) && in tcp_plb_check_rehash()
61 READ_ONCE(net->ipv4.sysctl_tcp_plb_idle_rehash_rounds); in tcp_plb_check_rehash()
71 max_suspend = 2 * READ_ONCE(net->ipv4.sysctl_tcp_plb_suspend_rto_sec) * HZ; in tcp_plb_check_rehash()
96 if (!READ_ONCE(net->ipv4.sysctl_tcp_plb_enabled)) in tcp_plb_update_state_upon_rto()
99 pause = READ_ONCE(net->ipv4.sysctl_tcp_plb_suspend_rto_sec) * HZ; in tcp_plb_update_state_upon_rto()
H A Dfib_notifier.c26 WRITE_ONCE(net->ipv4.fib_seq, net->ipv4.fib_seq + 1); in call_fib4_notifiers()
33 return READ_ONCE(net->ipv4.fib_seq) + fib4_rules_seq_read(net); in fib4_seq_read()
59 net->ipv4.fib_seq = 0; in fib4_notifier_init()
64 net->ipv4.notifier_ops = ops; in fib4_notifier_init()
71 fib_notifier_ops_unregister(net->ipv4.notifier_ops); in fib4_notifier_exit()
H A Dtcp_ipv4.c3450 net->ipv4.sysctl_tcp_ecn = 2;
3465 net->ipv4.sysctl_tcp_syncookies = 1;
3472 net->ipv4.sysctl_tcp_tw_reuse = 2;
3479 net->ipv4.sysctl_tcp_sack = 1;
3481 net->ipv4.sysctl_tcp_timestamps = 1;
3487 net->ipv4.sysctl_tcp_dsack = 1;
3488 net->ipv4.sysctl_tcp_app_win = 31;
3490 net->ipv4.sysctl_tcp_frto = 2;
3511 memcpy(net->ipv4.sysctl_tcp_rmem,
3514 memcpy(net->ipv4.sysctl_tcp_wmem,
[all …]
/linux-6.15/tools/testing/selftests/bpf/progs/
H A Dtest_tcp_custom_syncookie.c89 if (ctx->ipv4->ihl != sizeof(*ctx->ipv4) / 4) in tcp_load_headers()
143 if (ctx->ipv4) { in tcp_reload_headers()
163 return csum_tcpudp_magic(ctx->ipv4->saddr, ctx->ipv4->daddr, in tcp_v4_csum()
184 if (ctx->ipv4) { in tcp_validate_header()
328 first = (u64)ctx->ipv4->saddr << 32 | ctx->ipv4->daddr; in tcp_prepare_cookie()
429 swap(ctx->ipv4->saddr, ctx->ipv4->daddr); in tcp_handle_syn()
470 if (ctx->ipv4) in tcp_validate_cookie()
471 first = (u64)ctx->ipv4->saddr << 32 | ctx->ipv4->daddr; in tcp_validate_cookie()
489 if (ctx->ipv4) in tcp_validate_cookie()
514 tuple.ipv4.saddr = ctx->ipv4->saddr; in tcp_handle_ack()
[all …]
H A Dtest_sk_assign.c55 get_tuple(struct __sk_buff *skb, bool *ipv4, bool *tcp) in get_tuple() argument
78 *ipv4 = true; in get_tuple()
87 *ipv4 = false; in get_tuple()
110 tuple_len = ipv4 ? sizeof(tuple->ipv4) : sizeof(tuple->ipv6); in handle_udp()
118 dport = ipv4 ? tuple->ipv4.dport : tuple->ipv6.dport; in handle_udp()
141 tuple_len = ipv4 ? sizeof(tuple->ipv4) : sizeof(tuple->ipv6); in handle_tcp()
152 dport = ipv4 ? tuple->ipv4.dport : tuple->ipv6.dport; in handle_tcp()
175 bool ipv4 = false; in bpf_sk_assign_test() local
179 tuple = get_tuple(skb, &ipv4, &tcp); in bpf_sk_assign_test()
189 ret = handle_tcp(skb, tuple, ipv4); in bpf_sk_assign_test()
[all …]
H A Dxdp_synproxy_kern.c389 if (hdr->ipv4->ihl * 4 < sizeof(*hdr->ipv4)) in tcp_dissect()
397 hdr->tcp = (void *)hdr->ipv4 + hdr->ipv4->ihl * 4; in tcp_dissect()
440 if (hdr->ipv4) { in tcp_lookup()
447 tup.ipv4.saddr = hdr->ipv4->saddr; in tcp_lookup()
448 tup.ipv4.daddr = hdr->ipv4->daddr; in tcp_lookup()
546 swap(hdr->ipv4->saddr, hdr->ipv4->daddr); in tcpv4_gen_synack()
630 if (csum_tcpudp_magic(hdr->ipv4->saddr, hdr->ipv4->daddr, in syncookie_handle_syn()
671 if (hdr->ipv4->ihl * 4 > sizeof(*hdr->ipv4)) { in syncookie_handle_syn()
678 hdr->ipv4->ihl = sizeof(*hdr->ipv4) / 4; in syncookie_handle_syn()
738 if (hdr->ipv4) in syncookie_handle_ack()
[all …]
H A Dtest_bpf_nf.c100 __builtin_memset(&bpf_tuple, 0, sizeof(bpf_tuple.ipv4)); in nf_ct_test()
166 bpf_tuple.ipv4.saddr = bpf_get_prandom_u32(); /* src IP */ in nf_ct_test()
167 bpf_tuple.ipv4.daddr = bpf_get_prandom_u32(); /* dst IP */ in nf_ct_test()
168 bpf_tuple.ipv4.sport = bpf_get_prandom_u32(); /* src port */ in nf_ct_test()
226 bpf_tuple.ipv4.saddr = saddr; in nf_ct_test()
227 bpf_tuple.ipv4.daddr = daddr; in nf_ct_test()
228 bpf_tuple.ipv4.sport = sport; in nf_ct_test()
229 bpf_tuple.ipv4.dport = dport; in nf_ct_test()
255 __builtin_memset(&bpf_tuple, 0, sizeof(bpf_tuple.ipv4)); in nf_ct_opts_new_test()
266 bpf_tuple.ipv4.saddr = bpf_get_prandom_u32(); /* src IP */ in nf_ct_opts_new_test()
[all …]
H A Dtest_cls_redirect.c218 struct iphdr *ipv4 = buf_assign(pkt, sizeof(*ipv4), scratch); in pkt_parse_ipv4() local
219 if (ipv4 == NULL) { in pkt_parse_ipv4()
223 if (ipv4->ihl < 5) { in pkt_parse_ipv4()
231 return ipv4; in pkt_parse_ipv4()
627 tuple->ipv4.daddr = ipv4->daddr; in fill_tuple()
628 tuple->ipv4.saddr = ipv4->saddr; in fill_tuple()
743 if (ipv4 == NULL) { in process_icmpv4()
753 tuple.ipv4.saddr = ipv4->daddr; in process_icmpv4()
754 tuple.ipv4.daddr = ipv4->saddr; in process_icmpv4()
883 return process_tcp(pkt, ipv4, sizeof(*ipv4), metrics); in process_ipv4()
[all …]
H A Dconnect4_prog.c155 memset(&tuple.ipv4.saddr, 0, sizeof(tuple.ipv4.saddr)); in connect_v4_prog()
156 memset(&tuple.ipv4.sport, 0, sizeof(tuple.ipv4.sport)); in connect_v4_prog()
158 tuple.ipv4.daddr = bpf_htonl(DST_REWRITE_IP4); in connect_v4_prog()
159 tuple.ipv4.dport = bpf_htons(DST_REWRITE_PORT4); in connect_v4_prog()
174 sk = bpf_sk_lookup_tcp(ctx, &tuple, sizeof(tuple.ipv4), in connect_v4_prog()
177 sk = bpf_sk_lookup_udp(ctx, &tuple, sizeof(tuple.ipv4), in connect_v4_prog()
183 if (sk->src_ip4 != tuple.ipv4.daddr || in connect_v4_prog()
H A Dtest_bpf_nf_fail.c35 ct = bpf_skb_ct_alloc(ctx, &tup, sizeof(tup.ipv4), &opts, sizeof(opts)); in alloc_release()
49 ct = bpf_skb_ct_alloc(ctx, &tup, sizeof(tup.ipv4), &opts, sizeof(opts)); in insert_insert()
66 ct = bpf_skb_ct_lookup(ctx, &tup, sizeof(tup.ipv4), &opts, sizeof(opts)); in lookup_insert()
80 ct = bpf_skb_ct_lookup(ctx, &tup, sizeof(tup.ipv4), &opts, sizeof(opts)); in write_not_allowlisted_field()
94 ct = bpf_skb_ct_alloc(ctx, &tup, sizeof(tup.ipv4), &opts, sizeof(opts)); in set_timeout_after_insert()
111 ct = bpf_skb_ct_alloc(ctx, &tup, sizeof(tup.ipv4), &opts, sizeof(opts)); in set_status_after_insert()
128 ct = bpf_skb_ct_alloc(ctx, &tup, sizeof(tup.ipv4), &opts, sizeof(opts)); in change_timeout_after_alloc()
142 ct = bpf_skb_ct_alloc(ctx, &tup, sizeof(tup.ipv4), &opts, sizeof(opts)); in change_status_after_alloc()
/linux-6.15/drivers/infiniband/hw/irdma/
H A Dtrace_cm.h15 #define __print_ip_addr(addr, port, ipv4) print_ip_addr(p, addr, port, ipv4) argument
26 __field(bool, ipv4)
30 __entry->ipv4 = cm_info->ipv4;
48 __field(bool, ipv4)
53 __entry->ipv4 = listener->ipv4;
71 __field(bool, ipv4)
79 __entry->ipv4 = listener->ipv4;
159 __entry->ipv4 = listener->ipv4;
227 __entry->ipv4 = cm_node->ipv4;
302 __entry->ipv4 = cm_node->ipv4;
[all …]
/linux-6.15/drivers/net/ethernet/airoha/
H A Dairoha_ppe_debugfs.c90 src_port = &hwe->ipv4.orig_tuple.src_port; in airoha_ppe_debugfs_foe_show()
94 src_addr = &hwe->ipv4.orig_tuple.src_ip; in airoha_ppe_debugfs_foe_show()
95 dest_addr = &hwe->ipv4.orig_tuple.dest_ip; in airoha_ppe_debugfs_foe_show()
120 src_port = &hwe->ipv4.new_tuple.src_port; in airoha_ppe_debugfs_foe_show()
121 dest_port = &hwe->ipv4.new_tuple.dest_port; in airoha_ppe_debugfs_foe_show()
124 src_addr = &hwe->ipv4.new_tuple.src_ip; in airoha_ppe_debugfs_foe_show()
125 dest_addr = &hwe->ipv4.new_tuple.dest_ip; in airoha_ppe_debugfs_foe_show()
140 data = hwe->ipv4.data; in airoha_ppe_debugfs_foe_show()
141 ib2 = hwe->ipv4.ib2; in airoha_ppe_debugfs_foe_show()
142 l2 = &hwe->ipv4.l2.common; in airoha_ppe_debugfs_foe_show()
[all …]
/linux-6.15/tools/testing/selftests/net/netfilter/packetdrill/
H A Dcommon.sh13 sysctl -q net.ipv4.tcp_rmem="4096 540000 $((15*1024*1024))"
14 sysctl -q net.ipv4.tcp_wmem="4096 $((256*1024)) 4194304"
17 sysctl -q net.ipv4.tcp_congestion_control=cubic
20 sysctl -q net.ipv4.tcp_slow_start_after_idle=0
23 sysctl -q net.ipv4.tcp_ecn=0
25 sysctl -q net.ipv4.tcp_notsent_lowat=4294967295 > /dev/null 2>&1
/linux-6.15/tools/testing/selftests/net/netfilter/
H A Dipvs.sh124 ip netns exec "${ns1}" sysctl -qw net.ipv4.ip_forward=1
130 ip netns exec "${ns2}" sysctl -qw net.ipv4.conf.all.arp_ignore=1
131 ip netns exec "${ns2}" sysctl -qw net.ipv4.conf.all.arp_announce=2
133 ip netns exec "${ns2}" sysctl -qw net.ipv4.conf.all.rp_filter=0
143 ip netns exec "${ns1}" sysctl -qw net.ipv4.ip_forward=1
159 ip netns exec "${ns1}" sysctl -qw net.ipv4.ip_forward=0
168 ip netns exec "${ns2}" sysctl -qw net.ipv4.conf.all.arp_ignore=1
169 ip netns exec "${ns2}" sysctl -qw net.ipv4.conf.all.arp_announce=2
170 ip netns exec "${ns2}" sysctl -qw net.ipv4.conf.all.rp_filter=0
171 ip netns exec "${ns2}" sysctl -qw net.ipv4.conf.tunl0.rp_filter=0
[all …]
H A Dbridge_brouter.sh25 ip netns exec "$nsbr" sysctl -q net.ipv4.conf.default.rp_filter=0
26 ip netns exec "$nsbr" sysctl -q net.ipv4.conf.all.rp_filter=0
56 …if ! ip netns exec "$nsbr" ebtables -t broute -A BROUTING -p ipv4 --ip-protocol icmp -j redirect -…
61 ip netns exec "$nsbr" sysctl -q net.ipv4.conf.veth0.forwarding=0
73 ip netns exec "$nsbr" sysctl -q net.ipv4.conf.veth0.forwarding=1
74 ip netns exec "$nsbr" sysctl -q net.ipv4.conf.veth1.forwarding=1
90 ip netns exec "$nsbr" ebtables -t filter -A FORWARD -p ipv4 --ip-protocol icmp -j DROP
99 …ip netns exec "$nsbr" ebtables -t broute -A BROUTING -p ipv4 --ip-protocol icmp -j redirect --redi…
/linux-6.15/tools/testing/selftests/net/forwarding/
H A Dgre_custom_multipath_hash.sh381 sysctl_set net.ipv4.neigh.default.gc_thresh1 1024
382 sysctl_set net.ipv4.neigh.default.gc_thresh2 1024
383 sysctl_set net.ipv4.neigh.default.gc_thresh3 1024
385 sysctl_set net.ipv4.fib_multipath_hash_fields 0x0040
389 sysctl_set net.ipv4.fib_multipath_hash_fields 0x0080
393 sysctl_set net.ipv4.fib_multipath_hash_fields 0x0400
401 sysctl_restore net.ipv4.neigh.default.gc_thresh3
402 sysctl_restore net.ipv4.neigh.default.gc_thresh2
403 sysctl_restore net.ipv4.neigh.default.gc_thresh1
450 sysctl_set net.ipv4.fib_multipath_hash_policy 3
[all …]
H A Drouter_broadcast.sh146 sysctl_set net.ipv4.conf.all.bc_forwarding 0
147 sysctl_set net.ipv4.conf.$rp1.bc_forwarding 0
148 sysctl_set net.ipv4.conf.$rp2.bc_forwarding 0
153 sysctl_set net.ipv4.conf.all.bc_forwarding 1
154 sysctl_set net.ipv4.conf.$rp1.bc_forwarding 1
155 sysctl_set net.ipv4.conf.$rp2.bc_forwarding 1
160 sysctl_restore net.ipv4.conf.$rp2.bc_forwarding
161 sysctl_restore net.ipv4.conf.$rp1.bc_forwarding
162 sysctl_restore net.ipv4.conf.all.bc_forwarding
183 sysctl_set net.ipv4.icmp_echo_ignore_broadcasts 0
[all …]
H A Dcustom_multipath_hash.sh284 sysctl_set net.ipv4.fib_multipath_hash_policy 3
288 sysctl_set net.ipv4.neigh.default.gc_thresh1 1024
289 sysctl_set net.ipv4.neigh.default.gc_thresh2 1024
290 sysctl_set net.ipv4.neigh.default.gc_thresh3 1024
292 sysctl_set net.ipv4.fib_multipath_hash_fields 0x0001
296 sysctl_set net.ipv4.fib_multipath_hash_fields 0x0002
300 sysctl_set net.ipv4.fib_multipath_hash_fields 0x0010
308 sysctl_restore net.ipv4.neigh.default.gc_thresh3
309 sysctl_restore net.ipv4.neigh.default.gc_thresh2
310 sysctl_restore net.ipv4.neigh.default.gc_thresh1
[all …]
/linux-6.15/drivers/net/ethernet/mediatek/
H A Dmtk_ppe_debugfs.c110 ai.src_port = &entry->ipv4.orig.src_port; in mtk_ppe_debugfs_foe_show()
111 ai.dest_port = &entry->ipv4.orig.dest_port; in mtk_ppe_debugfs_foe_show()
114 ai.src = &entry->ipv4.orig.src_ip; in mtk_ppe_debugfs_foe_show()
115 ai.dest = &entry->ipv4.orig.dest_ip; in mtk_ppe_debugfs_foe_show()
135 ai.src_port = &entry->ipv4.new.src_port; in mtk_ppe_debugfs_foe_show()
136 ai.dest_port = &entry->ipv4.new.dest_port; in mtk_ppe_debugfs_foe_show()
139 ai.src = &entry->ipv4.new.src_ip; in mtk_ppe_debugfs_foe_show()
140 ai.dest = &entry->ipv4.new.dest_ip; in mtk_ppe_debugfs_foe_show()
150 l2 = &entry->ipv4.l2; in mtk_ppe_debugfs_foe_show()
151 ib2 = entry->ipv4.ib2; in mtk_ppe_debugfs_foe_show()
/linux-6.15/drivers/net/wireless/intel/iwlwifi/
H A Diwl-utils.c24 bool ipv4 = (skb->protocol == htons(ETH_P_IP)); in iwl_tx_tso_segment() local
26 u16 ip_base_id = ipv4 ? ntohs(ip_hdr(skb)->id) : 0; in iwl_tx_tso_segment()
33 skb_shinfo(skb)->gso_type = ipv4 ? SKB_GSO_TCPV4 : SKB_GSO_TCPV6; in iwl_tx_tso_segment()
57 if (ipv4) in iwl_tx_tso_segment()
62 skb_shinfo(tmp)->gso_type = ipv4 ? SKB_GSO_TCPV4 : in iwl_tx_tso_segment()
68 if (ipv4) in iwl_tx_tso_segment()
/linux-6.15/drivers/infiniband/hw/usnic/
H A Dusnic_fwd.h115 filter->u.ipv4.flags = FILTER_FIELD_5TUP_PROTO; in usnic_fwd_init_udp_filter()
116 filter->u.ipv4.protocol = PROTO_UDP; in usnic_fwd_init_udp_filter()
119 filter->u.ipv4.flags |= FILTER_FIELD_5TUP_DST_AD; in usnic_fwd_init_udp_filter()
120 filter->u.ipv4.dst_addr = daddr; in usnic_fwd_init_udp_filter()
124 filter->u.ipv4.flags |= FILTER_FIELD_5TUP_DST_PT; in usnic_fwd_init_udp_filter()
125 filter->u.ipv4.dst_port = dport; in usnic_fwd_init_udp_filter()
/linux-6.15/drivers/net/ethernet/mellanox/mlx5/core/en/tc/
H A Dct_fs_smfs.c57 if (likely(ipv4)) { in mlx5_ct_fs_smfs_fill_mask()
59 src_ipv4_src_ipv6.ipv4_layout.ipv4); in mlx5_ct_fs_smfs_fill_mask()
61 dst_ipv4_dst_ipv6.ipv4_layout.ipv4); in mlx5_ct_fs_smfs_fill_mask()
89 mlx5_ct_fs_smfs_matcher_create(struct mlx5_ct_fs *fs, struct mlx5dr_table *tbl, bool ipv4, in mlx5_ct_fs_smfs_matcher_create() argument
99 mlx5_ct_fs_smfs_fill_mask(fs, spec, ipv4, tcp, gre); in mlx5_ct_fs_smfs_matcher_create()
122 smfs_matcher = &matchers->smfs_matchers[ipv4 * 3 + tcp * 2 + gre]; in mlx5_ct_fs_smfs_matcher_get()
148 dr_matcher = mlx5_ct_fs_smfs_matcher_create(fs, tbl, ipv4, tcp, gre, prio); in mlx5_ct_fs_smfs_matcher_get()
152 nat, ipv4, tcp, gre, PTR_ERR(dr_matcher)); in mlx5_ct_fs_smfs_matcher_get()
232 bool nat, tcp, ipv4, gre; in mlx5_ct_fs_smfs_ct_rule_add() local
252 ipv4 = mlx5e_tc_get_ip_version(spec, true) == 4; in mlx5_ct_fs_smfs_ct_rule_add()
[all …]
/linux-6.15/samples/bpf/
H A Dtc_l2_redirect.sh10 RP_FILTER=$(< /proc/sys/net/ipv4/conf/all/rp_filter)
49 $IP netns exec ns2 sysctl -q -w net.ipv4.conf.all.rp_filter=0
54 $IP netns exec ns2 sysctl -q -w net.ipv4.conf.all.rp_filter=0
66 sysctl -q -w net.ipv4.conf.all.rp_filter=0
80 sysctl -q -w net.ipv4.conf.all.rp_filter=$RP_FILTER
97 sysctl -q -w net.ipv4.conf.ipt.rp_filter=0
98 sysctl -q -w net.ipv4.conf.ipt.forwarding=1
103 sysctl -q -w net.ipv4.conf.ve1.forwarding=1
133 sysctl -q -w net.ipv4.conf.ip6t.rp_filter=0
134 sysctl -q -w net.ipv4.conf.ip6t.forwarding=1
[all …]

12345678910>>...17