aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/netronome
diff options
context:
space:
mode:
authorJakub Kicinski <jakub.kicinski@netronome.com>2017-04-28 00:06:16 -0400
committerDavid S. Miller <davem@davemloft.net>2017-04-30 22:37:00 -0400
commitd78005a50f306edb000f0994f0470f151915cf90 (patch)
tree16fe7a38bb5e24a91fb67e6be3ec411c0b7422ee /drivers/net/ethernet/netronome
parent46c505188b788c050d28174c6e726835e057bb28 (diff)
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: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/netronome')
-rw-r--r--drivers/net/ethernet/netronome/nfp/nfp_net_common.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
index 0e87b446e98f..fc0652d175fc 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
+++ b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
@@ -1153,16 +1153,13 @@ nfp_net_free_frag(void *frag, bool xdp)
1153/** 1153/**
1154 * nfp_net_rx_alloc_one() - Allocate and map page frag for RX 1154 * nfp_net_rx_alloc_one() - Allocate and map page frag for RX
1155 * @dp: NFP Net data path struct 1155 * @dp: NFP Net data path struct
1156 * @rx_ring: RX ring structure of the skb
1157 * @dma_addr: Pointer to storage for DMA address (output param) 1156 * @dma_addr: Pointer to storage for DMA address (output param)
1158 * 1157 *
1159 * This function will allcate a new page frag, map it for DMA. 1158 * This function will allcate a new page frag, map it for DMA.
1160 * 1159 *
1161 * Return: allocated page frag or NULL on failure. 1160 * Return: allocated page frag or NULL on failure.
1162 */ 1161 */
1163static void * 1162static void *nfp_net_rx_alloc_one(struct nfp_net_dp *dp, dma_addr_t *dma_addr)
1164nfp_net_rx_alloc_one(struct nfp_net_dp *dp, struct nfp_net_rx_ring *rx_ring,
1165 dma_addr_t *dma_addr)
1166{ 1163{
1167 void *frag; 1164 void *frag;
1168 1165
@@ -1317,8 +1314,7 @@ nfp_net_rx_ring_bufs_alloc(struct nfp_net_dp *dp,
1317 rxbufs = rx_ring->rxbufs; 1314 rxbufs = rx_ring->rxbufs;
1318 1315
1319 for (i = 0; i < rx_ring->cnt - 1; i++) { 1316 for (i = 0; i < rx_ring->cnt - 1; i++) {
1320 rxbufs[i].frag = 1317 rxbufs[i].frag = nfp_net_rx_alloc_one(dp, &rxbufs[i].dma_addr);
1321 nfp_net_rx_alloc_one(dp, rx_ring, &rxbufs[i].dma_addr);
1322 if (!rxbufs[i].frag) { 1318 if (!rxbufs[i].frag) {
1323 nfp_net_rx_ring_bufs_free(dp, rx_ring); 1319 nfp_net_rx_ring_bufs_free(dp, rx_ring);
1324 return -ENOMEM; 1320 return -ENOMEM;