Home
last modified time | relevance | path

Searched refs:n_proto (Results 1 – 25 of 53) sorted by relevance

123

/openbmc/linux/tools/testing/selftests/bpf/prog_tests/
H A Dflow_dissector.c39 got.n_proto, expected.n_proto, \
128 .n_proto = __bpf_constant_htons(ETH_P_IP),
149 .n_proto = __bpf_constant_htons(ETH_P_IPV6),
172 .n_proto = __bpf_constant_htons(ETH_P_IP),
196 .n_proto = __bpf_constant_htons(ETH_P_IPV6),
220 .n_proto = __bpf_constant_htons(ETH_P_IP),
246 .n_proto = __bpf_constant_htons(ETH_P_IP),
270 .n_proto = __bpf_constant_htons(ETH_P_IPV6),
296 .n_proto = __bpf_constant_htons(ETH_P_IPV6),
318 .n_proto = __bpf_constant_htons(ETH_P_IPV6),
[all …]
/openbmc/linux/Documentation/bpf/
H A Dprog_flow_dissector.rst28 * ``n_proto`` - L3 protocol type, parsed out of L2 header
32 bpf_flow_keys`` fields. Input arguments ``nhoff/thoff/n_proto`` should be
56 flow_keys->n_proto = ETHER_TYPE
73 flow_keys->n_proto = TPID
92 flow_keys->n_proto = ETHER_TYPE
131 * ``_dissect`` routine - entry point; it does input ``n_proto`` parsing and
/openbmc/linux/drivers/net/ethernet/mellanox/mlx5/core/en/
H A Dptp.h81 if (fk.basic.n_proto == htons(ETH_P_1588)) in mlx5e_use_ptpsq()
84 if (fk.basic.n_proto != htons(ETH_P_IP) && in mlx5e_use_ptpsq()
85 fk.basic.n_proto != htons(ETH_P_IPV6)) in mlx5e_use_ptpsq()
H A Dtc_ct.c116 __be16 n_proto; member
237 tuple->n_proto = basic.key->n_proto; in mlx5_tc_ct_rule_to_tuple()
1379 tuple->n_proto = flow_keys.basic.n_proto; in mlx5_tc_ct_skb_to_tuple()
1382 switch (flow_keys.basic.n_proto) { in mlx5_tc_ct_skb_to_tuple()
/openbmc/linux/drivers/net/ethernet/intel/ice/
H A Dice_arfs.c319 if (fk->basic.n_proto == htons(ETH_P_IP)) { in ice_arfs_build_entry()
404 __be16 n_proto; in ice_rx_flow_steer() local
421 n_proto = fk.basic.n_proto; in ice_rx_flow_steer()
423 if ((n_proto == htons(ETH_P_IP) && !ip_is_fragment(ip_hdr(skb))) || in ice_rx_flow_steer()
424 n_proto == htons(ETH_P_IPV6)) in ice_rx_flow_steer()
434 if (!ice_arfs_is_perfect_flow_set(&pf->hw, n_proto, ip_proto)) in ice_rx_flow_steer()
H A Dice_tc_lib.c280 if (fltr->inner_headers.l2_key.n_proto == htons(ETH_P_IP) && in ice_tc_fill_tunnel_outer()
298 if (fltr->inner_headers.l2_key.n_proto == htons(ETH_P_IPV6) && in ice_tc_fill_tunnel_outer()
383 list[i].h_u.ethertype.ethtype_id = headers->l2_key.n_proto; in ice_tc_fill_rules()
384 list[i].m_u.ethertype.ethtype_id = headers->l2_mask.n_proto; in ice_tc_fill_rules()
532 if (headers->l2_key.n_proto == htons(ETH_P_IP) && in ice_tc_fill_rules()
551 if (headers->l2_key.n_proto == htons(ETH_P_IPV6) && in ice_tc_fill_rules()
1477 n_proto_key = ntohs(match.key->n_proto); in ice_parse_cls_flower()
1478 n_proto_mask = ntohs(match.mask->n_proto); in ice_parse_cls_flower()
1489 headers->l2_key.n_proto = cpu_to_be16(n_proto_key); in ice_parse_cls_flower()
1490 headers->l2_mask.n_proto = cpu_to_be16(n_proto_mask); in ice_parse_cls_flower()
[all …]
H A Dice_tc_lib.h80 __be16 n_proto; /* Ethernet Protocol */ member
/openbmc/linux/net/netfilter/
H A Dnf_tables_offload.c58 .value = match->key.basic.n_proto, in nft_flow_rule_transfer_vlan()
59 .mask = match->mask.basic.n_proto, in nft_flow_rule_transfer_vlan()
65 match->key.basic.n_proto = match->key.cvlan.vlan_tpid; in nft_flow_rule_transfer_vlan()
66 match->mask.basic.n_proto = match->mask.cvlan.vlan_tpid; in nft_flow_rule_transfer_vlan()
76 (match->key.basic.n_proto == htons(ETH_P_8021Q) || in nft_flow_rule_transfer_vlan()
77 match->key.basic.n_proto == htons(ETH_P_8021AD))) { in nft_flow_rule_transfer_vlan()
78 match->key.basic.n_proto = match->key.vlan.vlan_tpid; in nft_flow_rule_transfer_vlan()
79 match->mask.basic.n_proto = match->mask.vlan.vlan_tpid; in nft_flow_rule_transfer_vlan()
/openbmc/linux/drivers/net/ethernet/mellanox/mlx5/core/en/tc/
H A Dct_fs_smfs.c269 if (basic.mask->n_proto != htons(0xFFFF) || in mlx5_ct_fs_smfs_ct_validate_flow_rule()
270 (basic.key->n_proto != htons(ETH_P_IP) && basic.key->n_proto != htons(ETH_P_IPV6)) || in mlx5_ct_fs_smfs_ct_validate_flow_rule()
275 ntohs(basic.key->n_proto), ntohs(basic.mask->n_proto), in mlx5_ct_fs_smfs_ct_validate_flow_rule()
/openbmc/linux/net/sched/
H A Dcls_flower.c332 skb_key.basic.n_proto = skb_protocol(skb, false); in fl_classify()
1121 key->basic.n_proto = htons(ETH_P_IP); in fl_set_key_pppoe()
1122 mask->basic.n_proto = cpu_to_be16(~0); in fl_set_key_pppoe()
1124 key->basic.n_proto = htons(ETH_P_IPV6); in fl_set_key_pppoe()
1125 mask->basic.n_proto = cpu_to_be16(~0); in fl_set_key_pppoe()
1127 key->basic.n_proto = htons(ETH_P_MPLS_UC); in fl_set_key_pppoe()
1128 mask->basic.n_proto = cpu_to_be16(~0); in fl_set_key_pppoe()
1130 key->basic.n_proto = htons(ETH_P_MPLS_MC); in fl_set_key_pppoe()
1131 mask->basic.n_proto = cpu_to_be16(~0); in fl_set_key_pppoe()
1134 key->basic.n_proto = 0; in fl_set_key_pppoe()
[all …]
/openbmc/linux/tools/testing/selftests/bpf/progs/
H A Dbpf_flow.c148 if (keys->n_proto == bpf_htons(ETH_P_IP)) { in _dissect()
161 return parse_eth_proto(skb, keys->n_proto); in _dissect()
410 if (keys->n_proto == bpf_htons(ETH_P_8021AD)) { in PROG()
433 keys->n_proto = vlan->h_vlan_encapsulated_proto; in PROG()
/openbmc/linux/drivers/net/ethernet/cisco/enic/
H A Denic_clsf.c166 tpos->keys.basic.n_proto == k->basic.n_proto) in htbl_key_search()
182 if (!res || keys.basic.n_proto != htons(ETH_P_IP) || in enic_rx_flow_steer()
/openbmc/linux/net/core/
H A Dflow_dissector.c931 key_basic->n_proto = flow_keys->n_proto; in __skb_flow_bpf_to_target()
988 flow_keys->n_proto = proto; in bpf_flow_dissect()
1123 __be16 n_proto = proto; in __skb_flow_dissect() local
1133 n_proto = skb->protocol; in __skb_flow_dissect()
1137 result = bpf_flow_dissect(prog, &ctx, n_proto, nhoff, in __skb_flow_dissect()
1667 key_basic->n_proto = proto; in __skb_flow_dissect()
1808 __be16 n_proto; member
1826 data->n_proto = flow->basic.n_proto; in make_flow_keys_digest()
/openbmc/linux/drivers/net/ethernet/mellanox/mlxsw/
H A Dspectrum_flower.c527 u16 n_proto) in mlxsw_sp_flower_parse_ip() argument
535 if (n_proto != ETH_P_IP && n_proto != ETH_P_IPV6) { in mlxsw_sp_flower_parse_ip()
604 n_proto_key = ntohs(match.key->n_proto); in mlxsw_sp_flower_parse()
605 n_proto_mask = ntohs(match.mask->n_proto); in mlxsw_sp_flower_parse()
/openbmc/linux/drivers/net/ethernet/mellanox/mlx5/core/
H A Den_arfs.c675 tuple->etype = fk->basic.n_proto; in arfs_alloc_rule()
702 if (tuple->etype != fk->basic.n_proto) in arfs_cmp()
743 if (fk.basic.n_proto != htons(ETH_P_IP) && in mlx5e_rx_flow_steer()
744 fk.basic.n_proto != htons(ETH_P_IPV6)) in mlx5e_rx_flow_steer()
750 arfs_t = arfs_get_table(arfs, fk.basic.ip_proto, fk.basic.n_proto); in mlx5e_rx_flow_steer()
/openbmc/linux/drivers/net/hyperv/
H A Dhyperv_net.h1084 if (flow.basic.n_proto == htons(ETH_P_IP)) in netvsc_get_hash()
1086 else if (flow.basic.n_proto == htons(ETH_P_IPV6)) in netvsc_get_hash()
1092 if (flow.basic.n_proto == htons(ETH_P_IP)) in netvsc_get_hash()
1094 else if (flow.basic.n_proto == htons(ETH_P_IPV6)) in netvsc_get_hash()
1103 if (flow.basic.n_proto == htons(ETH_P_IP)) in netvsc_get_hash()
1105 else if (flow.basic.n_proto == htons(ETH_P_IPV6)) in netvsc_get_hash()
/openbmc/linux/drivers/net/ethernet/sfc/
H A Dtc_conntrack.c141 if (!IS_ALL_ONES(fm.mask->n_proto)) { in efx_tc_ct_parse_match()
144 ntohs(fm.mask->n_proto)); in efx_tc_ct_parse_match()
147 conn->eth_proto = fm.key->n_proto; in efx_tc_ct_parse_match()
H A Drx_common.c971 if (fk.basic.n_proto != htons(ETH_P_IP) && fk.basic.n_proto != htons(ETH_P_IPV6)) { in efx_filter_rfs()
988 req->spec.ether_type = fk.basic.n_proto; in efx_filter_rfs()
991 if (fk.basic.n_proto == htons(ETH_P_IP)) { in efx_filter_rfs()
/openbmc/linux/drivers/net/ethernet/marvell/prestera/
H A Dprestera_flower.c238 n_proto_key = match.key->n_proto; in prestera_flower_parse()
239 n_proto_mask = match.mask->n_proto; in prestera_flower_parse()
241 if (ntohs(match.key->n_proto) == ETH_P_ALL) { in prestera_flower_parse()
/openbmc/linux/drivers/net/ethernet/sfc/falcon/
H A Drx.c857 if (fk.basic.n_proto != htons(ETH_P_IP) && fk.basic.n_proto != htons(ETH_P_IPV6)) in ef4_filter_rfs()
869 spec.ether_type = fk.basic.n_proto; in ef4_filter_rfs()
872 if (fk.basic.n_proto == htons(ETH_P_IP)) { in ef4_filter_rfs()
/openbmc/linux/drivers/net/ethernet/chelsio/cxgb4/
H A Dcxgb4_tc_flower.c184 ethtype_key = ntohs(match.key->n_proto); in cxgb4_process_flow_match()
185 ethtype_mask = ntohs(match.mask->n_proto); in cxgb4_process_flow_match()
333 ethtype_key = ntohs(match.key->n_proto); in cxgb4_validate_flow_match()
334 ethtype_mask = ntohs(match.mask->n_proto); in cxgb4_validate_flow_match()
/openbmc/linux/drivers/net/ethernet/sfc/siena/
H A Drx_common.c977 if (fk.basic.n_proto != htons(ETH_P_IP) && fk.basic.n_proto != htons(ETH_P_IPV6)) { in efx_siena_filter_rfs()
994 req->spec.ether_type = fk.basic.n_proto; in efx_siena_filter_rfs()
997 if (fk.basic.n_proto == htons(ETH_P_IP)) { in efx_siena_filter_rfs()
/openbmc/linux/drivers/net/ethernet/microchip/lan966x/
H A Dlan966x_tc_flower.c94 if (match.mask->n_proto) { in lan966x_tc_flower_handler_basic_usage()
95 st->l3_proto = be16_to_cpu(match.key->n_proto); in lan966x_tc_flower_handler_basic_usage()
/openbmc/linux/include/net/
H A Dflow_dissector.h46 __be16 n_proto; member
/openbmc/linux/drivers/net/ethernet/stmicro/stmmac/
H A Dstmmac_tc.c760 if (match.mask->n_proto) { in tc_add_ethtype_flow()
761 u16 etype = ntohs(match.key->n_proto); in tc_add_ethtype_flow()
763 if (match.mask->n_proto != ETHER_TYPE_FULL_MASK) { in tc_add_ethtype_flow()

123