Home
last modified time | relevance | path

Searched refs:ip_proto (Results 1 – 25 of 95) sorted by relevance

1234

/Linux-v5.10/samples/bpf/
Dsockex2_kern.c26 __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 …]
Dsockex3_kern.c74 __u32 ip_proto; member
142 struct globals *g, __u32 ip_proto) in parse_ip_proto() argument
147 switch (ip_proto) { in parse_ip_proto()
184 g->flow.ip_proto = ip_proto; in parse_ip_proto()
195 __u32 nhoff, verlen, ip_proto; in PROG() local
205 ip_proto = load_byte(skb, nhoff + offsetof(struct iphdr, protocol)); in PROG()
207 if (ip_proto != IPPROTO_GRE) { in PROG()
216 parse_ip_proto(skb, g, ip_proto); in PROG()
223 __u32 nhoff, ip_proto; in PROG() local
230 ip_proto = load_byte(skb, in PROG()
[all …]
Dxdp_redirect_cpu_kern.c330 u8 ip_proto = IPPROTO_UDP; in xdp_prognum3_proto_separate() local
351 ip_proto = get_proto_ipv4(ctx, l3_offset); in xdp_prognum3_proto_separate()
354 ip_proto = get_proto_ipv6(ctx, l3_offset); in xdp_prognum3_proto_separate()
364 switch (ip_proto) { in xdp_prognum3_proto_separate()
398 u8 ip_proto = IPPROTO_UDP; in xdp_prognum4_ddos_filter_pktgen() local
420 ip_proto = get_proto_ipv4(ctx, l3_offset); in xdp_prognum4_ddos_filter_pktgen()
423 ip_proto = get_proto_ipv6(ctx, l3_offset); in xdp_prognum4_ddos_filter_pktgen()
433 switch (ip_proto) { in xdp_prognum4_ddos_filter_pktgen()
518 u8 ip_proto = IPPROTO_UDP; in xdp_prognum5_lb_hash_ip_pairs() local
/Linux-v5.10/include/linux/
Dvirtio_net.h35 unsigned int ip_proto; in virtio_net_hdr_to_skb() local
41 ip_proto = IPPROTO_TCP; in virtio_net_hdr_to_skb()
46 ip_proto = IPPROTO_TCP; in virtio_net_hdr_to_skb()
51 ip_proto = IPPROTO_UDP; in virtio_net_hdr_to_skb()
99 keys.basic.ip_proto != ip_proto) in virtio_net_hdr_to_skb()
/Linux-v5.10/net/ipv4/
Dnetlink.c10 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-v5.10/drivers/net/ethernet/intel/ice/
Dice_arfs.c305 u8 ip_proto; in ice_arfs_build_entry() local
317 ip_proto = fk->basic.ip_proto; in ice_arfs_build_entry()
320 fltr_info->ip.v4.proto = ip_proto; in ice_arfs_build_entry()
321 fltr_info->flow_type = (ip_proto == IPPROTO_TCP) ? in ice_arfs_build_entry()
329 fltr_info->ip.v6.proto = ip_proto; in ice_arfs_build_entry()
330 fltr_info->flow_type = (ip_proto == IPPROTO_TCP) ? in ice_arfs_build_entry()
405 u8 ip_proto; in ice_rx_flow_steer() local
425 ip_proto = fk.basic.ip_proto; in ice_rx_flow_steer()
430 if (ip_proto != IPPROTO_TCP && ip_proto != IPPROTO_UDP) in ice_rx_flow_steer()
434 if (!ice_arfs_is_perfect_flow_set(&pf->hw, n_proto, ip_proto)) in ice_rx_flow_steer()
/Linux-v5.10/tools/testing/selftests/bpf/prog_tests/
Dflow_dissector.c35 got.ip_proto, expected.ip_proto, \
123 .ip_proto = IPPROTO_TCP,
143 .ip_proto = IPPROTO_TCP,
165 .ip_proto = IPPROTO_TCP,
188 .ip_proto = IPPROTO_TCP,
211 .ip_proto = IPPROTO_TCP,
236 .ip_proto = IPPROTO_TCP,
259 .ip_proto = IPPROTO_TCP,
284 .ip_proto = IPPROTO_TCP,
305 .ip_proto = IPPROTO_TCP,
[all …]
/Linux-v5.10/tools/testing/selftests/net/forwarding/
Dtc_police.sh129 dst_ip 198.51.100.1 ip_proto udp dst_port 54321 \
155 dst_ip 198.51.100.1 ip_proto udp dst_port 54321 \
167 dst_ip 198.51.100.1 ip_proto udp dst_port 54321 \
204 dst_ip 198.51.100.1 ip_proto udp src_port 12345 \
209 dst_ip 198.51.100.1 ip_proto udp dst_port 54321 \
216 dst_ip 198.51.100.1 ip_proto udp dst_port 22222 \
238 dst_ip 198.51.100.1 ip_proto udp dst_port 54321 \
243 dst_ip 198.51.100.1 ip_proto udp dst_port 54321 \
248 dst_ip 198.51.100.1 ip_proto udp dst_port 54321 \
Drouter_multicast.sh324 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
/Linux-v5.10/tools/testing/selftests/drivers/net/mlxsw/
Done_armed_router.sh135 skip_hw dst_ip 198.51.100.1 ip_proto udp dst_port 52768 \
139 skip_hw dst_ip 198.51.100.1 ip_proto udp dst_port 52768 \
143 skip_sw dst_ip 198.51.100.1 ip_proto udp dst_port 52768 \
178 skip_hw dst_ip 2001:db8:2::1 ip_proto udp dst_port 52768 \
182 skip_hw dst_ip 2001:db8:2::1 ip_proto udp dst_port 52768 \
186 skip_sw dst_ip 2001:db8:2::1 ip_proto udp dst_port 52768 \
Ddevlink_trap_l3_exceptions.sh183 flower skip_hw ip_proto icmp type 3 code 4 action pass
221 flower skip_hw ip_proto icmp type 11 code 0 action pass
281 flower dst_ip $dst_ip ip_proto udp action drop
316 local ip_proto=$1; shift
331 skip_hw ip_proto $ip_proto type $type code $code action pass
/Linux-v5.10/drivers/net/ethernet/qlogic/qede/
Dqede_filter.c29 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()
1352 if (fltr->tuple.ip_proto == IPPROTO_TCP) in qede_get_cls_rule_entry()
[all …]
/Linux-v5.10/drivers/net/ethernet/mellanox/mlxsw/
Dspectrum_flower.c310 u8 ip_proto) in mlxsw_sp_flower_parse_ports() argument
318 if (ip_proto != IPPROTO_TCP && ip_proto != IPPROTO_UDP) { in mlxsw_sp_flower_parse_ports()
337 u8 ip_proto) in mlxsw_sp_flower_parse_tcp() argument
345 if (ip_proto != IPPROTO_TCP) { in mlxsw_sp_flower_parse_tcp()
408 u8 ip_proto = 0; in mlxsw_sp_flower_parse() local
455 ip_proto = match.key->ip_proto; in mlxsw_sp_flower_parse()
458 match.key->ip_proto, in mlxsw_sp_flower_parse()
459 match.mask->ip_proto); in mlxsw_sp_flower_parse()
516 err = mlxsw_sp_flower_parse_ports(mlxsw_sp, rulei, f, ip_proto); in mlxsw_sp_flower_parse()
519 err = mlxsw_sp_flower_parse_tcp(mlxsw_sp, rulei, f, ip_proto); in mlxsw_sp_flower_parse()
/Linux-v5.10/drivers/net/ethernet/mellanox/mlx5/core/
Den_arfs.c41 u8 ip_proto; member
422 u8 ip_proto, __be16 etype) in arfs_get_table() argument
424 if (etype == htons(ETH_P_IP) && ip_proto == IPPROTO_TCP) in arfs_get_table()
426 if (etype == htons(ETH_P_IP) && ip_proto == IPPROTO_UDP) in arfs_get_table()
428 if (etype == htons(ETH_P_IPV6) && ip_proto == IPPROTO_TCP) in arfs_get_table()
430 if (etype == htons(ETH_P_IPV6) && ip_proto == IPPROTO_UDP) in arfs_get_table()
459 arfs_table = arfs_get_table(arfs, tuple->ip_proto, tuple->etype); in arfs_add_rule()
466 if (tuple->ip_proto == IPPROTO_TCP) { in arfs_add_rule()
525 tuple->ip_proto, err); in arfs_add_rule()
598 tuple->ip_proto = fk->basic.ip_proto; in arfs_alloc_rule()
[all …]
/Linux-v5.10/drivers/net/ethernet/sfc/falcon/
Dfilter.h139 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()
Dethtool.c811 (spec.ip_proto == IPPROTO_TCP || spec.ip_proto == IPPROTO_UDP) && in ef4_ethtool_get_class_rule()
817 rule->flow_type = ((spec.ip_proto == IPPROTO_TCP) ? in ef4_ethtool_get_class_rule()
838 (spec.ip_proto == IPPROTO_TCP || spec.ip_proto == IPPROTO_UDP) && in ef4_ethtool_get_class_rule()
844 rule->flow_type = ((spec.ip_proto == IPPROTO_TCP) ? in ef4_ethtool_get_class_rule()
896 uip_entry->proto = spec.ip_proto; in ef4_ethtool_get_class_rule()
915 uip6_entry->l4_proto = spec.ip_proto; in ef4_ethtool_get_class_rule()
1060 spec.ip_proto = ((rule->flow_type & ~FLOW_EXT) == TCP_V4_FLOW ? in ef4_ethtool_set_class_rule()
1095 spec.ip_proto = ((rule->flow_type & ~FLOW_EXT) == TCP_V6_FLOW ? in ef4_ethtool_set_class_rule()
1147 spec.ip_proto = uip_entry->proto; in ef4_ethtool_set_class_rule()
1172 spec.ip_proto = uip6_entry->l4_proto; in ef4_ethtool_set_class_rule()
/Linux-v5.10/net/core/
Dflow_dissector.c115 __be32 __skb_flow_get_ports(const struct sk_buff *skb, int thoff, u8 ip_proto, in __skb_flow_get_ports() argument
118 int poff = proto_ports_offset(ip_proto); in __skb_flow_get_ports()
717 u8 ip_proto, int hlen) in __skb_flow_dissect_ports() argument
734 key_ports->ports = __skb_flow_get_ports(skb, nhoff, ip_proto, in __skb_flow_dissect_ports()
809 key_basic->ip_proto = flow_keys->ip_proto; in __skb_flow_bpf_to_target()
919 u8 ip_proto = 0; in __skb_flow_dissect() local
1040 ip_proto = iph->protocol; in __skb_flow_dissect()
1084 ip_proto = iph->nexthdr; in __skb_flow_dissect()
1278 switch (ip_proto) { in __skb_flow_dissect()
1300 ip_proto = opthdr[0]; in __skb_flow_dissect()
[all …]
/Linux-v5.10/drivers/net/ethernet/sfc/
Dfilter.h165 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()
Dethtool_common.c679 (spec.ip_proto == IPPROTO_TCP || spec.ip_proto == IPPROTO_UDP) && in efx_ethtool_get_class_rule()
685 rule->flow_type = ((spec.ip_proto == IPPROTO_TCP) ? in efx_ethtool_get_class_rule()
706 (spec.ip_proto == IPPROTO_TCP || spec.ip_proto == IPPROTO_UDP) && in efx_ethtool_get_class_rule()
712 rule->flow_type = ((spec.ip_proto == IPPROTO_TCP) ? in efx_ethtool_get_class_rule()
764 uip_entry->proto = spec.ip_proto; in efx_ethtool_get_class_rule()
783 uip6_entry->l4_proto = spec.ip_proto; in efx_ethtool_get_class_rule()
973 spec.ip_proto = flow_type == TCP_V4_FLOW ? IPPROTO_TCP in efx_ethtool_set_class_rule()
1008 spec.ip_proto = flow_type == TCP_V6_FLOW ? IPPROTO_TCP in efx_ethtool_set_class_rule()
1060 spec.ip_proto = uip_entry->proto; in efx_ethtool_set_class_rule()
1085 spec.ip_proto = uip6_entry->l4_proto; in efx_ethtool_set_class_rule()
/Linux-v5.10/drivers/net/ethernet/cisco/enic/
Denic_clsf.c26 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-v5.10/tools/testing/selftests/bpf/
Dtest_flow_dissector.sh108 tc filter add dev lo parent ffff: protocol ip pref 1337 flower ip_proto \
144 tc filter add dev lo parent ffff: protocol ip pref 1337 flower ip_proto \
158 tc filter add dev lo parent ffff: protocol ipv6 pref 1337 flower ip_proto \
/Linux-v5.10/drivers/net/ethernet/netronome/nfp/flower/
Daction.c763 static u32 nfp_fl_csum_l4_to_flag(u8 ip_proto) in nfp_fl_csum_l4_to_flag() argument
765 switch (ip_proto) { in nfp_fl_csum_l4_to_flag()
797 u8 ip_proto = 0; in nfp_fl_commit_mangle() local
803 ip_proto = match.key->ip_proto; in nfp_fl_commit_mangle()
820 nfp_fl_csum_l4_to_flag(ip_proto); in nfp_fl_commit_mangle()
831 nfp_fl_csum_l4_to_flag(ip_proto); in nfp_fl_commit_mangle()
841 *csum_updated |= nfp_fl_csum_l4_to_flag(ip_proto); in nfp_fl_commit_mangle()
860 *csum_updated |= nfp_fl_csum_l4_to_flag(ip_proto); in nfp_fl_commit_mangle()
868 *csum_updated |= nfp_fl_csum_l4_to_flag(ip_proto); in nfp_fl_commit_mangle()
876 *csum_updated |= nfp_fl_csum_l4_to_flag(ip_proto); in nfp_fl_commit_mangle()
[all …]
/Linux-v5.10/drivers/net/ethernet/mellanox/mlx5/core/en/
Dtc_tun_gre.c28 __u8 *ip_proto, in mlx5e_gen_ip_tunnel_header_gretap() argument
36 *ip_proto = IPPROTO_GRE; in mlx5e_gen_ip_tunnel_header_gretap()
Dtc_tun_mplsoudp.c29 __u8 *ip_proto, in generate_ip_tun_hdr() argument
39 *ip_proto = IPPROTO_UDP; in generate_ip_tun_hdr()
Dtc_tun_vxlan.c83 __u8 *ip_proto, in mlx5e_gen_ip_tunnel_header_vxlan() argument
92 *ip_proto = IPPROTO_UDP; in mlx5e_gen_ip_tunnel_header_vxlan()

1234