From: Tiwei Bie Date: Fri, 11 May 2018 10:55:42 +0000 (+0800) Subject: net/virtio-user: strip MAC feature when none specified X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=0230e058e99cf74428232e3904f700407027a0e9;p=dpdk.git net/virtio-user: strip MAC feature when none specified Currently VIRTIO_NET_F_MAC is set unconditionally when server mode is used. It should be stripped when MAC isn't specified. Fixes: bd8f50a45d0f ("net/virtio-user: support server mode") Signed-off-by: Tiwei Bie Reviewed-by: Maxime Coquelin --- diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c index 566c3251ac..aff01f5870 100644 --- a/drivers/net/virtio/virtio_user/virtio_user_dev.c +++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c @@ -421,6 +421,8 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues, if (dev->mac_specified) dev->device_features |= (1ull << VIRTIO_NET_F_MAC); + else + dev->device_features &= ~(1ull << VIRTIO_NET_F_MAC); if (cq) { /* device does not really need to know anything about CQ,