netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Heiner Kallweit <hkallweit1@gmail.com>
To: Realtek linux nic maintainers <nic_swsd@realtek.com>,
	David Miller <davem@davemloft.net>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Jesper Dangaard Brouer <brouer@redhat.com>,
	Edward Cree <ecree@solarflare.com>
Subject: [PATCH net-next] r8169: use netif_receive_skb_list batching
Date: Sun, 31 Mar 2019 15:18:48 +0200	[thread overview]
Message-ID: <c6a9f1a8-7dba-5807-b5b2-0468280d50a4@gmail.com> (raw)

Use netif_receive_skb_list() instead of napi_gro_receive() to benefit
from batched skb processing.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/net/ethernet/realtek/r8169.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index a8ca26c2a..c9ee1c8eb 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -6426,6 +6426,7 @@ static int rtl_rx(struct net_device *dev, struct rtl8169_private *tp, u32 budget
 {
 	unsigned int cur_rx, rx_left;
 	unsigned int count;
+	LIST_HEAD(rx_list);
 
 	cur_rx = tp->cur_rx;
 
@@ -6501,7 +6502,7 @@ static int rtl_rx(struct net_device *dev, struct rtl8169_private *tp, u32 budget
 			if (skb->pkt_type == PACKET_MULTICAST)
 				dev->stats.multicast++;
 
-			napi_gro_receive(&tp->napi, skb);
+			list_add_tail(&skb->list, &rx_list);
 
 			u64_stats_update_begin(&tp->rx_stats.syncp);
 			tp->rx_stats.packets++;
@@ -6516,6 +6517,8 @@ static int rtl_rx(struct net_device *dev, struct rtl8169_private *tp, u32 budget
 	count = cur_rx - tp->cur_rx;
 	tp->cur_rx = cur_rx;
 
+	netif_receive_skb_list(&rx_list);
+
 	return count;
 }
 
-- 
2.21.0


             reply	other threads:[~2019-03-31 13:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-31 13:18 Heiner Kallweit [this message]
2019-03-31 18:11 ` [PATCH net-next] r8169: use netif_receive_skb_list batching David Miller
2019-04-01  9:17   ` Eric Dumazet
2019-04-01 12:53     ` Jesper Dangaard Brouer
2019-04-01 17:41       ` David Miller
2019-04-01 21:33         ` Eric Dumazet
2019-04-01 17:14     ` David Miller
2019-04-01 17:31       ` Edward Cree
2019-04-01 17:39         ` Heiner Kallweit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c6a9f1a8-7dba-5807-b5b2-0468280d50a4@gmail.com \
    --to=hkallweit1@gmail.com \
    --cc=brouer@redhat.com \
    --cc=davem@davemloft.net \
    --cc=ecree@solarflare.com \
    --cc=netdev@vger.kernel.org \
    --cc=nic_swsd@realtek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).