/linux/tools/testing/selftests/net/forwarding/ |
H A D | tc_flower_port_range.sh | 78 local ip_proto=$1; shift 95 flower src_ip $sip dst_ip $dip ip_proto $ip_proto \ 100 flower src_ip $sip dst_ip $dip ip_proto $ip_proto \ 106 -t $ip_proto "sp=$sport_min,dp=$dport_min" 113 -t $ip_proto "sp=$sport_mid,dp=$dport_mid" 120 -t $ip_proto "sp=$sport_max,dp=$dport_max" 129 -t $ip_proto "sp=$((sport_min - 1)),dp=$dport_min" 131 -t $ip_proto "sp=$((sport_max + 1)),dp=$dport_min" 133 -t $ip_proto "sp=$sport_min,dp=$((dport_min - 1))" 135 -t $ip_proto "sp=$sport_min,dp=$((dport_max + 1))" [all …]
|
H A D | tc_police.sh | 133 dst_ip 198.51.100.1 ip_proto udp dst_port 54321 \ 159 dst_ip 198.51.100.1 ip_proto udp dst_port 54321 \ 171 dst_ip 198.51.100.1 ip_proto udp dst_port 54321 \ 208 dst_ip 198.51.100.1 ip_proto udp src_port 12345 \ 213 dst_ip 198.51.100.1 ip_proto udp dst_port 54321 \ 220 dst_ip 198.51.100.1 ip_proto udp dst_port 22222 \ 242 dst_ip 198.51.100.1 ip_proto udp dst_port 54321 \ 247 dst_ip 198.51.100.1 ip_proto udp dst_port 54321 \ 252 dst_ip 198.51.100.1 ip_proto udp dst_port 54321 \ 305 dst_ip 198.51.100.1 ip_proto udp dst_port 54321 \ [all …]
|
H A D | router_multicast.sh | 324 dst_ip 225.1.2.3 ip_proto udp dst_port 12345 action drop 326 dst_ip 225.1.2.3 ip_proto udp dst_port 12345 action drop 328 dst_ip 225.1.2.3 ip_proto udp dst_port 12345 action drop 330 skip_hw dst_ip 225.1.2.3 ip_proto udp dst_port 12345 action pass 369 dst_ip ff0e::3 ip_proto udp dst_port 12345 action drop 371 dst_ip ff0e::3 ip_proto udp dst_port 12345 action drop 373 dst_ip ff0e::3 ip_proto udp dst_port 12345 action drop 375 skip_hw dst_ip ff0e::3 ip_proto udp dst_port 12345 action pass 420 dst_ip 225.1.2.3 ip_proto udp dst_port 12345 action drop 422 dst_ip 225.1.2.3 ip_proto udp dst_port 12345 action drop [all …]
|
/linux/samples/bpf/ |
H A D | sockex2_kern.c | 26 __u8 ip_proto; member 62 static inline __u64 parse_ip(struct __sk_buff *skb, __u64 nhoff, __u64 *ip_proto, in parse_ip() argument 68 *ip_proto = 0; in parse_ip() 70 *ip_proto = load_byte(skb, nhoff + offsetof(struct iphdr, protocol)); in parse_ip() 72 if (*ip_proto != IPPROTO_GRE) { in parse_ip() 86 static inline __u64 parse_ipv6(struct __sk_buff *skb, __u64 nhoff, __u64 *ip_proto, in parse_ipv6() argument 89 *ip_proto = load_byte(skb, in parse_ipv6() 104 __u64 ip_proto; in flow_dissector() local 121 nhoff = parse_ip(skb, nhoff, &ip_proto, flow); in flow_dissector() 123 nhoff = parse_ipv6(skb, nhoff, &ip_proto, flow); in flow_dissector() [all …]
|
H A D | sockex3_kern.c | 37 __u32 ip_proto; member 107 struct globals *g, __u32 ip_proto) in parse_ip_proto() argument 112 switch (ip_proto) { in parse_ip_proto() 149 g->flow.ip_proto = ip_proto; in parse_ip_proto() 161 __u32 nhoff, verlen, ip_proto; in bpf_func_ip() local 171 ip_proto = load_byte(skb, nhoff + offsetof(struct iphdr, protocol)); in bpf_func_ip() 173 if (ip_proto != IPPROTO_GRE) { in bpf_func_ip() 182 parse_ip_proto(skb, g, ip_proto); in bpf_func_ip() 190 __u32 nhoff, ip_proto; in bpf_func_ipv6() local 197 ip_proto = load_byte(skb, in bpf_func_ipv6() [all …]
|
/linux/tools/testing/selftests/net/netfilter/ |
H A D | nft_tproxy_tcp.sh | 135 local ip_proto="$2" 142 local testname="test_${ip_proto}_tcp_${traffic_origin}" 153 case $ip_proto in 190 $nftables_subject tproxy $ip_proto to :12345 meta mark set 1 accept 204 $nftables_subject tproxy $ip_proto to :12345 meta mark set 1 accept 280 local ip_proto="ip" 287 "$ip_proto" \ 297 local ip_proto="ip" 304 "$ip_proto" \ 314 local ip_proto="ip6" [all …]
|
H A D | nft_tproxy_udp.sh | 134 local ip_proto="$1" 142 local testname="test_${ip_proto}_udp_forward" 153 case $ip_proto in 188 $ip_proto daddr $ns2_ip udp dport 8080 tproxy $ip_proto to :12345 meta mark set 1 accept
|
/linux/include/linux/ |
H A D | virtio_net.h | 58 unsigned int ip_proto; in virtio_net_hdr_to_skb() local 64 ip_proto = IPPROTO_TCP; in virtio_net_hdr_to_skb() 69 ip_proto = IPPROTO_TCP; in virtio_net_hdr_to_skb() 75 ip_proto = IPPROTO_UDP; in virtio_net_hdr_to_skb() 80 ip_proto = IPPROTO_UDP; in virtio_net_hdr_to_skb() 145 keys.basic.ip_proto != ip_proto) in virtio_net_hdr_to_skb()
|
/linux/drivers/net/ethernet/intel/ice/ |
H A D | ice_arfs.c | 306 u8 ip_proto; in ice_arfs_build_entry() local 318 ip_proto = fk->basic.ip_proto; in ice_arfs_build_entry() 321 fltr_info->ip.v4.proto = ip_proto; in ice_arfs_build_entry() 322 fltr_info->flow_type = (ip_proto == IPPROTO_TCP) ? in ice_arfs_build_entry() 330 fltr_info->ip.v6.proto = ip_proto; in ice_arfs_build_entry() 331 fltr_info->flow_type = (ip_proto == IPPROTO_TCP) ? in ice_arfs_build_entry() 406 u8 ip_proto; in ice_rx_flow_steer() local 426 ip_proto = fk.basic.ip_proto; in ice_rx_flow_steer() 431 if (ip_proto != IPPROTO_TCP && ip_proto != IPPROTO_UDP) in ice_rx_flow_steer() 435 if (!ice_arfs_is_perfect_flow_set(&pf->hw, n_proto, ip_proto)) in ice_rx_flow_steer()
|
/linux/tools/testing/selftests/bpf/prog_tests/ |
H A D | flow_dissector.c | 37 got.ip_proto, expected.ip_proto, \ 126 .ip_proto = IPPROTO_TCP, 147 .ip_proto = IPPROTO_TCP, 170 .ip_proto = IPPROTO_TCP, 194 .ip_proto = IPPROTO_TCP, 218 .ip_proto = IPPROTO_TCP, 244 .ip_proto = IPPROTO_TCP, 268 .ip_proto = IPPROTO_TCP, 294 .ip_proto = IPPROTO_TCP, 316 .ip_proto = IPPROTO_TCP, [all …]
|
/linux/net/ipv4/ |
H A D | netlink.c | 10 int rtm_getroute_parse_ip_proto(struct nlattr *attr, u8 *ip_proto, u8 family, in rtm_getroute_parse_ip_proto() argument 13 *ip_proto = nla_get_u8(attr); in rtm_getroute_parse_ip_proto() 15 switch (*ip_proto) { in rtm_getroute_parse_ip_proto()
|
/linux/drivers/net/ethernet/mellanox/mlx5/core/en/tc/ |
H A D | ct_fs_smfs.c | 264 if (basic.key->ip_proto != IPPROTO_GRE) in mlx5_ct_fs_smfs_ct_validate_flow_rule() 266 if (basic.key->ip_proto == IPPROTO_TCP) in mlx5_ct_fs_smfs_ct_validate_flow_rule() 271 basic.mask->ip_proto != 0xFF || in mlx5_ct_fs_smfs_ct_validate_flow_rule() 272 (basic.key->ip_proto != IPPROTO_UDP && basic.key->ip_proto != IPPROTO_TCP && in mlx5_ct_fs_smfs_ct_validate_flow_rule() 273 basic.key->ip_proto != IPPROTO_GRE)) { in mlx5_ct_fs_smfs_ct_validate_flow_rule() 276 basic.key->ip_proto, basic.mask->ip_proto); in mlx5_ct_fs_smfs_ct_validate_flow_rule() 280 if (basic.key->ip_proto != IPPROTO_GRE && in mlx5_ct_fs_smfs_ct_validate_flow_rule() 287 if (basic.key->ip_proto == IPPROTO_TCP && tcp.mask->flags != MLX5_CT_TCP_FLAGS_MASK) { in mlx5_ct_fs_smfs_ct_validate_flow_rule()
|
/linux/drivers/net/ethernet/mellanox/mlxsw/ |
H A D | spectrum_flower.c | 407 u8 ip_proto) in mlxsw_sp_flower_parse_ports() argument 415 if (ip_proto != IPPROTO_TCP && ip_proto != IPPROTO_UDP) { in mlxsw_sp_flower_parse_ports() 434 struct flow_cls_offload *f, u8 ip_proto) in mlxsw_sp_flower_parse_ports_range() argument 443 if (ip_proto != IPPROTO_TCP && ip_proto != IPPROTO_UDP) { in mlxsw_sp_flower_parse_ports_range() 496 u8 ip_proto) in mlxsw_sp_flower_parse_tcp() argument 504 if (ip_proto != IPPROTO_TCP) { in mlxsw_sp_flower_parse_tcp() 567 u8 ip_proto = 0; in mlxsw_sp_flower_parse() local 619 ip_proto = match.key->ip_proto; in mlxsw_sp_flower_parse() 622 match.key->ip_proto, in mlxsw_sp_flower_parse() 623 match.mask->ip_proto); in mlxsw_sp_flower_parse() [all …]
|
/linux/tools/testing/selftests/drivers/net/mlxsw/ |
H A D | port_range_occ.sh | 74 flower skip_sw ip_proto udp src_port 1-100 dst_port 1-100 \ 80 flower skip_sw ip_proto tcp src_port 1-100 dst_port 1-100 \ 83 flower skip_sw ip_proto udp src_port 1-100 dst_port 1-100 \ 86 flower skip_sw ip_proto tcp src_port 1-100 dst_port 1-100 \
|
H A D | one_armed_router.sh | 136 skip_hw dst_ip 198.51.100.1 ip_proto udp dst_port 52768 \ 140 skip_hw dst_ip 198.51.100.1 ip_proto udp dst_port 52768 \ 144 skip_sw dst_ip 198.51.100.1 ip_proto udp dst_port 52768 \ 179 skip_hw dst_ip 2001:db8:2::1 ip_proto udp dst_port 52768 \ 183 skip_hw dst_ip 2001:db8:2::1 ip_proto udp dst_port 52768 \ 187 skip_sw dst_ip 2001:db8:2::1 ip_proto udp dst_port 52768 \
|
H A D | rif_mac_profiles.sh | 113 flower skip_sw ip_proto udp src_port 12345 dst_port 54321 \ 119 flower skip_sw src_mac $smac ip_proto udp src_port 12345 \ 148 flower skip_sw ip_proto udp src_port 54321 dst_port 12345 \ 152 flower skip_sw src_mac $rp1_mac ip_proto udp src_port 54321 \
|
/linux/drivers/net/ethernet/marvell/octeontx2/nic/ |
H A D | otx2_tc.c | 632 u8 ip_proto = 0; in otx2_tc_prepare_flow() local 666 if (match.mask->ip_proto && in otx2_tc_prepare_flow() 667 (match.key->ip_proto != IPPROTO_TCP && in otx2_tc_prepare_flow() 668 match.key->ip_proto != IPPROTO_UDP && in otx2_tc_prepare_flow() 669 match.key->ip_proto != IPPROTO_SCTP && in otx2_tc_prepare_flow() 670 match.key->ip_proto != IPPROTO_ICMP && in otx2_tc_prepare_flow() 671 match.key->ip_proto != IPPROTO_ESP && in otx2_tc_prepare_flow() 672 match.key->ip_proto != IPPROTO_AH && in otx2_tc_prepare_flow() 673 match.key->ip_proto != IPPROTO_ICMPV6)) { in otx2_tc_prepare_flow() 676 match.key->ip_proto); in otx2_tc_prepare_flow() [all …]
|
/linux/drivers/net/ethernet/qlogic/qede/ |
H A D | qede_filter.c | 29 u8 ip_proto; member 389 __be16 src_port, __be16 dst_port, u8 ip_proto) in qede_arfs_htbl_key_search() argument 394 if (tpos->tuple.ip_proto == ip_proto && in qede_arfs_htbl_key_search() 440 u8 ip_proto; in qede_rx_flow_steer() local 450 ip_proto = ip_hdr(skb)->protocol; in qede_rx_flow_steer() 453 ip_proto = ipv6_hdr(skb)->nexthdr; in qede_rx_flow_steer() 457 if (ip_proto != IPPROTO_TCP && ip_proto != IPPROTO_UDP) in qede_rx_flow_steer() 466 skb, ports[0], ports[1], ip_proto); in qede_rx_flow_steer() 515 n->tuple.ip_proto = ip_proto; in qede_rx_flow_steer() 1343 if (fltr->tuple.ip_proto == IPPROTO_TCP) in qede_get_cls_rule_entry() [all …]
|
/linux/drivers/net/ethernet/mellanox/mlx5/core/ |
H A D | en_arfs.c | 72 u8 ip_proto; member 499 u8 ip_proto, __be16 etype) in arfs_get_table() argument 501 if (etype == htons(ETH_P_IP) && ip_proto == IPPROTO_TCP) in arfs_get_table() 503 if (etype == htons(ETH_P_IP) && ip_proto == IPPROTO_UDP) in arfs_get_table() 505 if (etype == htons(ETH_P_IPV6) && ip_proto == IPPROTO_TCP) in arfs_get_table() 507 if (etype == htons(ETH_P_IPV6) && ip_proto == IPPROTO_UDP) in arfs_get_table() 537 arfs_table = arfs_get_table(arfs, tuple->ip_proto, tuple->etype); in arfs_add_rule() 540 tuple->etype, tuple->ip_proto); in arfs_add_rule() 546 if (tuple->ip_proto == IPPROTO_TCP) { in arfs_add_rule() 605 tuple->ip_proto, err); in arfs_add_rule() [all …]
|
/linux/drivers/net/ethernet/sfc/ |
H A D | filter.h | 165 u8 ip_proto; member 214 spec->ip_proto = proto; in efx_filter_set_ipv4_local() 235 spec->ip_proto = proto; in efx_filter_set_ipv6_local() 260 spec->ip_proto = proto; in efx_filter_set_ipv4_full()
|
/linux/drivers/net/ethernet/sfc/falcon/ |
H A D | filter.h | 139 u8 ip_proto; member 188 spec->ip_proto = proto; in ef4_filter_set_ipv4_local() 213 spec->ip_proto = proto; in ef4_filter_set_ipv4_full()
|
/linux/drivers/net/ethernet/cisco/enic/ |
H A D | enic_clsf.c | 26 switch (keys->basic.ip_proto) { in enic_addfltr_5t() 165 tpos->keys.basic.ip_proto == k->basic.ip_proto && in htbl_key_search() 183 (keys.basic.ip_proto != IPPROTO_TCP && in enic_rx_flow_steer() 184 keys.basic.ip_proto != IPPROTO_UDP)) in enic_rx_flow_steer()
|
/linux/drivers/net/ethernet/sfc/siena/ |
H A D | filter.h | 165 u8 ip_proto; member 214 spec->ip_proto = proto; in efx_filter_set_ipv4_local() 239 spec->ip_proto = proto; in efx_filter_set_ipv4_full()
|
/linux/tools/testing/selftests/bpf/ |
H A D | test_flow_dissector.sh | 110 tc filter add dev lo parent ffff: protocol ip pref 1337 flower ip_proto \ 154 tc filter add dev lo parent ffff: protocol ip pref 1337 flower ip_proto \ 168 tc filter add dev lo parent ffff: protocol ipv6 pref 1337 flower ip_proto \
|
/linux/net/core/ |
H A D | flow_dissector.c | 119 __be32 __skb_flow_get_ports(const struct sk_buff *skb, int thoff, u8 ip_proto, in __skb_flow_get_ports() argument 122 int poff = proto_ports_offset(ip_proto); in __skb_flow_get_ports() 854 int nhoff, u8 ip_proto, int hlen) in __skb_flow_dissect_ports() argument 871 key_ports->ports = __skb_flow_get_ports(skb, nhoff, ip_proto, in __skb_flow_dissect_ports() 948 key_basic->ip_proto = flow_keys->ip_proto; in __skb_flow_bpf_to_target() 1064 u8 ip_proto = 0; in __skb_flow_dissect() local 1201 ip_proto = iph->protocol; in __skb_flow_dissect() 1247 ip_proto = iph->nexthdr; in __skb_flow_dissect() 1525 switch (ip_proto) { in __skb_flow_dissect() 1552 ip_proto = opthdr[0]; in __skb_flow_dissect() [all …]
|