[PATCH net-next] r8152: replace netdev_alloc_skb_ip_align with napi_alloc_skb

Subsystems: networking drivers, the rest, usb networking drivers

STALE3709d

2 messages, 2 authors, 2016-06-10 · open the first message on its own page

[PATCH net-next] r8152: replace netdev_alloc_skb_ip_align with napi_alloc_skb

From: Hayes Wang <hidden>
Date: 2016-06-08 06:53:08

Replace netdev_alloc_skb_ip_align() with napi_alloc_skb() which can save
several CPU cycles by avoiding having to disable and re-enable IRQs.

Signed-off-by: Hayes Wang <redacted>
---
 drivers/net/usb/r8152.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 3f9f6ed..161c25e 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -1742,7 +1742,7 @@ static int rx_bottom(struct r8152 *tp, int budget)
 			pkt_len -= CRC_SIZE;
 			rx_data += sizeof(struct rx_desc);
 
-			skb = netdev_alloc_skb_ip_align(netdev, pkt_len);
+			skb = napi_alloc_skb(&tp->napi, pkt_len);
 			if (!skb) {
 				stats->rx_dropped++;
 				goto find_next_rx;
-- 
2.4.11

Re: [PATCH net-next] r8152: replace netdev_alloc_skb_ip_align with napi_alloc_skb

From: David Miller <davem@davemloft.net>
Date: 2016-06-10 06:38:37

From: Hayes Wang <redacted>
Date: Wed, 8 Jun 2016 14:52:33 +0800
Replace netdev_alloc_skb_ip_align() with napi_alloc_skb() which can save
several CPU cycles by avoiding having to disable and re-enable IRQs.

Signed-off-by: Hayes Wang <redacted>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help