Home
last modified time | relevance | path

Searched refs:xdpf (Results 1 – 25 of 66) sorted by relevance

123

/linux-6.1.9/net/core/
Dxdp.c408 void xdp_return_frame(struct xdp_frame *xdpf) in xdp_return_frame() argument
413 if (likely(!xdp_frame_has_frags(xdpf))) in xdp_return_frame()
416 sinfo = xdp_get_shared_info_from_frame(xdpf); in xdp_return_frame()
420 __xdp_return(page_address(page), &xdpf->mem, false, NULL); in xdp_return_frame()
423 __xdp_return(xdpf->data, &xdpf->mem, false, NULL); in xdp_return_frame()
427 void xdp_return_frame_rx_napi(struct xdp_frame *xdpf) in xdp_return_frame_rx_napi() argument
432 if (likely(!xdp_frame_has_frags(xdpf))) in xdp_return_frame_rx_napi()
435 sinfo = xdp_get_shared_info_from_frame(xdpf); in xdp_return_frame_rx_napi()
439 __xdp_return(page_address(page), &xdpf->mem, true, NULL); in xdp_return_frame_rx_napi()
442 __xdp_return(xdpf->data, &xdpf->mem, true, NULL); in xdp_return_frame_rx_napi()
[all …]
/linux-6.1.9/kernel/bpf/
Dcpumap.c153 struct xdp_frame *xdpf; in __cpu_map_ring_cleanup() local
155 while ((xdpf = ptr_ring_consume(ring))) in __cpu_map_ring_cleanup()
156 if (WARN_ON_ONCE(xdpf)) in __cpu_map_ring_cleanup()
157 xdp_return_frame(xdpf); in __cpu_map_ring_cleanup()
225 struct xdp_frame *xdpf = frames[i]; in cpu_map_bpf_prog_run_xdp() local
229 rxq.dev = xdpf->dev_rx; in cpu_map_bpf_prog_run_xdp()
230 rxq.mem = xdpf->mem; in cpu_map_bpf_prog_run_xdp()
233 xdp_convert_frame_to_buff(xdpf, &xdp); in cpu_map_bpf_prog_run_xdp()
238 err = xdp_update_frame_from_buff(&xdp, xdpf); in cpu_map_bpf_prog_run_xdp()
240 xdp_return_frame(xdpf); in cpu_map_bpf_prog_run_xdp()
[all …]
Ddevmap.c335 struct xdp_frame *xdpf = frames[i]; in dev_map_bpf_prog_run() local
339 xdp_convert_frame_to_buff(xdpf, &xdp); in dev_map_bpf_prog_run()
345 err = xdp_update_frame_from_buff(&xdp, xdpf); in dev_map_bpf_prog_run()
347 xdp_return_frame_rx_napi(xdpf); in dev_map_bpf_prog_run()
349 frames[nframes++] = xdpf; in dev_map_bpf_prog_run()
358 xdp_return_frame_rx_napi(xdpf); in dev_map_bpf_prog_run()
377 struct xdp_frame *xdpf = bq->q[i]; in bq_xmit_all() local
379 prefetch(xdpf); in bq_xmit_all()
446 static void bq_enqueue(struct net_device *dev, struct xdp_frame *xdpf, in bq_enqueue() argument
468 bq->q[bq->count++] = xdpf; in bq_enqueue()
[all …]
/linux-6.1.9/include/net/
Dxdp.h240 struct sk_buff *__xdp_build_skb_from_frame(struct xdp_frame *xdpf,
243 struct sk_buff *xdp_build_skb_from_frame(struct xdp_frame *xdpf,
246 struct xdp_frame *xdpf_clone(struct xdp_frame *xdpf);
310 void xdp_return_frame(struct xdp_frame *xdpf);
311 void xdp_return_frame_rx_napi(struct xdp_frame *xdpf);
314 void xdp_return_frame_bulk(struct xdp_frame *xdpf,
323 static inline void xdp_release_frame(struct xdp_frame *xdpf) in xdp_release_frame() argument
325 struct xdp_mem_info *mem = &xdpf->mem; in xdp_release_frame()
333 if (likely(!xdp_frame_has_frags(xdpf))) in xdp_release_frame()
336 sinfo = xdp_get_shared_info_from_frame(xdpf); in xdp_release_frame()
[all …]
/linux-6.1.9/drivers/net/ethernet/mellanox/mlx5/core/en/
Dxdp.c65 struct xdp_frame *xdpf; in mlx5e_xmit_xdp_buff() local
69 xdpf = xdp_convert_buff_to_frame(xdp); in mlx5e_xmit_xdp_buff()
70 if (unlikely(!xdpf)) in mlx5e_xmit_xdp_buff()
73 xdptxd.data = xdpf->data; in mlx5e_xmit_xdp_buff()
74 xdptxd.len = xdpf->len; in mlx5e_xmit_xdp_buff()
94 xdp_return_frame(xdpf); in mlx5e_xmit_xdp_buff()
99 xdpi.frame.xdpf = xdpf; in mlx5e_xmit_xdp_buff()
119 dma_addr = page_pool_get_dma_addr(page) + (xdpf->data - (void *)xdpf); in mlx5e_xmit_xdp_buff()
122 if (unlikely(xdp_frame_has_frags(xdpf))) { in mlx5e_xmit_xdp_buff()
123 sinfo = xdp_get_shared_info_from_frame(xdpf); in mlx5e_xmit_xdp_buff()
[all …]
/linux-6.1.9/drivers/net/ethernet/intel/ixgbe/
Dixgbe_xsk.c104 struct xdp_frame *xdpf; in ixgbe_run_xdp_zc() local
125 xdpf = xdp_convert_buff_to_frame(xdp); in ixgbe_run_xdp_zc()
126 if (unlikely(!xdpf)) in ixgbe_run_xdp_zc()
131 result = ixgbe_xmit_xdp_ring(ring, xdpf); in ixgbe_run_xdp_zc()
423 tx_bi->xdpf = NULL; in ixgbe_xmit_zc()
454 xdp_return_frame(tx_bi->xdpf); in ixgbe_clean_xdp_tx_buffer()
481 if (tx_bi->xdpf) in ixgbe_clean_xdp_tx_irq()
486 tx_bi->xdpf = NULL; in ixgbe_clean_xdp_tx_irq()
560 if (tx_bi->xdpf) in ixgbe_xsk_clean_tx_ring()
565 tx_bi->xdpf = NULL; in ixgbe_xsk_clean_tx_ring()
Dixgbe_txrx_common.h17 struct xdp_frame *xdpf);
/linux-6.1.9/drivers/net/ethernet/sfc/siena/
Dtx.c213 struct xdp_frame *xdpf; in efx_siena_xdp_tx_buffers() local
255 xdpf = xdpfs[i]; in efx_siena_xdp_tx_buffers()
263 len = xdpf->len; in efx_siena_xdp_tx_buffers()
267 xdpf->data, len, in efx_siena_xdp_tx_buffers()
274 tx_buffer->xdpf = xdpf; in efx_siena_xdp_tx_buffers()
Drx.c257 struct xdp_frame *xdpf; in efx_do_xdp() local
312 xdpf = xdp_convert_buff_to_frame(&xdp); in efx_do_xdp()
313 err = efx_siena_xdp_tx_buffers(efx, 1, &xdpf, true); in efx_do_xdp()
/linux-6.1.9/drivers/net/ethernet/freescale/dpaa/
Ddpaa_eth.c1706 xdp_return_frame(swbp->xdpf); in dpaa_cleanup_tx_fd()
2187 struct xdp_frame *new_xdpf, *xdpf = *init_xdpf; in dpaa_a050385_wa_xdpf() local
2201 if (PTR_IS_ALIGNED(xdpf->data, DPAA_FD_DATA_ALIGNMENT) && in dpaa_a050385_wa_xdpf()
2202 xdpf->headroom >= priv->tx_headroom) { in dpaa_a050385_wa_xdpf()
2203 xdpf->headroom = priv->tx_headroom; in dpaa_a050385_wa_xdpf()
2211 aligned_data = PTR_ALIGN_DOWN(xdpf->data, DPAA_FD_DATA_ALIGNMENT); in dpaa_a050385_wa_xdpf()
2212 data_shift = xdpf->data - aligned_data; in dpaa_a050385_wa_xdpf()
2217 if (xdpf->headroom >= data_shift + priv->tx_headroom) { in dpaa_a050385_wa_xdpf()
2218 memmove(aligned_data, xdpf->data, xdpf->len); in dpaa_a050385_wa_xdpf()
2219 xdpf->data = aligned_data; in dpaa_a050385_wa_xdpf()
[all …]
/linux-6.1.9/drivers/net/ethernet/fungible/funeth/
Dfuneth_tx.c501 xdp_return_frame(q->info[reclaim_idx].xdpf); in fun_xdpq_clean()
515 bool fun_xdp_tx(struct funeth_txq *q, struct xdp_frame *xdpf) in fun_xdp_tx() argument
517 unsigned int idx, nfrags = 1, ndesc = 1, tot_len = xdpf->len; in fun_xdp_tx()
526 if (unlikely(xdp_frame_has_frags(xdpf))) { in fun_xdp_tx()
527 si = xdp_get_shared_info_from_frame(xdpf); in fun_xdp_tx()
528 tot_len = xdp_get_frame_len(xdpf); in fun_xdp_tx()
540 if (unlikely(fun_map_pkt(q->dma_dev, si, xdpf->data, xdpf->len, dma, in fun_xdp_tx()
559 q->info[idx].xdpf = xdpf; in fun_xdp_tx()
619 xdp_return_frame(q->info[idx].xdpf); in fun_xdpq_purge()
Dfuneth_txrx.h100 struct xdp_frame *xdpf; /* associated XDP frame (XDP path) */ member
249 bool fun_xdp_tx(struct funeth_txq *q, struct xdp_frame *xdpf);
/linux-6.1.9/drivers/net/ethernet/ti/
Dcpsw_priv.c54 struct xdp_frame *xdpf; in cpsw_tx_handler() local
61 xdpf = cpsw_handle_to_xdpf(token); in cpsw_tx_handler()
62 xmeta = (void *)xdpf + CPSW_XMETA_OFFSET; in cpsw_tx_handler()
65 xdp_return_frame(xdpf); in cpsw_tx_handler()
1290 int cpsw_xdp_tx_frame(struct cpsw_priv *priv, struct xdp_frame *xdpf, in cpsw_xdp_tx_frame() argument
1299 xmeta = (void *)xdpf + CPSW_XMETA_OFFSET; in cpsw_xdp_tx_frame()
1306 dma += xdpf->headroom + sizeof(struct xdp_frame); in cpsw_xdp_tx_frame()
1307 ret = cpdma_chan_submit_mapped(txch, cpsw_xdpf_to_handle(xdpf), in cpsw_xdp_tx_frame()
1308 dma, xdpf->len, port); in cpsw_xdp_tx_frame()
1310 if (sizeof(*xmeta) > xdpf->headroom) in cpsw_xdp_tx_frame()
[all …]
/linux-6.1.9/drivers/net/ethernet/aquantia/atlantic/
Daq_ring.c349 } else if (buff->xdpf) { in aq_ring_tx_clean()
352 self->stats.tx.bytes += xdp_get_frame_len(buff->xdpf); in aq_ring_tx_clean()
354 xdp_return_frame_rx_napi(buff->xdpf); in aq_ring_tx_clean()
359 buff->xdpf = NULL; in aq_ring_tx_clean()
406 struct xdp_frame *xdpf = frames[i]; in aq_xdp_xmit() local
408 if (aq_nic_xmit_xdpf(aq_nic, ring, xdpf) == NETDEV_TX_BUSY) in aq_xdp_xmit()
422 struct xdp_frame *xdpf; in aq_xdp_run_prog() local
446 xdpf = xdp_convert_buff_to_frame(xdp); in aq_xdp_run_prog()
447 if (unlikely(!xdpf)) in aq_xdp_run_prog()
449 skb = xdp_build_skb_from_frame(xdpf, aq_nic->ndev); in aq_xdp_run_prog()
[all …]
Daq_nic.c571 struct xdp_frame *xdpf, in aq_nic_map_xdp() argument
587 sinfo = xdp_get_shared_info_from_frame(xdpf); in aq_nic_map_xdp()
588 total_len = xdpf->len; in aq_nic_map_xdp()
590 if (xdp_frame_has_frags(xdpf)) { in aq_nic_map_xdp()
594 dx_buff->pa = dma_map_single(dev, xdpf->data, dx_buff->len, in aq_nic_map_xdp()
644 dx_buff->xdpf = xdpf; in aq_nic_map_xdp()
795 dx_buff->xdpf = NULL; in aq_nic_map_skb()
825 struct xdp_frame *xdpf) in aq_nic_xmit_xdpf() argument
835 if (xdp_frame_has_frags(xdpf)) { in aq_nic_xmit_xdpf()
836 sinfo = xdp_get_shared_info_from_frame(xdpf); in aq_nic_xmit_xdpf()
[all …]
/linux-6.1.9/drivers/net/ethernet/socionext/
Dnetsec.c272 struct xdp_frame *xdpf; member
675 bytes += desc->xdpf->len; in netsec_clean_tx_dring()
677 xdp_return_frame_rx_napi(desc->xdpf); in netsec_clean_tx_dring()
679 xdp_return_frame_bulk(desc->xdpf, &bq); in netsec_clean_tx_dring()
821 dring->desc[idx].xdpf = buf; in netsec_set_tx_de()
829 struct xdp_frame *xdpf, bool is_ndo) in netsec_xdp_queue_one() argument
833 struct page *page = virt_to_page(xdpf->data); in netsec_xdp_queue_one()
851 dma_handle = dma_map_single(priv->dev, xdpf->data, xdpf->len, in netsec_xdp_queue_one()
865 dma_handle = page_pool_get_dma_addr(page) + xdpf->headroom + in netsec_xdp_queue_one()
866 sizeof(*xdpf); in netsec_xdp_queue_one()
[all …]
/linux-6.1.9/drivers/net/ethernet/intel/ice/
Dice_txrx_lib.c340 struct xdp_frame *xdpf = xdp_convert_buff_to_frame(xdp); in ice_xmit_xdp_buff() local
342 if (unlikely(!xdpf)) in ice_xmit_xdp_buff()
345 return ice_xmit_xdp_ring(xdpf->data, xdpf->len, xdp_ring); in ice_xmit_xdp_buff()
/linux-6.1.9/drivers/net/ethernet/sfc/
Dtx.c426 struct xdp_frame *xdpf; in efx_xdp_tx_buffers() local
468 xdpf = xdpfs[i]; in efx_xdp_tx_buffers()
476 len = xdpf->len; in efx_xdp_tx_buffers()
480 xdpf->data, len, in efx_xdp_tx_buffers()
487 tx_buffer->xdpf = xdpf; in efx_xdp_tx_buffers()
Drx.c257 struct xdp_frame *xdpf; in efx_do_xdp() local
312 xdpf = xdp_convert_buff_to_frame(&xdp); in efx_do_xdp()
313 err = efx_xdp_tx_buffers(efx, 1, &xdpf, true); in efx_do_xdp()
/linux-6.1.9/drivers/net/ethernet/qlogic/qede/
Dqede_fp.c305 u16 len, struct page *page, struct xdp_frame *xdpf) in qede_xdp_xmit() argument
332 xdp->xdpf = xdpf; in qede_xdp_xmit()
345 struct xdp_frame *xdpf; in qede_xdp_transmit() local
362 xdpf = frames[i]; in qede_xdp_transmit()
364 mapping = dma_map_single(dmadev, xdpf->data, xdpf->len, in qede_xdp_transmit()
369 if (unlikely(qede_xdp_xmit(xdp_tx, mapping, 0, xdpf->len, in qede_xdp_transmit()
370 NULL, xdpf))) in qede_xdp_transmit()
404 struct xdp_frame *xdpf; in qede_xdp_tx_int() local
412 xdpf = xdp_info->xdpf; in qede_xdp_tx_int()
414 if (xdpf) { in qede_xdp_tx_int()
[all …]
/linux-6.1.9/drivers/net/ethernet/broadcom/bnxt/
Dbnxt_xdp.c117 struct xdp_frame *xdpf) in __bnxt_xmit_xdp_redirect() argument
123 tx_buf->xdpf = xdpf; in __bnxt_xmit_xdp_redirect()
148 xdp_return_frame(tx_buf->xdpf); in bnxt_tx_int_xdp()
150 tx_buf->xdpf = NULL; in bnxt_tx_int_xdp()
/linux-6.1.9/drivers/net/ethernet/intel/i40e/
Di40e_xsk.c572 xdp_return_frame(tx_bi->xdpf); in i40e_clean_xdp_tx_buffer()
612 if (tx_bi->xdpf) { in i40e_clean_xdp_tx_irq()
614 tx_bi->xdpf = NULL; in i40e_clean_xdp_tx_irq()
711 if (tx_bi->xdpf) in i40e_xsk_clean_tx_ring()
716 tx_bi->xdpf = NULL; in i40e_xsk_clean_tx_ring()
Di40e_txrx.c763 xdp_return_frame(tx_buffer->xdpf); in i40e_unmap_and_free_tx_resource()
969 xdp_return_frame(tx_buf->xdpf); in i40e_clean_tx_irq()
2271 static int i40e_xmit_xdp_ring(struct xdp_frame *xdpf,
2276 struct xdp_frame *xdpf = xdp_convert_buff_to_frame(xdp); in i40e_xmit_xdp_tx_ring() local
2278 if (unlikely(!xdpf)) in i40e_xmit_xdp_tx_ring()
2281 return i40e_xmit_xdp_ring(xdpf, xdp_ring); in i40e_xmit_xdp_tx_ring()
3712 static int i40e_xmit_xdp_ring(struct xdp_frame *xdpf, in i40e_xmit_xdp_ring() argument
3715 struct skb_shared_info *sinfo = xdp_get_shared_info_from_frame(xdpf); in i40e_xmit_xdp_ring()
3716 u8 nr_frags = unlikely(xdp_frame_has_frags(xdpf)) ? sinfo->nr_frags : 0; in i40e_xmit_xdp_ring()
3721 void *data = xdpf->data; in i40e_xmit_xdp_ring()
[all …]
/linux-6.1.9/drivers/net/ethernet/amazon/ena/
Dena_netdev.c237 struct xdp_frame *xdpf, in ena_xdp_tx_map_frame() argument
247 tx_info->xdpf = xdpf; in ena_xdp_tx_map_frame()
248 data = tx_info->xdpf->data; in ena_xdp_tx_map_frame()
249 size = tx_info->xdpf->len; in ena_xdp_tx_map_frame()
293 struct xdp_frame *xdpf, in ena_xdp_xmit_frame() argument
306 rc = ena_xdp_tx_map_frame(xdp_ring, tx_info, xdpf, &ena_tx_ctx); in ena_xdp_xmit_frame()
317 xdpf->len); in ena_xdp_xmit_frame()
331 tx_info->xdpf = NULL; in ena_xdp_xmit_frame()
380 struct xdp_frame *xdpf; in ena_xdp_execute() local
392 xdpf = xdp_convert_buff_to_frame(xdp); in ena_xdp_execute()
[all …]
/linux-6.1.9/drivers/net/
Dvirtio_net.c566 struct xdp_frame *xdpf) in __virtnet_xdp_xmit_one() argument
571 if (unlikely(xdpf->headroom < vi->hdr_len)) in __virtnet_xdp_xmit_one()
575 xdpf->data -= vi->hdr_len; in __virtnet_xdp_xmit_one()
577 hdr = xdpf->data; in __virtnet_xdp_xmit_one()
579 xdpf->len += vi->hdr_len; in __virtnet_xdp_xmit_one()
581 sg_init_one(sq->sg, xdpf->data, xdpf->len); in __virtnet_xdp_xmit_one()
583 err = virtqueue_add_outbuf(sq->vq, sq->sg, 1, xdp_to_ptr(xdpf), in __virtnet_xdp_xmit_one()
676 struct xdp_frame *xdpf = frames[i]; in virtnet_xdp_xmit() local
678 if (__virtnet_xdp_xmit_one(vi, sq, xdpf)) in virtnet_xdp_xmit()
810 struct xdp_frame *xdpf; in receive_small() local
[all …]

123