From: Tiwei Bie <tiwei.bie@intel.com>
To: maxime.coquelin@redhat.com
Cc: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] net/virtio-user: strip VIRTIO_NET_F_MAC when MAC isn't specified
Date: Fri, 11 May 2018 18:55:42 +0800 [thread overview]
Message-ID: <20180511105542.18395-1-tiwei.bie@intel.com> (raw)
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@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
next reply other threads:[~2018-05-11 10:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-11 10:55 Tiwei Bie [this message]
2018-05-16 11:08 ` Maxime Coquelin
2018-05-16 14:36 ` Maxime Coquelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180511105542.18395-1-tiwei.bie@intel.com \
--to=tiwei.bie@intel.com \
--cc=dev@dpdk.org \
--cc=maxime.coquelin@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).