vhost: prevent zero-copy with incompatible client mode
authorXuan Ding <xuan.ding@intel.com>
Wed, 29 Apr 2020 02:59:46 +0000 (02:59 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 5 May 2020 13:54:26 +0000 (15:54 +0200)
commit715070ea10e6da1169deef2a3ea77ae934b4c333
treea3070d4e5414f69073f59879f4884e85e30a56fc
parentccb10995c2ad0b2ef6319e6447e735b5464baa7c
vhost: prevent zero-copy with incompatible client mode

In server mode, virtio-user inits under the assumption that vhost-user
supports a list of features. However, this could be problematic when
in_order feature is negotiated but not supported by vhost-user when
enables dequeue_zero_copy later.

Add handling when vhost-user enables dequeue_zero_copy as client.

Fixes: 64ab701c3d1e ("vhost: add vhost-user client mode")
Cc: stable@dpdk.org
Signed-off-by: Xuan Ding <xuan.ding@intel.com>
Tested-by: Yinan Wang <yinan.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
lib/librte_vhost/socket.c