All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: netdev@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	maxime.coquelin@redhat.com, wexu@redhat.com,
	"David S. Miller" <davem@davemloft.net>
Subject: [PATCH RFC 2/2] virtio_net: bulk free tx skbs
Date: Wed, 5 Dec 2018 17:54:24 -0500	[thread overview]
Message-ID: <20181205225323.12555-3-mst__45531.4067811289$1544050369$gmane$org@redhat.com> (raw)
In-Reply-To: <20181205225323.12555-1-mst@redhat.com>

Use napi_consume_skb() to get bulk free.  Note that napi_consume_skb is
safe to call in a non-napi context as long as the napi_budget flag is
correct.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 drivers/net/virtio_net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index b657bde6b94b..18c06322be40 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -1339,7 +1339,7 @@ static void free_old_xmit_skbs(struct send_queue *sq, struct netdev_queue *txq,
 		bytes += skb->len;
 		packets++;
 
-		dev_consume_skb_any(skb);
+		napi_consume_skb(skb, use_napi);
 	}
 
 	/* Avoid overhead when no packets have been processed
-- 
MST

  parent reply	other threads:[~2018-12-05 22:54 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-05 22:54 [PATCH RFC 0/2] virtio-net: interrupt related improvements Michael S. Tsirkin
2018-12-05 22:54 ` [PATCH RFC 1/2] virtio-net: bql support Michael S. Tsirkin
2018-12-05 22:54 ` Michael S. Tsirkin
2018-12-06  8:17   ` Jason Wang
2018-12-06  8:17   ` Jason Wang
2018-12-06  8:31     ` Jason Wang
2018-12-06  8:31     ` Jason Wang
2018-12-06  8:31       ` Jason Wang
2018-12-26 15:15     ` Michael S. Tsirkin
2018-12-26 15:15       ` Michael S. Tsirkin
2018-12-27  9:56       ` Jason Wang
2018-12-27  9:56         ` Jason Wang
2018-12-26 15:19     ` Michael S. Tsirkin
2018-12-26 15:19       ` Michael S. Tsirkin
2018-12-27 10:00       ` Jason Wang
2018-12-27 10:00         ` Jason Wang
2018-12-30 18:45         ` Michael S. Tsirkin
2019-01-02  3:28           ` Jason Wang
2019-01-02  3:28             ` Jason Wang
2019-01-02 13:59             ` Michael S. Tsirkin
2019-01-02 13:59               ` Michael S. Tsirkin
2019-01-07  2:14               ` Jason Wang
2019-01-07  3:17                 ` Michael S. Tsirkin
2019-01-07  3:17                   ` Michael S. Tsirkin
2019-01-07  3:51                   ` Jason Wang
2019-01-07  3:51                     ` Jason Wang
2019-01-07  4:01                     ` Michael S. Tsirkin
2019-01-07  4:01                       ` Michael S. Tsirkin
2019-01-07  6:31                       ` Jason Wang
2019-01-07  6:31                         ` Jason Wang
2019-01-07 14:19                         ` Michael S. Tsirkin
2019-01-08 10:06                           ` Jason Wang
2019-01-08 10:06                             ` Jason Wang
2019-01-07 14:19                         ` Michael S. Tsirkin
2019-01-07  2:14               ` Jason Wang
2018-12-30 18:45         ` Michael S. Tsirkin
2018-12-26 15:22     ` Michael S. Tsirkin
2018-12-26 15:22     ` Michael S. Tsirkin
2018-12-27 10:04       ` Jason Wang
2018-12-30 18:48         ` Michael S. Tsirkin
2018-12-30 18:48         ` Michael S. Tsirkin
2019-01-02  3:30           ` Jason Wang
2019-01-02  3:30             ` Jason Wang
2019-01-02 13:54             ` Michael S. Tsirkin
2019-01-02 13:54               ` Michael S. Tsirkin
2019-01-17 13:09               ` Jason Wang
2019-01-17 13:09               ` Jason Wang
2018-12-27 10:04       ` Jason Wang
2018-12-05 22:54 ` Michael S. Tsirkin [this message]
2018-12-05 22:54 ` [PATCH RFC 2/2] virtio_net: bulk free tx skbs Michael S. Tsirkin

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='20181205225323.12555-3-mst__45531.4067811289$1544050369$gmane$org@redhat.com' \
    --to=mst@redhat.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxime.coquelin@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=wexu@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.