virtio_net: delay TX callbacks
authorMichael S. Tsirkin <mst@redhat.com>
Thu, 19 May 2011 23:11:23 +0000 (02:11 +0300)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 30 May 2011 01:44:16 +0000 (11:14 +0930)
Ask for delayed callbacks on TX ring full, to give the
other side more of a chance to make progress.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
drivers/net/virtio_net.c

index 0cb0b0632672ac877c927195bde052a2d38f9ecf..f6853247a620046a12e9dab53c9e4f3adcf4d2b2 100644 (file)
@@ -609,7 +609,7 @@ static netdev_tx_t start_xmit(struct sk_buff *skb, struct net_device *dev)
         * before it gets out of hand.  Naturally, this wastes entries. */
        if (capacity < 2+MAX_SKB_FRAGS) {
                netif_stop_queue(dev);
-               if (unlikely(!virtqueue_enable_cb(vi->svq))) {
+               if (unlikely(!virtqueue_enable_cb_delayed(vi->svq))) {
                        /* More just got used, free them then recheck. */
                        capacity += free_old_xmit_skbs(vi);
                        if (capacity >= 2+MAX_SKB_FRAGS) {