virtio: clean up Tx space checks
authorStephen Hemminger <stephen@networkplumber.org>
Fri, 4 Dec 2015 01:12:54 +0000 (17:12 -0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 7 Dec 2015 00:03:12 +0000 (01:03 +0100)
commit43ffe8aa8641ac30899f3e8ab58c2672fa3acf51
treea393ed5e31bb7897d92e9ba8ac0aa49e91dc6fb1
parentc21835fab8efc40dc180a4add29c5adf14bdfebf
virtio: clean up Tx space checks

The space check for transmit ring only needs a single conditional.
I.e only need to recheck for space if there was no space in first check.

This can help performance and simplifies loop.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
drivers/net/virtio/virtio_rxtx.c