vhost: refactor Rx
authorYuanhan Liu <yuanhan.liu@linux.intel.com>
Thu, 10 Mar 2016 04:32:40 +0000 (12:32 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 14 Mar 2016 22:55:06 +0000 (23:55 +0100)
commit282a94ba9984fee25e4101f3e0de89ea558e2e47
tree41e5e058445b0334c271f896bbc5f0ab6d0fb001
parentbc7f87a2c19fc0dbc877baa5d0ef26de392e2f1b
vhost: refactor Rx

This is a simple refactor, as there isn't any twisted logic in old
code. Here I just broke the code and introduced two helper functions,
reserve_avail_buf() and copy_mbuf_to_desc() to make the code more
readable.

Also, it saves nearly 1K bytes of binary code size.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
lib/librte_vhost/vhost_rxtx.c