Lines Matching full:xdp

28 				   struct xdp_buff *xdp)  in bnxt_xmit_bd()  argument
38 if (xdp && xdp_buff_has_frags(xdp)) { in bnxt_xmit_bd()
39 sinfo = xdp_get_shared_info_from_buff(xdp); in bnxt_xmit_bd()
47 if (xdp) in bnxt_xmit_bd()
48 tx_buf->page = virt_to_head_page(xdp->data); in bnxt_xmit_bd()
97 struct xdp_buff *xdp) in __bnxt_xmit_xdp() argument
101 tx_buf = bnxt_xmit_bd(bp, txr, mapping, len, xdp); in __bnxt_xmit_xdp()
184 struct xdp_buff *xdp) in bnxt_xdp_buff_init() argument
199 xdp_init_buff(xdp, buflen, &rxr->xdp_rxq); in bnxt_xdp_buff_init()
200 xdp_prepare_buff(xdp, data_ptr - offset, offset, len, false); in bnxt_xdp_buff_init()
204 struct xdp_buff *xdp) in bnxt_xdp_buff_frags_free() argument
209 if (!xdp || !xdp_buff_has_frags(xdp)) in bnxt_xdp_buff_frags_free()
211 shinfo = xdp_get_shared_info_from_buff(xdp); in bnxt_xdp_buff_frags_free()
221 * true - packet consumed by XDP and new buffer is allocated.
225 struct xdp_buff xdp, struct page *page, u8 **data_ptr, in bnxt_rx_xdp() argument
246 /* BNXT_RX_PAGE_MODE(bp) when XDP enabled */ in bnxt_rx_xdp()
247 orig_data = xdp.data; in bnxt_rx_xdp()
249 act = bpf_prog_run_xdp(xdp_prog, &xdp); in bnxt_rx_xdp()
258 *len = xdp.data_end - xdp.data; in bnxt_rx_xdp()
259 if (orig_data != xdp.data) { in bnxt_rx_xdp()
260 offset = xdp.data - xdp.data_hard_start; in bnxt_rx_xdp()
261 *data_ptr = xdp.data_hard_start + offset; in bnxt_rx_xdp()
273 if (unlikely(xdp_buff_has_frags(&xdp))) { in bnxt_rx_xdp()
274 struct skb_shared_info *sinfo = xdp_get_shared_info_from_buff(&xdp); in bnxt_rx_xdp()
282 bnxt_xdp_buff_frags_free(rxr, &xdp); in bnxt_rx_xdp()
292 NEXT_RX(rxr->rx_prod), &xdp); in bnxt_rx_xdp()
304 bnxt_xdp_buff_frags_free(rxr, &xdp); in bnxt_rx_xdp()
309 if (xdp_do_redirect(bp->dev, &xdp, xdp_prog)) { in bnxt_rx_xdp()
324 bnxt_xdp_buff_frags_free(rxr, &xdp); in bnxt_rx_xdp()
358 struct xdp_frame *xdp = frames[i]; in bnxt_xdp_xmit() local
363 mapping = dma_map_single(&pdev->dev, xdp->data, xdp->len, in bnxt_xdp_xmit()
369 __bnxt_xmit_xdp_redirect(bp, txr, mapping, xdp->len, xdp); in bnxt_xdp_xmit()
394 netdev_warn(dev, "MTU %d larger than %d without XDP frag support.\n", in bnxt_xdp_set()
399 netdev_warn(dev, "ethtool rx/tx channels must be combined to support XDP.\n"); in bnxt_xdp_set()
411 netdev_warn(dev, "Unable to reserve enough TX rings to support XDP.\n"); in bnxt_xdp_set()
447 int bnxt_xdp(struct net_device *dev, struct netdev_bpf *xdp) in bnxt_xdp() argument
452 switch (xdp->command) { in bnxt_xdp()
454 rc = bnxt_xdp_set(bp, xdp->prog); in bnxt_xdp()
465 struct page_pool *pool, struct xdp_buff *xdp) in bnxt_xdp_build_skb() argument
467 struct skb_shared_info *sinfo = xdp_get_shared_info_from_buff(xdp); in bnxt_xdp_build_skb()
475 xdp_buff_is_frag_pfmemalloc(xdp)); in bnxt_xdp_build_skb()