Lines Matching refs: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, true); 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()
225 struct xdp_buff *xdp, struct page *page, u8 **data_ptr, in bnxt_rx_xdp() argument
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()
448 int bnxt_xdp(struct net_device *dev, struct netdev_bpf *xdp) in bnxt_xdp() argument
453 switch (xdp->command) { in bnxt_xdp()
455 rc = bnxt_xdp_set(bp, xdp->prog); in bnxt_xdp()
466 struct page_pool *pool, struct xdp_buff *xdp, in bnxt_xdp_build_skb() argument
469 struct skb_shared_info *sinfo = xdp_get_shared_info_from_buff(xdp); in bnxt_xdp_build_skb()
483 xdp_buff_is_frag_pfmemalloc(xdp)); in bnxt_xdp_build_skb()