vhost: simplify mergeable Rx vring reservation
authorYuanhan Liu <yuanhan.liu@linux.intel.com>
Fri, 14 Oct 2016 09:34:34 +0000 (17:34 +0800)
committerYuanhan Liu <yuanhan.liu@linux.intel.com>
Wed, 26 Oct 2016 11:39:09 +0000 (13:39 +0200)
commit3f9e48f7da9cd930541bd13b863c9fba0b1128cb
treea232d8d8e9e8ca9abbe45707cdf3c8838891522c
parente7ef688562b69076e79ca132de05cb0be732792d
vhost: simplify mergeable Rx vring reservation

Let it return "num_buffers" we reserved, so that we could re-use it
with copy_mbuf_to_desc_mergeable() directly, instead of calculating
it again there.

Meanwhile, the return type of copy_mbuf_to_desc_mergeable is changed
to "int". -1 will be return on error.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
Reviewed-by: Jianbo Liu <jianbo.liu@linaro.org>
Tested-by: Maxime Coquelin <maxime.coquelin@redhat.com>
lib/librte_vhost/virtio_net.c