From: Andrew Lunn <andrew@lunn.ch>
To: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Cc: David Miller <davem@davemloft.net>,
netdev <netdev@vger.kernel.org>,
Florian Fainelli <f.fainelli@gmail.com>
Subject: Re: [PATCH v3 net-next 0/5] IGMP snooping for local traffic
Date: Tue, 7 Nov 2017 18:42:22 +0100 [thread overview]
Message-ID: <20171107174222.GA15028@lunn.ch> (raw)
In-Reply-To: <87d14ut405.fsf@weeman.i-did-not-set--mail-host-address--so-tickle-me>
On Tue, Nov 07, 2017 at 12:03:54PM -0500, Vivien Didelot wrote:
> Hi Andrew,
>
> Andrew Lunn <andrew@lunn.ch> writes:
>
> > Then starts the work passing down to the hardware that the host has
> > joined/left a group. The existing switchdev mdb object cannot be used,
> > since the semantics are different. The existing
> > SWITCHDEV_OBJ_ID_PORT_MDB is used to indicate a specific multicast
> > group should be forwarded out that port of the switch. However here we
> > require the exact opposite. We want multicast frames for the group
> > received on the port to the forwarded to the host. Hence add a new
> > object SWITCHDEV_OBJ_ID_HOST_MDB, a multicast database entry to
> > forward to the host. This new object is then propagated through the
> > DSA layers. No DSA driver changes should be needed, this should just
> > work...
>
> The patchset looks good. I would like to ask you some details though,
> because I don't understand why the semantics are different.
>
> Technically, what happens is that an MDB entry is programmed on the
> bridge interface. From the _bridge point of view_, there is no technical
> difference as in programming an MDB entry on a bridged port. Correct?
Hi Vivien
It is not quite as simple as that. Image:
brctl addbr br0
brctl addif br0 eth2
brctl addif br0 lan0
where eth2 is just a regular ethernet interface. Say there is a join
received on eth2 for group 224.42.42.42. The IGMP snooping code in the
software bridge then needs to tell lan0 to forward all multicast
traffic for 224.42.42.42 to the software bridge, so it can forward it
to eth2. The br0 interface is not involved.
Now, my patchset is not implementing this use case. But at some point,
we probably will want to implement it. We want a generic switchdev API
which says forward all the traffic for a group to the host. The host
will then decide what to do with it.
Now, your suggestion would be to pass br0 for the use case i'm
implementing here. And we could pass eth2 for the above use cases. But
for the hardware offload, it does not matter what interface the frames
are heading towards. All the offload needs to know is that the host
software bridge wants the frames.
Multicast is often special in that you need to specify where the
frames are coming from, not where they are going to. This makes the
semantics different. And you need to keep the differences clear,
otherwise you quickly get confused. Using a different API should be a
clear warning. Be careful, the semantics are different. Re-using an
existing API, and needing to carefully look at the parameters to know
you need to do something completed different is just asking for
trouble.
Andrew
next prev parent reply other threads:[~2017-11-07 17:42 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-06 23:26 [PATCH v3 net-next 0/5] IGMP snooping for local traffic Andrew Lunn
2017-11-06 23:26 ` [PATCH v3 net-next 1/5] net: bridge: Rename mglist to host_joined Andrew Lunn
2017-11-08 1:31 ` Nikolay Aleksandrov
2017-11-08 1:40 ` Florian Fainelli
2017-11-06 23:26 ` [PATCH v3 net-next 2/5] net: bridge: Send notification when host join/leaves a group Andrew Lunn
2017-11-08 1:39 ` Nikolay Aleksandrov
2017-11-08 1:41 ` Florian Fainelli
2017-11-06 23:26 ` [PATCH v3 net-next 3/5] net: bridge: Add/del switchdev object on host join/leave Andrew Lunn
2017-11-08 1:48 ` Nikolay Aleksandrov
2017-11-06 23:26 ` [PATCH v3 net-next 4/5] net: dsa: slave: Handle switchdev host mdb add/del Andrew Lunn
2017-11-06 23:26 ` [PATCH v3 net-next 5/5] net: dsa: switch: Don't add CPU port to an mdb by default Andrew Lunn
2017-11-07 10:12 ` Sergei Shtylyov
2017-11-07 1:01 ` [PATCH v3 net-next 0/5] IGMP snooping for local traffic Stephen Hemminger
2017-11-07 17:03 ` Vivien Didelot
2017-11-07 17:42 ` Andrew Lunn [this message]
2017-11-07 18:10 ` Florian Fainelli
2017-11-07 18:16 ` Vivien Didelot
2017-11-07 21:01 ` Andrew Lunn
2017-11-07 21:18 ` Florian Fainelli
2017-11-07 22:17 ` Andrew Lunn
2017-11-07 22:37 ` Vivien Didelot
2017-11-07 23:17 ` Andrew Lunn
2017-11-08 0:41 ` Florian Fainelli
2017-11-09 18:41 ` Florian Fainelli
2017-11-09 19:30 ` Andrew Lunn
2017-11-09 19:38 ` Florian Fainelli
2017-11-09 20:21 ` Andrew Lunn
2017-11-09 20:35 ` Florian Fainelli
2017-11-09 21:13 ` Andrew Lunn
2017-11-09 21:40 ` Ido Schimmel
2017-11-07 17:34 ` Egil Hjelmeland
2017-11-07 17:58 ` Andrew Lunn
2017-11-08 15:11 ` Egil Hjelmeland
2017-11-08 15:21 ` Andrew Lunn
2017-11-08 15:53 ` Vivien Didelot
2017-11-09 2:30 ` David Miller
2017-11-09 2:47 ` David Miller
2017-11-09 14:44 ` Vivien Didelot
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=20171107174222.GA15028@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=vivien.didelot@savoirfairelinux.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).