From: Stephen Hemminger <stephen@networkplumber.org>
To: Rusty Russell <rusty@rustcorp.com.au>,
"Michael S. Tsirkin" <mst@redhat.com>,
David Miller <davem@davemloft.net>
Cc: virtualization@lists.linux-foundation.org, netdev@vger.kernel.org
Subject: [PATCH net-next] virtio: change comment in transmit
Date: Tue, 24 Mar 2015 16:22:07 -0700 [thread overview]
Message-ID: <20150324162207.6d4ecf48@urahara> (raw)
The original comment was not really informative or funny
as well as sexist. Replace it with a better explanation of
why the driver does stop and what the impacts are.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
--- a/drivers/net/virtio_net.c 2015-03-24 15:20:25.174671000 -0700
+++ b/drivers/net/virtio_net.c 2015-03-24 16:17:28.478525333 -0700
@@ -939,8 +939,12 @@ static netdev_tx_t start_xmit(struct sk_
skb_orphan(skb);
nf_reset(skb);
- /* Apparently nice girls don't return TX_BUSY; stop the queue
- * before it gets out of hand. Naturally, this wastes entries. */
+ /* It is better to stop queue if running out of space
+ * instead of forcing queuing layer to requeue the skb
+ * by returning TX_BUSY (and cause a BUG message).
+ * Since most packets only take 1 or 2 ring slots
+ * this means 16 slots are typically wasted.
+ */
if (sq->vq->num_free < 2+MAX_SKB_FRAGS) {
netif_stop_subqueue(dev, qnum);
if (unlikely(!virtqueue_enable_cb_delayed(sq->vq))) {
next reply other threads:[~2015-03-24 23:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-24 23:22 Stephen Hemminger [this message]
2015-03-25 1:23 ` [PATCH net-next] virtio: change comment in transmit David Miller
2015-03-25 3:59 ` Rusty Russell
2015-03-25 4:34 ` David Miller
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=20150324162207.6d4ecf48@urahara \
--to=stephen@networkplumber.org \
--cc=davem@davemloft.net \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=virtualization@lists.linux-foundation.org \
/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