]> git.baikalelectronics.ru Git - kernel.git/commit
virtio_net: avoid (most) NETDEV_TX_BUSY by stopping queue early.
authorRusty Russell <rusty@rustcorp.com.au>
Thu, 24 Sep 2009 15:59:20 +0000 (09:59 -0600)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 24 Sep 2009 00:29:20 +0000 (09:59 +0930)
commite93d646a6c3ef84a9b1081139aac6be48c4f581c
tree451e84e09afc37ed6f8dc262b40bd88106883410
parent6c18efc2bf74db31fc57a7c011e58469ca7ee8f0
virtio_net: avoid (most) NETDEV_TX_BUSY by stopping queue early.

Now we can tell the theoretical capacity remaining in the output
queue, virtio_net can waste entries by stopping the queue early.

It doesn't work in the case of indirect buffers and kmalloc failure,
but that's rare (we could drop the packet in that case, but other
drivers return TX_BUSY for similar reasons).

For the record, I think this patch reflects poorly on the linux
network API.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Dinesh Subhraveti <dineshs@us.ibm.com>
drivers/net/virtio_net.c