Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1416938 > unrolled thread

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

Started byHayes Wang <hayeswang@realtek.com>
First post2016-06-08 09:00 +0200
Last post2016-06-10 08:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH net-next] r8152: replace netdev_alloc_skb_ip_align with napi_alloc_skb Hayes Wang <hayeswang@realtek.com> - 2016-06-08 09:00 +0200
    Re: [PATCH net-next] r8152: replace netdev_alloc_skb_ip_align with  napi_alloc_skb David Miller <davem@davemloft.net> - 2016-06-10 08:40 +0200

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

FromHayes Wang <hayeswang@realtek.com>
Date2016-06-08 09:00 +0200
Subject[PATCH net-next] r8152: replace netdev_alloc_skb_ip_align with napi_alloc_skb
Message-ID<rHFD4-58f-13@gated-at.bofh.it>
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 <hayeswang@realtek.com>
---
 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

[toc] | [next] | [standalone]


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

FromDavid Miller <davem@davemloft.net>
Date2016-06-10 08:40 +0200
SubjectRe: [PATCH net-next] r8152: replace netdev_alloc_skb_ip_align with napi_alloc_skb
Message-ID<rIogN-16D-7@gated-at.bofh.it>
In reply to#1416938
From: Hayes Wang <hayeswang@realtek.com>
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 <hayeswang@realtek.com>

Applied.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web