virtio_net: Check for room in the vq before adding buffer
authorAmit Shah <amit.shah@redhat.com>
Wed, 26 Aug 2009 09:28:28 +0000 (14:28 +0530)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 24 Sep 2009 00:29:21 +0000 (09:29 +0930)
commit0aea51c37fc5868cd723f670af9056c2ef694fee
tree9fee50abd200decd4b02350e4f1aed0cccc3a976
parent48925e372f04f5e35fec6269127c62b2c71ab794
virtio_net: Check for room in the vq before adding buffer

Saves us one cycle of alloc-add-free if the queue was full.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (modified)
drivers/net/virtio_net.c