Home
last modified time | relevance | path

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

/linux-6.6.21/net/core/
Ddst.c267 static void __metadata_dst_init(struct metadata_dst *md_dst, in __metadata_dst_init() argument
272 dst = &md_dst->dst; in __metadata_dst_init()
275 memset(dst + 1, 0, sizeof(*md_dst) + optslen - sizeof(*dst)); in __metadata_dst_init()
276 md_dst->type = type; in __metadata_dst_init()
282 struct metadata_dst *md_dst; in metadata_dst_alloc() local
284 md_dst = kmalloc(sizeof(*md_dst) + optslen, flags); in metadata_dst_alloc()
285 if (!md_dst) in metadata_dst_alloc()
288 __metadata_dst_init(md_dst, type, optslen); in metadata_dst_alloc()
290 return md_dst; in metadata_dst_alloc()
294 void metadata_dst_free(struct metadata_dst *md_dst) in metadata_dst_free() argument
[all …]
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()
Dfilter.c4710 static struct metadata_dst __percpu *md_dst; variable
4715 struct metadata_dst *md = this_cpu_ptr(md_dst); in BPF_CALL_4()
4797 const struct metadata_dst *md = this_cpu_ptr(md_dst); in BPF_CALL_3()
4821 if (!md_dst) { in bpf_get_skb_set_tunnel_proto()
4829 if (cmpxchg(&md_dst, NULL, tmp)) in bpf_get_skb_set_tunnel_proto()
/linux-6.6.21/include/net/
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 …]
Dmacsec.h213 struct metadata_dst *md_dst; member
/linux-6.6.21/net/xfrm/
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()
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()
/linux-6.6.21/drivers/net/ethernet/mellanox/mlx5/core/en_accel/
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()
Dmacsec.c85 struct metadata_dst *md_dst; member
703 rx_sc->md_dst = metadata_dst_alloc(0, METADATA_MACSEC, GFP_KERNEL); in mlx5e_macsec_add_rxsc()
704 if (!rx_sc->md_dst) { in mlx5e_macsec_add_rxsc()
714 rx_sc->md_dst->u.macsec_info.sci = rx_sc->sci; in mlx5e_macsec_add_rxsc()
808 metadata_dst_free(rx_sc->md_dst); in macsec_del_rxsc_ctx()
1627 struct metadata_dst *md_dst = skb_metadata_dst(skb); in mlx5e_macsec_handle_tx_skb() local
1631 &md_dst->u.macsec_info.sci); in mlx5e_macsec_handle_tx_skb()
1646 struct metadata_dst *md_dst = skb_metadata_dst(skb); in mlx5e_macsec_tx_build_eseg() local
1650 &md_dst->u.macsec_info.sci); in mlx5e_macsec_tx_build_eseg()
1678 dst_hold(&rx_sc->md_dst->dst); in mlx5e_macsec_offload_handle_rx_skb()
[all …]
/linux-6.6.21/net/dsa/
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()
/linux-6.6.21/drivers/net/ethernet/netronome/nfp/nfd3/
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()
/linux-6.6.21/drivers/net/ethernet/netronome/nfp/nfdk/
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()
/linux-6.6.21/drivers/net/
Dmacsec.c996 struct metadata_dst *md_dst; in handle_not_macsec() local
1002 md_dst = skb_metadata_dst(skb); in handle_not_macsec()
1015 if (md_dst && md_dst->type == METADATA_MACSEC) in handle_not_macsec()
1016 rx_sc = find_rx_sc(&macsec->secy, md_dst->u.macsec_info.sci); in handle_not_macsec()
1018 if (md_dst && md_dst->type == METADATA_MACSEC && !rx_sc) in handle_not_macsec()
3391 struct metadata_dst *md_dst = secy->tx_sc.md_dst; in macsec_start_xmit() local
3394 dst_hold(&md_dst->dst); in macsec_start_xmit()
3395 skb_dst_set(skb, &md_dst->dst); in macsec_start_xmit()
3710 if (macsec->secy.tx_sc.md_dst) in macsec_free_netdev()
3711 metadata_dst_free(macsec->secy.tx_sc.md_dst); in macsec_free_netdev()
[all …]
/linux-6.6.21/drivers/net/ethernet/mediatek/
Dmtk_eth_soc.c3401 struct metadata_dst *md_dst = eth->dsa_meta[i]; in mtk_open() local
3403 if (md_dst) in mtk_open()
3406 md_dst = metadata_dst_alloc(0, METADATA_HW_PORT_MUX, in mtk_open()
3408 if (!md_dst) in mtk_open()
3411 md_dst->u.port_info.port_id = i; in mtk_open()
3412 eth->dsa_meta[i] = md_dst; in mtk_open()
/linux-6.6.21/drivers/net/ethernet/broadcom/bnxt/
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()