From: Jianfeng Tan Date: Thu, 13 Apr 2017 14:16:24 +0000 (+0000) Subject: net/virtio-user: fix net status report X-Git-Tag: spdx-start~3503 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=4bf9e26d29caccda42d77601b26791e146d08d9a;hp=bed3b24c87cb7fb63d24d16d65b911fe14525d82;p=dpdk.git net/virtio-user: fix net status report We only enabled LSC when using vhost-user as the backend, but it is reported even when using vhost-kernel as the backend. Fix it by only reportting LSC support when using vhost-user as the backend. Fixes: 35c4f8554833 ("net/virtio-user: support to report net status") Signed-off-by: Jianfeng Tan --- diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c index 299ee16355..c9e8ac5b16 100644 --- a/drivers/net/virtio/virtio_user/virtio_user_dev.c +++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c @@ -379,7 +379,8 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues, } /* The backend will not report this feature, we add it explicitly */ - dev->device_features |= (1ull << VIRTIO_NET_F_STATUS); + if (is_vhost_user_by_type(dev->path)) + dev->device_features |= (1ull << VIRTIO_NET_F_STATUS); dev->device_features &= VIRTIO_USER_SUPPORTED_FEATURES;