linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] r8152: replace netdev_alloc_skb_ip_align with napi_alloc_skb
@ 2016-06-08  6:52 Hayes Wang
  2016-06-10  6:38 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Hayes Wang @ 2016-06-08  6:52 UTC (permalink / raw)
  To: netdev; +Cc: nic_swsd, linux-kernel, linux-usb, Hayes Wang

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] r8152: replace netdev_alloc_skb_ip_align with napi_alloc_skb
  2016-06-08  6:52 [PATCH net-next] r8152: replace netdev_alloc_skb_ip_align with napi_alloc_skb Hayes Wang
@ 2016-06-10  6:38 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-06-10  6:38 UTC (permalink / raw)
  To: hayeswang; +Cc: netdev, nic_swsd, linux-kernel, linux-usb

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-06-10  6:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-08  6:52 [PATCH net-next] r8152: replace netdev_alloc_skb_ip_align with napi_alloc_skb Hayes Wang
2016-06-10  6:38 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).