Lines Matching refs:wr_idx

238 	int f, nr_frags, wr_idx, md_bytes;  in nfp_nfd3_tx()  local
286 wr_idx = D_IDX(tx_ring, tx_ring->wr_p); in nfp_nfd3_tx()
289 txbuf = &tx_ring->txbufs[wr_idx]; in nfp_nfd3_tx()
297 txd = &tx_ring->txds[wr_idx]; in nfp_nfd3_tx()
331 wr_idx = D_IDX(tx_ring, wr_idx + 1); in nfp_nfd3_tx()
332 tx_ring->txbufs[wr_idx].skb = skb; in nfp_nfd3_tx()
333 tx_ring->txbufs[wr_idx].dma_addr = dma_addr; in nfp_nfd3_tx()
334 tx_ring->txbufs[wr_idx].fidx = f; in nfp_nfd3_tx()
336 txd = &tx_ring->txds[wr_idx]; in nfp_nfd3_tx()
366 dma_unmap_page(dp->dev, tx_ring->txbufs[wr_idx].dma_addr, in nfp_nfd3_tx()
368 tx_ring->txbufs[wr_idx].skb = NULL; in nfp_nfd3_tx()
369 tx_ring->txbufs[wr_idx].dma_addr = 0; in nfp_nfd3_tx()
370 tx_ring->txbufs[wr_idx].fidx = -2; in nfp_nfd3_tx()
371 wr_idx = wr_idx - 1; in nfp_nfd3_tx()
372 if (wr_idx < 0) in nfp_nfd3_tx()
373 wr_idx += tx_ring->cnt; in nfp_nfd3_tx()
375 dma_unmap_single(dp->dev, tx_ring->txbufs[wr_idx].dma_addr, in nfp_nfd3_tx()
377 tx_ring->txbufs[wr_idx].skb = NULL; in nfp_nfd3_tx()
378 tx_ring->txbufs[wr_idx].dma_addr = 0; in nfp_nfd3_tx()
379 tx_ring->txbufs[wr_idx].fidx = -2; in nfp_nfd3_tx()
567 unsigned int wr_idx; in nfp_nfd3_rx_give_one() local
569 wr_idx = D_IDX(rx_ring, rx_ring->wr_p); in nfp_nfd3_rx_give_one()
574 rx_ring->rxbufs[wr_idx].frag = frag; in nfp_nfd3_rx_give_one()
575 rx_ring->rxbufs[wr_idx].dma_addr = dma_addr; in nfp_nfd3_rx_give_one()
578 rx_ring->rxds[wr_idx].fld.reserved = 0; in nfp_nfd3_rx_give_one()
579 rx_ring->rxds[wr_idx].fld.meta_len_dd = 0; in nfp_nfd3_rx_give_one()
584 nfp_desc_set_dma_addr_48b(&rx_ring->rxds[wr_idx].fld, in nfp_nfd3_rx_give_one()
811 int wr_idx; in nfp_nfd3_tx_xdp_buf() local
830 wr_idx = D_IDX(tx_ring, tx_ring->wr_p); in nfp_nfd3_tx_xdp_buf()
833 txbuf = &tx_ring->txbufs[wr_idx]; in nfp_nfd3_tx_xdp_buf()
847 txd = &tx_ring->txds[wr_idx]; in nfp_nfd3_tx_xdp_buf()
1177 int wr_idx; in nfp_nfd3_ctrl_tx_one() local
1214 wr_idx = D_IDX(tx_ring, tx_ring->wr_p); in nfp_nfd3_ctrl_tx_one()
1217 txbuf = &tx_ring->txbufs[wr_idx]; in nfp_nfd3_ctrl_tx_one()
1225 txd = &tx_ring->txds[wr_idx]; in nfp_nfd3_ctrl_tx_one()