net/virtio-user: fix feature setting with vhost-net backend
authorJiayu Hu <jiayu.hu@intel.com>
Fri, 11 May 2018 07:26:07 +0000 (15:26 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 17 May 2018 10:28:54 +0000 (12:28 +0200)
commit6e1e59045715113815ea6a377e6e58945f291e0d
treebc634a95547a4f2d624a46468242c9cf40783371
parent08b7521c352952e4abe8cd6ed9e5e5084d5cfa9a
net/virtio-user: fix feature setting with vhost-net backend

When the backend is vhost-net, virtio-user must work in client mode and
needs to request features from the backend in virtio_user_dev_init().
But currently, virtio-user is assigned to default features in this case.

This patch is to fix this inappropriate feature setting.

Fixes: bd8f50a45d0f ("net/virtio-user: support server mode")

Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Tested-by: Lei Yao <lei.a.yao@intel.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Zhiyong Yang <zhiyong.yang@intel.com>
drivers/net/virtio/virtio_user/virtio_user_dev.c