net/virtio-user: fix protocol features advertising
authorOlivier Matz <olivier.matz@6wind.com>
Fri, 18 Dec 2020 13:23:52 +0000 (14:23 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 8 Jan 2021 17:07:55 +0000 (18:07 +0100)
commitc3243eb5a88c59fba9334ace253068c35fc16894
tree7265e046a05b43c97f835cd1385cacf7e865310f
parent97ed740c3498afab4162cb85492cd3109e21c604
net/virtio-user: fix protocol features advertising

When connected to a vhost-user backend, the flag
VHOST_USER_F_PROTOCOL_FEATURES is not advertised, preventing to do
multiqueue (the VHOST_USER_PROTOCOL_F_MQ protocol feature is ignored by
some backends if the VHOST_USER_F_PROTOCOL_FEATURES feature is not set).

When setting vhost-user features, advertise this flag if it was
advertised by our peer.

Fixes: 8e7561054ac7 ("net/virtio: support vhost-user protocol features")
Cc: stable@dpdk.org
Suggested-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
drivers/net/virtio/virtio_user/vhost_user.c