diff options
author | stephen hemminger <stephen@networkplumber.org> | 2015-03-25 00:22:07 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-25 02:22:50 +0100 |
commit | d631b94e7a15277858ec5f88d674d93080506999 (patch) | |
tree | d991a9677e8f980e2194b3bd226d79f03e0db640 /drivers/net/virtio_net.c | |
parent | tools: bpf_asm: cleanup vlan extension related token (diff) | |
download | linux-d631b94e7a15277858ec5f88d674d93080506999.tar.xz linux-d631b94e7a15277858ec5f88d674d93080506999.zip |
virtio: change comment in transmit
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/virtio_net.c')
-rw-r--r-- | drivers/net/virtio_net.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 59b0e9754ae3..4e84236b62ce 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -939,8 +939,12 @@ static netdev_tx_t start_xmit(struct sk_buff *skb, struct net_device *dev) 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))) { |