netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@mellanox.com>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"andrew@lunn.ch" <andrew@lunn.ch>,
	"vivien.didelot@gmail.com" <vivien.didelot@gmail.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	Jiri Pirko <jiri@mellanox.com>,
	"ilias.apalodimas@linaro.org" <ilias.apalodimas@linaro.org>,
	"ivan.khoronzhuk@linaro.org" <ivan.khoronzhuk@linaro.org>,
	"roopa@cumulusnetworks.com" <roopa@cumulusnetworks.com>,
	"nikolay@cumulusnetworks.com" <nikolay@cumulusnetworks.com>
Subject: Re: [PATCH net-next 10/14] net: vlan: Propagate MC addresses with VID through switchdev
Date: Mon, 21 Jan 2019 09:13:01 +0000	[thread overview]
Message-ID: <20190121091259.GB10994@splinter> (raw)
In-Reply-To: <026a9003-63cd-ab28-5e43-819f6fa5c1f8@gmail.com>

On Thu, Jan 17, 2019 at 11:12:24AM -0800, Florian Fainelli wrote:
> On 1/17/19 6:49 AM, Ido Schimmel wrote:
> > On Wed, Jan 16, 2019 at 12:00:58PM -0800, Florian Fainelli wrote:
> >> The VLAN real device could be an Ethernet switch port and that switch
> >> might have VLAN filtering globally enabled (because of a bridge
> >> requesting VLAN filtering on the switch on another port) and so when
> >> programming multicast addresses, we need the multicast filter
> >> programming to be aware of the correct VLAN ID as well.
> > 
> > This looks like a quirk of a specific device. How bad is it to patch the
> > driver to add a multicast address for every configured VLAN?
> 
> There is at least another driver that can be benefit from that which is
> cpsw, if I understand Ivan's use case correctly.

I understand and I have no argument against the need for this. I just
think we should use a different mechanism than switchdev.

> If there is a ndo_set_rx_mode() function implemented by the virtual
> device, and that does call dev_{mc,uc}_sync(master, dev), then this
> means that you do want to be able to filter UC and MC addresses. If we
> added the entire class D range of multicast addresses to the switch's
> MDB, that would not be filtering, we would be passing up everything to
> the stack and let it filter in software because there is no multicast
> socket listening on that address.

OK.

> > Also, I think it's weird that we have one API to program address and a
> > completely different API (via switchdev) to program address+VID pairs.
> > Extending current API might make more sense.
> > 
> 
> Do you mean ndo_set_rx_mode() and dev_mc_sync()? That is what Ivan
> proposed doing not so long ago here:
> 
> https://www.spinics.net/lists/netdev/msg537424.html
> 
> but that is IMHO wasting storage space, because the kernel is
> maintaining the address lists, and now also needs to gain knowledge
> about the VID. With up to 4K - 2 VLAN interfaces per switch port, this
> bloats the memory footprint, we arguably still need to maintain those
> address lists anyway...

I didn't review Ivan's changes in details, but it makes much more sense
to me to simply extend the current Rx filtering mechanism than to use a
completely unrelated infrastructure.

> 
> The reason why I chose switchdev here is because:
> 
> - this is mostly relevant for switch devices, not so much for NICs (it
> seems), if it was, they would have solved the problem by now

I don't see any use of switchdev APIs in the driver Ivan is patching.
The cover letter doesn't indicate anything about it either.

> - this allows to have an unified path from the switch driver perspective
> to program MDB addresses targeting the CPU/management port, no need to
> have X different ways of doing the same operation

But it's not the same thing. Allowing certain packets to ingress the
device is not the same as having the device send them to the CPU. We
have VLAN filters as well. Allowing VID X to ingress does not mean that
we trap each packet with this VID to CPU.

  reply	other threads:[~2019-01-21  9:13 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-16 20:00 [PATCH net-next 00/14] net: dsa: management mode for bcm_sf2 Florian Fainelli
2019-01-16 20:00 ` [PATCH net-next 01/14] net: bridge: multicast: Propagate br_mc_disabled_update() return Florian Fainelli
2019-01-17 13:47   ` Ido Schimmel
2019-01-17 19:27     ` Florian Fainelli
2019-01-16 20:00 ` [PATCH net-next 02/14] net: dsa: b53: Fix default VLAN ID Florian Fainelli
2019-01-16 20:00 ` [PATCH net-next 03/14] net: dsa: b53: Properly account for VLAN filtering Florian Fainelli
2019-01-17 16:36   ` Vivien Didelot
2019-01-17 17:48     ` Florian Fainelli
2019-01-17 18:47       ` Vivien Didelot
2019-01-17 19:06         ` Florian Fainelli
2019-01-16 20:00 ` [PATCH net-next 04/14] net: systemport: Fix reception of BPDUs Florian Fainelli
2019-01-16 20:00 ` [PATCH net-next 05/14] net: dsa: b53: Define registers for IGMP snooping Florian Fainelli
2019-01-16 20:00 ` [PATCH net-next 06/14] net: dsa: b53: Add support for MDB Florian Fainelli
2019-01-16 20:00 ` [PATCH net-next 07/14] net: dsa: Add ability to program multicast filter for CPU port Florian Fainelli
2019-01-16 20:00 ` [PATCH net-next 08/14] net: dsa: Add ndo_vlan_rx_{add,kill}_vid implementation Florian Fainelli
2019-01-16 20:00 ` [PATCH net-next 09/14] net: bridge: Propagate MC addresses with VID through switchdev Florian Fainelli
2019-01-17 14:05   ` Ido Schimmel
2019-01-17 19:17     ` Florian Fainelli
2019-01-18 10:43       ` Ido Schimmel
2019-01-18 11:41       ` Ido Schimmel
2019-01-18 21:48         ` Florian Fainelli
2019-01-19 13:55           ` Ido Schimmel
2019-01-20  3:22             ` Florian Fainelli
2019-01-21  8:41               ` Ido Schimmel
2019-01-21  8:46         ` Jiri Pirko
2019-01-16 20:00 ` [PATCH net-next 10/14] net: vlan: " Florian Fainelli
2019-01-17 14:49   ` Ido Schimmel
2019-01-17 19:12     ` Florian Fainelli
2019-01-21  9:13       ` Ido Schimmel [this message]
2019-01-21  9:17         ` Ilias Apalodimas
2019-01-22 11:30         ` Ivan Khoronzhuk
2019-01-22 11:39       ` Ivan Khoronzhuk
2019-01-16 20:00 ` [PATCH net-next 11/14] net: dsa: Make VLAN filtering use DSA notifiers Florian Fainelli
2019-01-16 20:01 ` [PATCH net-next 12/14] net: dsa: Wire up multicast IGMP snooping attribute notification Florian Fainelli
2019-01-17 18:36   ` Vivien Didelot
2019-01-17 19:07     ` Florian Fainelli
2019-01-16 20:01 ` [PATCH net-next 13/14] net: dsa: b53: Add support for toggling IGMP snooping Florian Fainelli
2019-01-16 20:01 ` [PATCH net-next 14/14] net: dsa: bcm_sf2: Enable management mode Florian Fainelli

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=20190121091259.GB10994@splinter \
    --to=idosch@mellanox.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=ivan.khoronzhuk@linaro.org \
    --cc=jiri@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@cumulusnetworks.com \
    --cc=roopa@cumulusnetworks.com \
    --cc=vivien.didelot@gmail.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).