From: Tobias Waldekranz <tobias@waldekranz.com>
To: Andrew Lunn <andrew@lunn.ch>, Vladimir Oltean <olteanv@gmail.com>
Cc: "Fabio Estevam" <festevam@gmail.com>,
"Florian Fainelli" <f.fainelli@gmail.com>,
"Steffen Bätz" <steffen@innosonix.de>,
netdev <netdev@vger.kernel.org>
Subject: Re: mv88e6320: Failed to forward PTP multicast
Date: Wed, 17 May 2023 23:42:04 +0200 [thread overview]
Message-ID: <87sfbuprdf.fsf@waldekranz.com> (raw)
In-Reply-To: <41d7d1e8-19b8-4025-a1eb-0fbb0f54fe15@lunn.ch>
On ons, maj 17, 2023 at 19:07, Andrew Lunn <andrew@lunn.ch> wrote:
>> Slightly unrelated to the original topic and probably completely
>> unrelated to Fabio's actual issue.
>>
>> I'm completely inapt when it comes to IP multicast. Tobias, does the
>> fact that br0 have mcast_router 1 mean that the CPU port should be a
>> recipient of all multicast traffic, registered or unregistered?
If the bridge is the elected querier, then yes, br0 should receive _all_
IP multicast. However, I believe that mcast_router=1 only means that
the bridge is allowed to take part in the election, if you have another
querier/router somewhere on the LAN, then that might be elected.
Assuming that br0 is the elected querier, Fabio is probably hitting a
long-standing issue with the MDB-implementation in the DSA/mv88e6xxx
layers. Typically, drivers will ensure that router ports (and host
mrouter) receive _unknown_ multicast. However, existing _registered_
groups still won't reach these ports.
In all hardware that I've seen, this must be handled by iterating over
all known (IP) groups in the MDB, ORing in the new router port (which
could be the CPU port in the host mrouter case). Conversely, when new
groups are registered, you must also make sure to OR in all existing
router ports.
Deletions are even more perilous, because now each bit in a hardware MDB
(ATU) entry might have been set for either one or both of two reasons:
1. Because an IGMP/MLD report or a static configuration said so.
2. Because a router/querier is located behind it.
This means that you need to cache all this information in software to
know when it is safe to clear a bit in the hardware.
I have made a draft implementation of this, which I do not have access
to at the moment. I'll poke around and see if I can find it.
> It is a long time since i did much with multicast. But my
> understanding is that a multicast router should be taking part in
> IGMP. If there is a group member on the other side of the gateway, the
> router should indicate it has interest in the group so traffic flows
> to it. It can then forward the traffic between its multicast
> interfaces, based on that interest.
Yes, that would have been the sane thing to do. Indeed, if you're
running a protocol like PIM-SM, it could have been done that way. Alas,
we also have flood-and-prune based protocols like DVMRP to deal with,
where the router has to flood all groups to all other routers until it
receives a prune message. This is why, AFAIK, the standard says that a
router port needs to also receive unregistered groups.
prev parent reply other threads:[~2023-05-17 21:42 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-04 18:39 mv88e6320: Failed to forward PTP multicast Fabio Estevam
2023-05-04 19:21 ` Andrew Lunn
2023-05-04 19:40 ` Fabio Estevam
2023-05-04 19:55 ` Andrew Lunn
2023-05-05 11:27 ` Fabio Estevam
2023-05-05 13:02 ` Andrew Lunn
2023-05-05 14:03 ` Fabio Estevam
2023-05-10 14:05 ` Fabio Estevam
2023-05-10 18:28 ` Vladimir Oltean
2023-05-11 11:03 ` Fabio Estevam
2023-05-11 11:46 ` Vladimir Oltean
2023-05-16 14:12 ` Fabio Estevam
2023-05-16 16:29 ` Andrew Lunn
2023-05-17 16:51 ` Vladimir Oltean
2023-05-10 21:34 ` Tobias Waldekranz
2023-05-11 11:16 ` Fabio Estevam
2023-05-11 11:56 ` Tobias Waldekranz
2023-05-16 18:10 ` Fabio Estevam
2023-05-17 16:53 ` Vladimir Oltean
2023-05-17 17:07 ` Andrew Lunn
2023-05-17 21:42 ` Tobias Waldekranz [this message]
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=87sfbuprdf.fsf@waldekranz.com \
--to=tobias@waldekranz.com \
--cc=andrew@lunn.ch \
--cc=f.fainelli@gmail.com \
--cc=festevam@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=steffen@innosonix.de \
/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).