[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190529221523.22399-7-bigeasy@linutronix.de>
Date: Thu, 30 May 2019 00:15:22 +0200
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: netdev@...r.kernel.org
Cc: tglx@...utronix.de, "David S. Miller" <davem@...emloft.net>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Siva Reddy Kallam <siva.kallam@...adcom.com>,
Prashant Sreedharan <prashant@...adcom.com>,
Michael Chan <mchan@...adcom.com>
Subject: [PATCH net-next 6/7] tg3: Use napi_alloc_frag()
tg3_alloc_rx_data() uses netdev_alloc_frag() for sbk allocation. All
callers of tg3_alloc_rx_data() either hold the tp->lock lock (which is
held with BH disabled) or run in NAPI context.
Use napi_alloc_frag() for skb allocations.
Cc: Siva Reddy Kallam <siva.kallam@...adcom.com>
Cc: Prashant Sreedharan <prashant@...adcom.com>
Cc: Michael Chan <mchan@...adcom.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
---
drivers/net/ethernet/broadcom/tg3.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index 6d1f9c822548e..4c404d2213f98 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -6710,7 +6710,7 @@ static int tg3_alloc_rx_data(struct tg3 *tp, struct tg3_rx_prodring_set *tpr,
skb_size = SKB_DATA_ALIGN(data_size + TG3_RX_OFFSET(tp)) +
SKB_DATA_ALIGN(sizeof(struct skb_shared_info));
if (skb_size <= PAGE_SIZE) {
- data = netdev_alloc_frag(skb_size);
+ data = napi_alloc_frag(skb_size);
*frag_size = skb_size;
} else {
data = kmalloc(skb_size, GFP_ATOMIC);
--
2.20.1
Powered by blists - more mailing lists