Lines Matching refs:rxbuf
809 struct nfp_net_rx_ring *rx_ring, struct nfp_net_rx_buf *rxbuf, in nfp_nfdk_rx_drop() argument
817 if (skb && rxbuf) in nfp_nfdk_rx_drop()
824 if (skb && rxbuf && skb->head == rxbuf->frag) in nfp_nfdk_rx_drop()
825 page_ref_inc(virt_to_head_page(rxbuf->frag)); in nfp_nfdk_rx_drop()
826 if (rxbuf) in nfp_nfdk_rx_drop()
827 nfp_nfdk_rx_give_one(dp, rx_ring, rxbuf->frag, rxbuf->dma_addr); in nfp_nfdk_rx_drop()
898 struct nfp_net_rx_buf *rxbuf, unsigned int dma_off, in nfp_nfdk_tx_xdp_buf() argument
924 nfp_nfdk_rx_drop(dp, rx_ring->r_vec, rx_ring, rxbuf, in nfp_nfdk_tx_xdp_buf()
952 txbuf[0].val = (unsigned long)rxbuf->frag | NFDK_TX_BUF_INFO_SOP; in nfp_nfdk_tx_xdp_buf()
953 txbuf[1].dma_addr = rxbuf->dma_addr; in nfp_nfdk_tx_xdp_buf()
956 dma_sync_single_for_device(dp->dev, rxbuf->dma_addr + dma_off, in nfp_nfdk_tx_xdp_buf()
962 dma_addr = rxbuf->dma_addr + dma_off; in nfp_nfdk_tx_xdp_buf()
1045 struct nfp_net_rx_buf *rxbuf; in nfp_nfdk_rx() local
1070 rxbuf = &rx_ring->rxbufs[idx]; in nfp_nfdk_rx()
1104 nfp_nfdk_rx_drop(dp, r_vec, rx_ring, rxbuf, NULL); in nfp_nfdk_rx()
1108 nfp_net_dma_sync_cpu_rx(dp, rxbuf->dma_addr + meta_off, in nfp_nfdk_rx()
1113 rxbuf->frag + meta_off, in nfp_nfdk_rx()
1114 rxbuf->frag + pkt_off, in nfp_nfdk_rx()
1117 nfp_nfdk_rx_drop(dp, r_vec, rx_ring, rxbuf, in nfp_nfdk_rx()
1124 void *orig_data = rxbuf->frag + pkt_off; in nfp_nfdk_rx()
1129 rxbuf->frag + NFP_NET_RX_BUF_HEADROOM, in nfp_nfdk_rx()
1146 rxbuf, in nfp_nfdk_rx()
1160 nfp_nfdk_rx_give_one(dp, rx_ring, rxbuf->frag, in nfp_nfdk_rx()
1161 rxbuf->dma_addr); in nfp_nfdk_rx()
1171 nfp_app_ctrl_rx_raw(nn->app, rxbuf->frag + pkt_off, in nfp_nfdk_rx()
1173 nfp_nfdk_rx_give_one(dp, rx_ring, rxbuf->frag, in nfp_nfdk_rx()
1174 rxbuf->dma_addr); in nfp_nfdk_rx()
1183 nfp_nfdk_rx_drop(dp, r_vec, rx_ring, rxbuf, in nfp_nfdk_rx()
1192 skb = build_skb(rxbuf->frag, true_bufsz); in nfp_nfdk_rx()
1194 nfp_nfdk_rx_drop(dp, r_vec, rx_ring, rxbuf, NULL); in nfp_nfdk_rx()
1199 nfp_nfdk_rx_drop(dp, r_vec, rx_ring, rxbuf, skb); in nfp_nfdk_rx()
1203 nfp_net_dma_unmap_rx(dp, rxbuf->dma_addr); in nfp_nfdk_rx()
1481 struct nfp_net_rx_buf *rxbuf; in nfp_ctrl_rx_one() local
1501 rxbuf = &rx_ring->rxbufs[idx]; in nfp_ctrl_rx_one()
1519 nfp_net_dma_sync_cpu_rx(dp, rxbuf->dma_addr + meta_off, data_len); in nfp_ctrl_rx_one()
1521 if (unlikely(!nfp_ctrl_meta_ok(nn, rxbuf->frag + meta_off, meta_len))) { in nfp_ctrl_rx_one()
1524 nfp_nfdk_rx_drop(dp, r_vec, rx_ring, rxbuf, NULL); in nfp_ctrl_rx_one()
1528 skb = build_skb(rxbuf->frag, dp->fl_bufsz); in nfp_ctrl_rx_one()
1530 nfp_nfdk_rx_drop(dp, r_vec, rx_ring, rxbuf, NULL); in nfp_ctrl_rx_one()
1535 nfp_nfdk_rx_drop(dp, r_vec, rx_ring, rxbuf, skb); in nfp_ctrl_rx_one()
1539 nfp_net_dma_unmap_rx(dp, rxbuf->dma_addr); in nfp_ctrl_rx_one()