Commit 7a66f784 authored by Michael S. Tsirkin's avatar Michael S. Tsirkin Committed by Rusty Russell

virtio_net: delay TX callbacks

Ask for delayed callbacks on TX ring full, to give the
other side more of a chance to make progress.
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 7ab358c2
...@@ -609,7 +609,7 @@ static netdev_tx_t start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -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. */ * before it gets out of hand. Naturally, this wastes entries. */
if (capacity < 2+MAX_SKB_FRAGS) { if (capacity < 2+MAX_SKB_FRAGS) {
netif_stop_queue(dev); 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. */ /* More just got used, free them then recheck. */
capacity += free_old_xmit_skbs(vi); capacity += free_old_xmit_skbs(vi);
if (capacity >= 2+MAX_SKB_FRAGS) { if (capacity >= 2+MAX_SKB_FRAGS) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment