Commit d78005a5 authored by Jakub Kicinski's avatar Jakub Kicinski Committed by David S. Miller

nfp: drop rx_ring param from buffer allocation

We will soon allocate RX buffers for caching on XDP TX rings.
The rx_ring parameter passed to nfp_net_rx_alloc_one() is not
actually used, remove it.
Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 46c50518
...@@ -1153,16 +1153,13 @@ nfp_net_free_frag(void *frag, bool xdp) ...@@ -1153,16 +1153,13 @@ nfp_net_free_frag(void *frag, bool xdp)
/** /**
* nfp_net_rx_alloc_one() - Allocate and map page frag for RX * nfp_net_rx_alloc_one() - Allocate and map page frag for RX
* @dp: NFP Net data path struct * @dp: NFP Net data path struct
* @rx_ring: RX ring structure of the skb
* @dma_addr: Pointer to storage for DMA address (output param) * @dma_addr: Pointer to storage for DMA address (output param)
* *
* This function will allcate a new page frag, map it for DMA. * This function will allcate a new page frag, map it for DMA.
* *
* Return: allocated page frag or NULL on failure. * Return: allocated page frag or NULL on failure.
*/ */
static void * static void *nfp_net_rx_alloc_one(struct nfp_net_dp *dp, dma_addr_t *dma_addr)
nfp_net_rx_alloc_one(struct nfp_net_dp *dp, struct nfp_net_rx_ring *rx_ring,
dma_addr_t *dma_addr)
{ {
void *frag; void *frag;
...@@ -1317,8 +1314,7 @@ nfp_net_rx_ring_bufs_alloc(struct nfp_net_dp *dp, ...@@ -1317,8 +1314,7 @@ nfp_net_rx_ring_bufs_alloc(struct nfp_net_dp *dp,
rxbufs = rx_ring->rxbufs; rxbufs = rx_ring->rxbufs;
for (i = 0; i < rx_ring->cnt - 1; i++) { for (i = 0; i < rx_ring->cnt - 1; i++) {
rxbufs[i].frag = rxbufs[i].frag = nfp_net_rx_alloc_one(dp, &rxbufs[i].dma_addr);
nfp_net_rx_alloc_one(dp, rx_ring, &rxbufs[i].dma_addr);
if (!rxbufs[i].frag) { if (!rxbufs[i].frag) {
nfp_net_rx_ring_bufs_free(dp, rx_ring); nfp_net_rx_ring_bufs_free(dp, rx_ring);
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment