/drivers/net/ethernet/broadcom/bnxt/ |
D | bnxt_xdp.c | 118 struct xdp_buff xdp; in bnxt_rx_xdp() local 136 xdp.data_hard_start = *data_ptr - offset; in bnxt_rx_xdp() 137 xdp.data = *data_ptr; in bnxt_rx_xdp() 138 xdp_set_data_meta_invalid(&xdp); in bnxt_rx_xdp() 139 xdp.data_end = *data_ptr + *len; in bnxt_rx_xdp() 140 xdp.rxq = &rxr->xdp_rxq; in bnxt_rx_xdp() 141 orig_data = xdp.data; in bnxt_rx_xdp() 144 act = bpf_prog_run_xdp(xdp_prog, &xdp); in bnxt_rx_xdp() 154 *len = xdp.data_end - xdp.data; in bnxt_rx_xdp() 155 if (orig_data != xdp.data) { in bnxt_rx_xdp() [all …]
|
D | bnxt_xdp.h | 20 int bnxt_xdp(struct net_device *dev, struct netdev_bpf *xdp);
|
/drivers/net/ethernet/intel/i40e/ |
D | i40e_xsk.c | 191 static int i40e_run_xdp_zc(struct i40e_ring *rx_ring, struct xdp_buff *xdp) in i40e_run_xdp_zc() argument 205 act = bpf_prog_run_xdp(xdp_prog, xdp); in i40e_run_xdp_zc() 206 offset = xdp->data - xdp->data_hard_start; in i40e_run_xdp_zc() 208 xdp->handle = xsk_umem_adjust_offset(umem, xdp->handle, offset); in i40e_run_xdp_zc() 215 result = i40e_xmit_xdp_tx_ring(xdp, xdp_ring); in i40e_run_xdp_zc() 218 err = xdp_do_redirect(rx_ring->netdev, xdp, xdp_prog); in i40e_run_xdp_zc() 488 struct xdp_buff *xdp) in i40e_construct_skb_zc() argument 490 unsigned int metasize = xdp->data - xdp->data_meta; in i40e_construct_skb_zc() 491 unsigned int datasize = xdp->data_end - xdp->data; in i40e_construct_skb_zc() 496 xdp->data_end - xdp->data_hard_start, in i40e_construct_skb_zc() [all …]
|
D | i40e_txrx.c | 1996 struct xdp_buff *xdp) in i40e_construct_skb() argument 1998 unsigned int size = xdp->data_end - xdp->data; in i40e_construct_skb() 2008 prefetch(xdp->data); in i40e_construct_skb() 2010 prefetch(xdp->data + L1_CACHE_BYTES); in i40e_construct_skb() 2038 headlen = eth_get_headlen(skb->dev, xdp->data, in i40e_construct_skb() 2042 memcpy(__skb_put(skb, headlen), xdp->data, in i40e_construct_skb() 2077 struct xdp_buff *xdp) in i40e_build_skb() argument 2079 unsigned int metasize = xdp->data - xdp->data_meta; in i40e_build_skb() 2084 SKB_DATA_ALIGN(xdp->data_end - in i40e_build_skb() 2085 xdp->data_hard_start); in i40e_build_skb() [all …]
|
D | i40e_txrx_common.h | 9 int i40e_xmit_xdp_tx_ring(struct xdp_buff *xdp, struct i40e_ring *xdp_ring);
|
/drivers/net/ethernet/intel/ixgbe/ |
D | ixgbe_xsk.c | 144 struct xdp_buff *xdp) in ixgbe_run_xdp_zc() argument 155 act = bpf_prog_run_xdp(xdp_prog, xdp); in ixgbe_run_xdp_zc() 156 offset = xdp->data - xdp->data_hard_start; in ixgbe_run_xdp_zc() 158 xdp->handle = xsk_umem_adjust_offset(umem, xdp->handle, offset); in ixgbe_run_xdp_zc() 164 xdpf = convert_to_xdp_frame(xdp); in ixgbe_run_xdp_zc() 172 err = xdp_do_redirect(rx_ring->netdev, xdp, xdp_prog); in ixgbe_run_xdp_zc() 396 struct xdp_buff *xdp) in ixgbe_construct_skb_zc() argument 398 unsigned int metasize = xdp->data - xdp->data_meta; in ixgbe_construct_skb_zc() 399 unsigned int datasize = xdp->data_end - xdp->data; in ixgbe_construct_skb_zc() 404 xdp->data_end - xdp->data_hard_start, in ixgbe_construct_skb_zc() [all …]
|
D | ixgbe_main.c | 2087 struct xdp_buff *xdp, in ixgbe_construct_skb() argument 2090 unsigned int size = xdp->data_end - xdp->data; in ixgbe_construct_skb() 2094 unsigned int truesize = SKB_DATA_ALIGN(xdp->data_end - in ixgbe_construct_skb() 2095 xdp->data_hard_start); in ixgbe_construct_skb() 2100 prefetch(xdp->data); in ixgbe_construct_skb() 2102 prefetch(xdp->data + L1_CACHE_BYTES); in ixgbe_construct_skb() 2130 xdp->data - page_address(rx_buffer->page), in ixgbe_construct_skb() 2139 xdp->data, ALIGN(size, sizeof(long))); in ixgbe_construct_skb() 2148 struct xdp_buff *xdp, in ixgbe_build_skb() argument 2151 unsigned int metasize = xdp->data - xdp->data_meta; in ixgbe_build_skb() [all …]
|
/drivers/net/ethernet/mellanox/mlx5/core/en/ |
D | xdp.c | 60 struct mlx5e_dma_info *di, struct xdp_buff *xdp) in mlx5e_xmit_xdp_buff() argument 67 xdpf = convert_to_xdp_frame(xdp); in mlx5e_xmit_xdp_buff() 74 if (xdp->rxq->mem.type == MEM_TYPE_ZERO_COPY) { in mlx5e_xmit_xdp_buff() 126 struct xdp_buff xdp; in mlx5e_xdp_handle() local 133 xdp.data = va + *rx_headroom; in mlx5e_xdp_handle() 134 xdp_set_data_meta_invalid(&xdp); in mlx5e_xdp_handle() 135 xdp.data_end = xdp.data + *len; in mlx5e_xdp_handle() 136 xdp.data_hard_start = va; in mlx5e_xdp_handle() 138 xdp.handle = di->xsk.handle; in mlx5e_xdp_handle() 139 xdp.rxq = &rq->xdp_rxq; in mlx5e_xdp_handle() [all …]
|
/drivers/net/ |
D | veth.c | 229 struct veth_rq *rq, bool xdp) in veth_forward_skb() argument 231 return __dev_forward_skb(dev, skb) ?: xdp ? in veth_forward_skb() 491 static int veth_xdp_tx(struct net_device *dev, struct xdp_buff *xdp, in veth_xdp_tx() argument 494 struct xdp_frame *frame = convert_to_xdp_frame(xdp); in veth_xdp_tx() 523 struct xdp_buff xdp; in veth_xdp_rcv_one() local 526 xdp.data_hard_start = hard_start; in veth_xdp_rcv_one() 527 xdp.data = frame->data; in veth_xdp_rcv_one() 528 xdp.data_end = frame->data + frame->len; in veth_xdp_rcv_one() 529 xdp.data_meta = frame->data - frame->metasize; in veth_xdp_rcv_one() 530 xdp.rxq = &rq->xdp_rxq; in veth_xdp_rcv_one() [all …]
|
D | tun.c | 1233 static int tun_xdp(struct net_device *dev, struct netdev_bpf *xdp) in tun_xdp() argument 1235 switch (xdp->command) { in tun_xdp() 1237 return tun_xdp_set(dev, xdp->prog, xdp->extack); in tun_xdp() 1239 xdp->prog_id = tun_xdp_query(dev); in tun_xdp() 1310 struct xdp_frame *xdp = frames[i]; in tun_xdp_xmit() local 1314 void *frame = tun_xdp_to_ptr(xdp); in tun_xdp_xmit() 1318 xdp_return_frame_rx_napi(xdp); in tun_xdp_xmit() 1331 static int tun_xdp_tx(struct net_device *dev, struct xdp_buff *xdp) in tun_xdp_tx() argument 1333 struct xdp_frame *frame = convert_to_xdp_frame(xdp); in tun_xdp_tx() 1624 struct xdp_buff *xdp, u32 act) in tun_xdp_act() argument [all …]
|
D | virtio_net.c | 656 struct xdp_buff xdp; in receive_small() local 684 xdp.data_hard_start = buf + VIRTNET_RX_PAD + vi->hdr_len; in receive_small() 685 xdp.data = xdp.data_hard_start + xdp_headroom; in receive_small() 686 xdp_set_data_meta_invalid(&xdp); in receive_small() 687 xdp.data_end = xdp.data + len; in receive_small() 688 xdp.rxq = &rq->xdp_rxq; in receive_small() 689 orig_data = xdp.data; in receive_small() 690 act = bpf_prog_run_xdp(xdp_prog, &xdp); in receive_small() 696 delta = orig_data - xdp.data; in receive_small() 697 len = xdp.data_end - xdp.data; in receive_small() [all …]
|
D | tap.c | 1148 static int tap_get_user_xdp(struct tap_queue *q, struct xdp_buff *xdp) in tap_get_user_xdp() argument 1150 struct tun_xdp_hdr *hdr = xdp->data_hard_start; in tap_get_user_xdp() 1161 skb = build_skb(xdp->data_hard_start, buflen); in tap_get_user_xdp() 1167 skb_reserve(skb, xdp->data - xdp->data_hard_start); in tap_get_user_xdp() 1168 skb_put(skb, xdp->data_end - xdp->data); in tap_get_user_xdp() 1215 struct xdp_buff *xdp; in tap_sendmsg() local 1220 xdp = &((struct xdp_buff *)ctl->ptr)[i]; in tap_sendmsg() 1221 tap_get_user_xdp(q, xdp); in tap_sendmsg()
|
/drivers/net/ethernet/socionext/ |
D | netsec.c | 866 static u32 netsec_xdp_xmit_back(struct netsec_priv *priv, struct xdp_buff *xdp) in netsec_xdp_xmit_back() argument 869 struct xdp_frame *xdpf = convert_to_xdp_frame(xdp); in netsec_xdp_xmit_back() 883 struct xdp_buff *xdp) in netsec_run_xdp() argument 889 act = bpf_prog_run_xdp(prog, xdp); in netsec_run_xdp() 896 ret = netsec_xdp_xmit_back(priv, xdp); in netsec_run_xdp() 898 xdp_return_buff(xdp); in netsec_run_xdp() 901 err = xdp_do_redirect(priv->ndev, xdp, prog); in netsec_run_xdp() 906 xdp_return_buff(xdp); in netsec_run_xdp() 917 xdp_return_buff(xdp); in netsec_run_xdp() 948 struct xdp_buff xdp; in netsec_process_rx() local [all …]
|
/drivers/net/ethernet/intel/ixgbevf/ |
D | ixgbevf_main.c | 858 struct xdp_buff *xdp, in ixgbevf_construct_skb() argument 861 unsigned int size = xdp->data_end - xdp->data; in ixgbevf_construct_skb() 865 unsigned int truesize = SKB_DATA_ALIGN(xdp->data_end - in ixgbevf_construct_skb() 866 xdp->data_hard_start); in ixgbevf_construct_skb() 872 prefetch(xdp->data); in ixgbevf_construct_skb() 874 prefetch(xdp->data + L1_CACHE_BYTES); in ixgbevf_construct_skb() 899 headlen = eth_get_headlen(skb->dev, xdp->data, in ixgbevf_construct_skb() 903 memcpy(__skb_put(skb, headlen), xdp->data, in ixgbevf_construct_skb() 910 (xdp->data + headlen) - in ixgbevf_construct_skb() 935 struct xdp_buff *xdp, in ixgbevf_build_skb() argument [all …]
|
/drivers/net/ethernet/freescale/dpaa2/ |
D | dpaa2-eth.c | 226 ch->xdp.drop_bufs[ch->xdp.drop_cnt++] = addr; in xdp_release_buf() 227 if (ch->xdp.drop_cnt < DPAA2_ETH_BUFS_PER_CMD) in xdp_release_buf() 231 ch->xdp.drop_bufs, in xdp_release_buf() 232 ch->xdp.drop_cnt)) == -EBUSY) in xdp_release_buf() 236 free_bufs(priv, ch->xdp.drop_bufs, ch->xdp.drop_cnt); in xdp_release_buf() 237 ch->buf_count -= ch->xdp.drop_cnt; in xdp_release_buf() 240 ch->xdp.drop_cnt = 0; in xdp_release_buf() 283 struct xdp_buff xdp; in run_xdp() local 291 xdp_prog = READ_ONCE(ch->xdp.prog); in run_xdp() 295 xdp.data = vaddr + dpaa2_fd_get_offset(fd); in run_xdp() [all …]
|
D | dpaa2-eth.h | 117 } xdp; member 339 struct dpaa2_eth_ch_xdp xdp; member
|
/drivers/net/ethernet/qlogic/qede/ |
D | qede_fp.c | 365 txq->sw_tx_ring.xdp[idx].page = metadata->data; in qede_xdp_xmit() 366 txq->sw_tx_ring.xdp[idx].mapping = metadata->mapping; in qede_xdp_xmit() 400 txq->sw_tx_ring.xdp[idx].mapping, in qede_xdp_tx_int() 402 __free_page(txq->sw_tx_ring.xdp[idx].page); in qede_xdp_tx_int() 1061 struct xdp_buff xdp; in qede_rx_xdp() local 1064 xdp.data_hard_start = page_address(bd->data); in qede_rx_xdp() 1065 xdp.data = xdp.data_hard_start + *data_offset; in qede_rx_xdp() 1066 xdp_set_data_meta_invalid(&xdp); in qede_rx_xdp() 1067 xdp.data_end = xdp.data + *len; in qede_rx_xdp() 1068 xdp.rxq = &rxq->xdp_rxq; in qede_rx_xdp() [all …]
|
/drivers/net/ethernet/mellanox/mlx4/ |
D | en_rx.c | 673 struct xdp_buff xdp; in mlx4_en_process_rx_cq() local 685 xdp.rxq = &ring->xdp_rxq; in mlx4_en_process_rx_cq() 779 xdp.data_hard_start = va - frags[0].page_offset; in mlx4_en_process_rx_cq() 780 xdp.data = va; in mlx4_en_process_rx_cq() 781 xdp_set_data_meta_invalid(&xdp); in mlx4_en_process_rx_cq() 782 xdp.data_end = xdp.data + length; in mlx4_en_process_rx_cq() 783 orig_data = xdp.data; in mlx4_en_process_rx_cq() 785 act = bpf_prog_run_xdp(xdp_prog, &xdp); in mlx4_en_process_rx_cq() 787 length = xdp.data_end - xdp.data; in mlx4_en_process_rx_cq() 788 if (xdp.data != orig_data) { in mlx4_en_process_rx_cq() [all …]
|
/drivers/net/ethernet/cavium/thunder/ |
D | nicvf_main.c | 534 struct xdp_buff xdp; in nicvf_xdp_rx() local 551 xdp.data_hard_start = page_address(page); in nicvf_xdp_rx() 552 xdp.data = (void *)cpu_addr; in nicvf_xdp_rx() 553 xdp_set_data_meta_invalid(&xdp); in nicvf_xdp_rx() 554 xdp.data_end = xdp.data + len; in nicvf_xdp_rx() 555 xdp.rxq = &rq->xdp_rxq; in nicvf_xdp_rx() 556 orig_data = xdp.data; in nicvf_xdp_rx() 559 action = bpf_prog_run_xdp(prog, &xdp); in nicvf_xdp_rx() 562 len = xdp.data_end - xdp.data; in nicvf_xdp_rx() 564 if (orig_data != xdp.data) { in nicvf_xdp_rx() [all …]
|
/drivers/net/ethernet/netronome/nfp/ |
D | nfp_net_debugfs.c | 150 struct dentry *queues, *tx, *rx, *xdp; in nfp_net_debugfs_vnic_add() local 168 xdp = debugfs_create_dir("xdp", queues); in nfp_net_debugfs_vnic_add() 174 debugfs_create_file(name, 0400, xdp, in nfp_net_debugfs_vnic_add()
|
D | nfp_net_common.c | 1358 nfp_net_free_frag(void *frag, bool xdp) in nfp_net_free_frag() argument 1360 if (!xdp) in nfp_net_free_frag() 1812 struct xdp_buff xdp; in nfp_net_rx() local 1818 xdp.rxq = &rx_ring->xdp_rxq; in nfp_net_rx() 1911 xdp.data_hard_start = rxbuf->frag + NFP_NET_RX_BUF_HEADROOM; in nfp_net_rx() 1912 xdp.data = orig_data; in nfp_net_rx() 1913 xdp.data_meta = orig_data; in nfp_net_rx() 1914 xdp.data_end = orig_data + pkt_len; in nfp_net_rx() 1916 act = bpf_prog_run_xdp(xdp_prog, &xdp); in nfp_net_rx() 1918 pkt_len = xdp.data_end - xdp.data; in nfp_net_rx() [all …]
|
/drivers/net/netdevsim/ |
D | bpf.c | 189 struct xdp_attachment_info *xdp) in nsim_xdp_set_prog() argument 193 if (!xdp_attachment_flags_ok(xdp, bpf)) in nsim_xdp_set_prog() 211 xdp_attachment_setup(xdp, bpf); in nsim_xdp_set_prog() 553 return xdp_attachment_query(&ns->xdp, bpf); in nsim_bpf() 561 return nsim_xdp_set_prog(ns, bpf, &ns->xdp); in nsim_bpf() 647 WARN_ON(ns->xdp.prog); in nsim_bpf_uninit()
|
D | netdevsim.h | 65 struct xdp_attachment_info xdp; member
|
/drivers/vhost/ |
D | net.c | 128 struct xdp_buff *xdp; member 467 .ptr = nvq->xdp, in vhost_tx_batch() 691 struct xdp_buff *xdp = &nvq->xdp[nvq->batched_xdp]; in vhost_net_build_xdp() local 744 xdp->data_hard_start = buf; in vhost_net_build_xdp() 745 xdp->data = buf + pad; in vhost_net_build_xdp() 746 xdp->data_end = xdp->data + len; in vhost_net_build_xdp() 1279 struct xdp_buff *xdp; in vhost_net_open() local 1300 xdp = kmalloc_array(VHOST_NET_BATCH, sizeof(*xdp), GFP_KERNEL); in vhost_net_open() 1301 if (!xdp) { in vhost_net_open() 1307 n->vqs[VHOST_NET_VQ_TX].xdp = xdp; in vhost_net_open() [all …]
|
/drivers/net/ethernet/ti/ |
D | cpsw.c | 488 static int cpsw_run_xdp(struct cpsw_priv *priv, int ch, struct xdp_buff *xdp, in cpsw_run_xdp() argument 506 act = bpf_prog_run_xdp(prog, xdp); in cpsw_run_xdp() 512 xdpf = convert_to_xdp_frame(xdp); in cpsw_run_xdp() 519 if (xdp_do_redirect(ndev, xdp, prog)) in cpsw_run_xdp() 685 struct xdp_buff xdp; in cpsw_rx_handler() local 724 xdp.data = pa + CPSW_HEADROOM + in cpsw_rx_handler() 726 xdp.data_end = xdp.data + len - in cpsw_rx_handler() 729 xdp.data = pa + CPSW_HEADROOM; in cpsw_rx_handler() 730 xdp.data_end = xdp.data + len; in cpsw_rx_handler() 733 xdp_set_data_meta_invalid(&xdp); in cpsw_rx_handler() [all …]
|