[dpdk-dev] [PATCH] net/virtio-user: strip VIRTIO_NET_F_MAC when MAC isn't specified
Tiwei Bie
tiwei.bie at intel.com
Fri May 11 12:55:42 CEST 2018
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 <tiwei.bie at intel.com>
---
drivers/net/virtio/virtio_user/virtio_user_dev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index 38b8bc90d..d31f895f2 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -378,6 +378,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,
--
2.11.0
More information about the dev
mailing list