vhost: do deep copy while reallocating queue
authorJunjie Chen <junjie.j.chen@intel.com>
Mon, 15 Jan 2018 11:32:19 +0000 (06:32 -0500)
committerFerruh Yigit <ferruh.yigit@intel.com>
Sun, 21 Jan 2018 14:51:52 +0000 (15:51 +0100)
commit2651726defb7385669fc0538fa7185d290342035
tree36abde39d54dc3c672899b9f833efd5d4462d9e3
parentc97da2cbc2c294c89ea548811be56b658cd359cc
vhost: do deep copy while reallocating queue

When vhost reallocate dev and vq for NUMA enabled case, it doesn't perform
deep copy, which lead to 1) zmbuf list not valid 2) remote memory access.
This patch is to re-initlize the zmbuf list and also do the deep copy.

Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
Reviewed-by: Zhiyong Yang <zhiyong.yang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
lib/librte_vhost/vhost_user.c