vhost: simplify numa reallocation
authorYuanhan Liu <yuanhan.liu@linux.intel.com>
Thu, 10 Mar 2016 04:20:00 +0000 (12:20 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Fri, 11 Mar 2016 15:49:17 +0000 (16:49 +0100)
commit78ffdaff06811587bb0ae9a10c1cd60111d3f031
treed07a482cf24772d25c15941629bf12ecf8a83c2b
parent45ca9c6f7bc65313f338b5baee84f2af5f28536d
vhost: simplify numa reallocation

We could first check if we need realloc vq or not, if so,
reallocate it. We then do similar to vhost dev realloc.

This could get rid of the tons of repeated "if (realloc_dev)"
and "if (realloc_vq)" statements, therefore, makes code
a bit more readable.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Huawei Xie <huawei.xie@intel.com>
lib/librte_vhost/virtio-net.c