Lines Matching refs:dp
9 static inline dma_addr_t nfp_net_dma_map_rx(struct nfp_net_dp *dp, void *frag) in nfp_net_dma_map_rx() argument
11 return dma_map_single_attrs(dp->dev, frag + NFP_NET_RX_BUF_HEADROOM, in nfp_net_dma_map_rx()
12 dp->fl_bufsz - NFP_NET_RX_BUF_NON_DATA, in nfp_net_dma_map_rx()
13 dp->rx_dma_dir, DMA_ATTR_SKIP_CPU_SYNC); in nfp_net_dma_map_rx()
17 nfp_net_dma_sync_dev_rx(const struct nfp_net_dp *dp, dma_addr_t dma_addr) in nfp_net_dma_sync_dev_rx() argument
19 dma_sync_single_for_device(dp->dev, dma_addr, in nfp_net_dma_sync_dev_rx()
20 dp->fl_bufsz - NFP_NET_RX_BUF_NON_DATA, in nfp_net_dma_sync_dev_rx()
21 dp->rx_dma_dir); in nfp_net_dma_sync_dev_rx()
24 static inline void nfp_net_dma_unmap_rx(struct nfp_net_dp *dp, in nfp_net_dma_unmap_rx() argument
27 dma_unmap_single_attrs(dp->dev, dma_addr, in nfp_net_dma_unmap_rx()
28 dp->fl_bufsz - NFP_NET_RX_BUF_NON_DATA, in nfp_net_dma_unmap_rx()
29 dp->rx_dma_dir, DMA_ATTR_SKIP_CPU_SYNC); in nfp_net_dma_unmap_rx()
32 static inline void nfp_net_dma_sync_cpu_rx(struct nfp_net_dp *dp, in nfp_net_dma_sync_cpu_rx() argument
36 dma_sync_single_for_cpu(dp->dev, dma_addr - NFP_NET_RX_BUF_HEADROOM, in nfp_net_dma_sync_cpu_rx()
37 len, dp->rx_dma_dir); in nfp_net_dma_sync_cpu_rx()
64 nfp_net_read_tx_cmpl(struct nfp_net_tx_ring *tx_ring, struct nfp_net_dp *dp) in nfp_net_read_tx_cmpl() argument
103 void *nfp_net_rx_alloc_one(struct nfp_net_dp *dp, dma_addr_t *dma_addr);
104 int nfp_net_rx_rings_prepare(struct nfp_net *nn, struct nfp_net_dp *dp);
105 int nfp_net_tx_rings_prepare(struct nfp_net *nn, struct nfp_net_dp *dp);
106 void nfp_net_rx_rings_free(struct nfp_net_dp *dp);
107 void nfp_net_tx_rings_free(struct nfp_net_dp *dp);
148 void (*rx_ring_fill_freelist)(struct nfp_net_dp *dp,
150 int (*tx_ring_alloc)(struct nfp_net_dp *dp,
152 void (*tx_ring_reset)(struct nfp_net_dp *dp,
155 int (*tx_ring_bufs_alloc)(struct nfp_net_dp *dp,
157 void (*tx_ring_bufs_free)(struct nfp_net_dp *dp,
167 nfp_net_tx_ring_reset(struct nfp_net_dp *dp, struct nfp_net_tx_ring *tx_ring) in nfp_net_tx_ring_reset() argument
169 return dp->ops->tx_ring_reset(dp, tx_ring); in nfp_net_tx_ring_reset()
173 nfp_net_rx_ring_fill_freelist(struct nfp_net_dp *dp, in nfp_net_rx_ring_fill_freelist() argument
176 dp->ops->rx_ring_fill_freelist(dp, rx_ring); in nfp_net_rx_ring_fill_freelist()
180 nfp_net_tx_ring_alloc(struct nfp_net_dp *dp, struct nfp_net_tx_ring *tx_ring) in nfp_net_tx_ring_alloc() argument
182 return dp->ops->tx_ring_alloc(dp, tx_ring); in nfp_net_tx_ring_alloc()
186 nfp_net_tx_ring_free(struct nfp_net_dp *dp, struct nfp_net_tx_ring *tx_ring) in nfp_net_tx_ring_free() argument
188 dp->ops->tx_ring_free(tx_ring); in nfp_net_tx_ring_free()
192 nfp_net_tx_ring_bufs_alloc(struct nfp_net_dp *dp, in nfp_net_tx_ring_bufs_alloc() argument
195 return dp->ops->tx_ring_bufs_alloc(dp, tx_ring); in nfp_net_tx_ring_bufs_alloc()
199 nfp_net_tx_ring_bufs_free(struct nfp_net_dp *dp, in nfp_net_tx_ring_bufs_free() argument
202 dp->ops->tx_ring_bufs_free(dp, tx_ring); in nfp_net_tx_ring_bufs_free()
206 nfp_net_debugfs_print_tx_descs(struct seq_file *file, struct nfp_net_dp *dp, in nfp_net_debugfs_print_tx_descs() argument
211 dp->ops->print_tx_descs(file, r_vec, tx_ring, d_rd_p, d_wr_p); in nfp_net_debugfs_print_tx_descs()