From: Jiri Wiesner <jwiesner@suse.com>
To: netdev@vger.kernel.org
Cc: Mahesh Bandewar <maheshb@google.com>
Subject: ipvlan forces promisc mode on vmxnet3 master
Date: Fri, 18 Oct 2019 13:33:29 +0200 [thread overview]
Message-ID: <08cbc498-4e21-4e8e-260f-29831db07510@suse.com> (raw)
There is a problem when ipvlan slaves are created on a master device
that is a vmxnet3 device (ipvlan in VMware guests). The vmxnet3 driver
does not support unicast address filtering. When ipvlan_open() brings up
an ipvlan device, the ipvlan driver calls dev_uc_add() to add the
hardware address of the vmxnet3 master device to the unicast address
list, phy_dev->uc. This inevitably leads to the master device being
forced into promiscuous mode by __dev_set_rx_mode().
I have, so far, failed to find any purpose in calling dev_uc_add() from
ipvlan_open(). Promiscuous mode is switched on the master despite the
fact that there is still only one hardware address that the master
device should use for filtering. The comment above struct net_device
describes the uc_promisc member as a "counter, that indicates, that
promiscuous mode has been enabled due to the need to listen to
additional unicast addresses in a device that does not implement
ndo_set_rx_mode()". Moreover, the design of ipvlan guarantees that only
the hardware address of a master device, phy_dev->dev_addr, will be used
to transmit and receive all packets from its slaves.
So, my question is: Could removing the calls to dev_uc_add() and
dev_uc_del() from ipvlan_open() and ipvlan_stop(), respectively, be a
viable solution for cases when the ipvlan driver is used with a master
device that does not support unicast filtering?
Kind Regards,
Jiri
reply other threads:[~2019-10-18 11:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=08cbc498-4e21-4e8e-260f-29831db07510@suse.com \
--to=jwiesner@suse.com \
--cc=maheshb@google.com \
--cc=netdev@vger.kernel.org \
/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).