Home
last modified time | relevance | path

Searched refs:md_dst (Results 1 – 15 of 15) sorted by relevance

/openbmc/linux/net/core/
H A Ddst.c274 static void __metadata_dst_init(struct metadata_dst *md_dst, in __metadata_dst_init() argument
279 dst = &md_dst->dst; in __metadata_dst_init()
282 memset(dst + 1, 0, sizeof(*md_dst) + optslen - sizeof(*dst)); in __metadata_dst_init()
283 md_dst->type = type; in __metadata_dst_init()
289 struct metadata_dst *md_dst; in metadata_dst_alloc() local
291 md_dst = kmalloc(sizeof(*md_dst) + optslen, flags); in metadata_dst_alloc()
292 if (!md_dst) in metadata_dst_alloc()
295 __metadata_dst_init(md_dst, type, optslen); in metadata_dst_alloc()
297 return md_dst; in metadata_dst_alloc()
301 void metadata_dst_free(struct metadata_dst *md_dst) in metadata_dst_free() argument
[all …]
H A Dflow_dissector.c1052 struct metadata_dst *md_dst = skb_metadata_dst(skb); in __skb_flow_dissect() local
1059 (!md_dst || md_dst->type != METADATA_HW_PORT_MUX)) { in __skb_flow_dissect()
H A Dfilter.c4769 static struct metadata_dst __percpu *md_dst; variable
4774 struct metadata_dst *md = this_cpu_ptr(md_dst); in BPF_CALL_4()
4856 const struct metadata_dst *md = this_cpu_ptr(md_dst); in BPF_CALL_3()
4880 if (!md_dst) { in bpf_get_skb_set_tunnel_proto()
4888 if (cmpxchg(&md_dst, NULL, tmp)) in bpf_get_skb_set_tunnel_proto()
/openbmc/linux/include/net/
H A Ddst_metadata.h45 struct metadata_dst *md_dst = (struct metadata_dst *) skb_dst(skb); in skb_metadata_dst() local
47 if (md_dst && md_dst->dst.flags & DST_METADATA) in skb_metadata_dst()
48 return md_dst; in skb_metadata_dst()
56 struct metadata_dst *md_dst = skb_metadata_dst(skb); in skb_tunnel_info() local
59 if (md_dst && md_dst->type == METADATA_IP_TUNNEL) in skb_tunnel_info()
60 return &md_dst->u.tun_info; in skb_tunnel_info()
78 struct metadata_dst *md_dst = skb_metadata_dst(skb); in skb_xfrm_md_info() local
81 if (md_dst && md_dst->type == METADATA_XFRM) in skb_xfrm_md_info()
82 return &md_dst->u.xfrm_info; in skb_xfrm_md_info()
135 void metadata_dst_free_percpu(struct metadata_dst __percpu *md_dst);
[all …]
H A Dmacsec.h213 struct metadata_dst *md_dst; member
/openbmc/linux/net/xfrm/
H A Dxfrm_interface_bpf.c67 struct metadata_dst *md_dst; in bpf_skb_set_xfrm_info() local
82 md_dst = this_cpu_ptr(xfrm_bpf_md_dst); in bpf_skb_set_xfrm_info()
84 info = &md_dst->u.xfrm_info; in bpf_skb_set_xfrm_info()
91 dst_hold((struct dst_entry *)md_dst); in bpf_skb_set_xfrm_info()
92 skb_dst_set(skb, (struct dst_entry *)md_dst); in bpf_skb_set_xfrm_info()
H A Dxfrm_interface_core.c410 struct metadata_dst *md_dst; in xfrmi_rcv_cb() local
412 md_dst = metadata_dst_alloc(0, METADATA_XFRM, GFP_ATOMIC); in xfrmi_rcv_cb()
413 if (!md_dst) in xfrmi_rcv_cb()
416 md_dst->u.xfrm_info.if_id = x->if_id; in xfrmi_rcv_cb()
417 md_dst->u.xfrm_info.link = link; in xfrmi_rcv_cb()
418 skb_dst_set(skb, (struct dst_entry *)md_dst); in xfrmi_rcv_cb()
/openbmc/linux/drivers/net/ethernet/mellanox/mlx5/core/en_accel/
H A Dmacsec.h27 struct metadata_dst *md_dst = skb_metadata_dst(skb); in mlx5e_macsec_skb_is_offload() local
29 return md_dst && (md_dst->type == METADATA_MACSEC); in mlx5e_macsec_skb_is_offload()
H A Dmacsec.c85 struct metadata_dst *md_dst; member
726 rx_sc->md_dst = metadata_dst_alloc(0, METADATA_MACSEC, GFP_KERNEL); in mlx5e_macsec_add_rxsc()
727 if (!rx_sc->md_dst) { in mlx5e_macsec_add_rxsc()
737 rx_sc->md_dst->u.macsec_info.sci = rx_sc->sci; in mlx5e_macsec_add_rxsc()
831 metadata_dst_free(rx_sc->md_dst); in macsec_del_rxsc_ctx()
1652 struct metadata_dst *md_dst = skb_metadata_dst(skb); in mlx5e_macsec_handle_tx_skb() local
1656 &md_dst->u.macsec_info.sci); in mlx5e_macsec_handle_tx_skb()
1671 struct metadata_dst *md_dst = skb_metadata_dst(skb); in mlx5e_macsec_tx_build_eseg() local
1675 &md_dst->u.macsec_info.sci); in mlx5e_macsec_tx_build_eseg()
1703 dst_hold(&rx_sc->md_dst->dst); in mlx5e_macsec_offload_handle_rx_skb()
[all …]
/openbmc/linux/net/dsa/
H A Dtag.c57 struct metadata_dst *md_dst = skb_metadata_dst(skb); in dsa_switch_rcv() local
71 if (md_dst && md_dst->type == METADATA_HW_PORT_MUX) { in dsa_switch_rcv()
72 unsigned int port = md_dst->u.port_info.port_id; in dsa_switch_rcv()
/openbmc/linux/drivers/net/ethernet/netronome/nfp/nfd3/
H A Ddp.c174 struct metadata_dst *md_dst = skb_metadata_dst(skb); in nfp_nfd3_prep_tx_meta() local
186 if (unlikely(md_dst && md_dst->type != METADATA_HW_PORT_MUX)) in nfp_nfd3_prep_tx_meta()
187 md_dst = NULL; in nfp_nfd3_prep_tx_meta()
191 if (!(md_dst || tls_handle || vlan_insert || *ipsec)) in nfp_nfd3_prep_tx_meta()
195 (!!md_dst ? NFP_NET_META_PORTID_SIZE : 0) + in nfp_nfd3_prep_tx_meta()
204 if (md_dst) { in nfp_nfd3_prep_tx_meta()
206 put_unaligned_be32(md_dst->u.port_info.port_id, data); in nfp_nfd3_prep_tx_meta()
/openbmc/linux/drivers/net/ethernet/netronome/nfp/nfdk/
H A Ddp.c178 struct metadata_dst *md_dst = skb_metadata_dst(skb); in nfp_nfdk_prep_tx_meta() local
190 if (unlikely(md_dst && md_dst->type != METADATA_HW_PORT_MUX)) in nfp_nfdk_prep_tx_meta()
191 md_dst = NULL; in nfp_nfdk_prep_tx_meta()
195 if (!(md_dst || vlan_insert || *ipsec)) in nfp_nfdk_prep_tx_meta()
199 (!!md_dst ? NFP_NET_META_PORTID_SIZE : 0) + in nfp_nfdk_prep_tx_meta()
207 if (md_dst) { in nfp_nfdk_prep_tx_meta()
209 put_unaligned_be32(md_dst->u.port_info.port_id, data); in nfp_nfdk_prep_tx_meta()
/openbmc/linux/drivers/net/
H A Dmacsec.c983 struct metadata_dst *md_dst; in handle_not_macsec() local
990 md_dst = skb_metadata_dst(skb); in handle_not_macsec()
991 is_macsec_md_dst = md_dst && md_dst->type == METADATA_MACSEC; in handle_not_macsec()
1018 md_dst->u.macsec_info.sci); in handle_not_macsec()
3399 struct metadata_dst *md_dst = secy->tx_sc.md_dst; in macsec_start_xmit() local
3402 dst_hold(&md_dst->dst); in macsec_start_xmit()
3403 skb_dst_set(skb, &md_dst->dst); in macsec_start_xmit()
3718 dst_release(&macsec->secy.tx_sc.md_dst->dst); in macsec_free_netdev()
4000 secy->tx_sc.md_dst = metadata_dst_alloc(0, METADATA_MACSEC, GFP_KERNEL); in macsec_add_dev()
4001 if (!secy->tx_sc.md_dst) in macsec_add_dev()
[all …]
/openbmc/linux/drivers/net/ethernet/mediatek/
H A Dmtk_eth_soc.c3400 struct metadata_dst *md_dst = eth->dsa_meta[i]; in mtk_open() local
3402 if (md_dst) in mtk_open()
3405 md_dst = metadata_dst_alloc(0, METADATA_HW_PORT_MUX, in mtk_open()
3407 if (!md_dst) in mtk_open()
3410 md_dst->u.port_info.port_id = i; in mtk_open()
3411 eth->dsa_meta[i] = md_dst; in mtk_open()
/openbmc/linux/drivers/net/ethernet/broadcom/bnxt/
H A Dbnxt.c374 struct metadata_dst *md_dst = skb_metadata_dst(skb); in bnxt_xmit_get_cfa_action() local
376 if (!md_dst || md_dst->type != METADATA_HW_PORT_MUX) in bnxt_xmit_get_cfa_action()
379 return md_dst->u.port_info.port_id; in bnxt_xmit_get_cfa_action()