virtio_net: fix oom handling on tx
authorRusty Russell <rusty@rustcorp.com.au>
Fri, 2 Jul 2010 16:34:01 +0000 (16:34 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 3 Jul 2010 05:27:26 +0000 (22:27 -0700)
commit58eba97d0774c69b1cf3e5a8ac74419409d1abbf
tree985ad7b05c0b4952ff76f83dfab87f18466ebe4f
parent1788f49548860fa1c861ee3454d47b466c877e43
virtio_net: fix oom handling on tx

virtio net will never try to overflow the TX ring, so the only reason
add_buf may fail is out of memory. Thus, we can not stop the
device until some request completes - there's no guarantee anything
at all is outstanding.

Make the error message clearer as well: error here does not
indicate queue full.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (...and avoid TX_BUSY)
Cc: stable@kernel.org # .34.x (s/virtqueue_/vi->svq->vq_ops->/)
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/virtio_net.c