* [dpdk-dev] [PATCH] net/virtio-user: strip VIRTIO_NET_F_MAC when MAC isn't specified
@ 2018-05-11 10:55 Tiwei Bie
2018-05-16 11:08 ` Maxime Coquelin
0 siblings, 1 reply; 3+ messages in thread
From: Tiwei Bie @ 2018-05-11 10:55 UTC (permalink / raw)
To: maxime.coquelin; +Cc: dev
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] net/virtio-user: strip VIRTIO_NET_F_MAC when MAC isn't specified
2018-05-11 10:55 [dpdk-dev] [PATCH] net/virtio-user: strip VIRTIO_NET_F_MAC when MAC isn't specified Tiwei Bie
@ 2018-05-16 11:08 ` Maxime Coquelin
2018-05-16 14:36 ` Maxime Coquelin
0 siblings, 1 reply; 3+ messages in thread
From: Maxime Coquelin @ 2018-05-16 11:08 UTC (permalink / raw)
To: Tiwei Bie; +Cc: dev
On 05/11/2018 12:55 PM, Tiwei Bie wrote:
> 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(+)
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thanks,
Maxime
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] net/virtio-user: strip VIRTIO_NET_F_MAC when MAC isn't specified
2018-05-16 11:08 ` Maxime Coquelin
@ 2018-05-16 14:36 ` Maxime Coquelin
0 siblings, 0 replies; 3+ messages in thread
From: Maxime Coquelin @ 2018-05-16 14:36 UTC (permalink / raw)
To: Tiwei Bie; +Cc: dev
On 05/16/2018 01:08 PM, Maxime Coquelin wrote:
>
>
> On 05/11/2018 12:55 PM, Tiwei Bie wrote:
>> 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(+)
>
> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Applied to dpdk-next-virtio/master with commit message reworded to:
net/virtio-user: strip MAC feature when none specified
Thanks,
Maxime
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-05-16 14:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-11 10:55 [dpdk-dev] [PATCH] net/virtio-user: strip VIRTIO_NET_F_MAC when MAC isn't specified Tiwei Bie
2018-05-16 11:08 ` Maxime Coquelin
2018-05-16 14:36 ` Maxime Coquelin
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).