From: Andrew Lunn <andrew@lunn.ch>
To: Daniel Mack <daniel@zonque.org>
Cc: netdev@vger.kernel.org, Ido Schimmel <idosch@idosch.org>,
Jiri Pirko <jiri@resnulli.us>, Ivan Vecera <ivecera@redhat.com>,
Florian Fainelli <f.fainelli@gmail.com>
Subject: Re: Question on DSA switches, IGMP forwarding and switchdev
Date: Fri, 19 Jun 2020 23:58:17 +0200 [thread overview]
Message-ID: <20200619215817.GN279339@lunn.ch> (raw)
In-Reply-To: <59c5ede2-8b52-c250-7396-fd7b19ec6bc7@zonque.org>
On Fri, Jun 19, 2020 at 11:31:04PM +0200, Daniel Mack wrote:
> Hi,
>
> I'm working on a custom board featuring a Marvell mv88e6085 Ethernet
> switch controlled by the Linux DSA driver, and I'm facing an issue with
> IGMP packet flows.
>
> Consider two Ethernet stations, each connected to the switch on a
> dedicated port. A Linux bridge combines the two ports. In my setup, I
> need these two stations to send and receive multicast traffic, with IGMP
> snooping enabled.
>
> When an IGMP query enters the switch, it is redirected to the CPU port
> as all 'external' ports are configured for IGMP/MLP snooping by the
> driver. The issue that I'm seeing is that the Linux bridge does not
> forward the IGMP frames to any other port, no matter whether the bridge
> is in snooping mode or not. This needs to happen however, otherwise the
> stations will not see IGMP queries, and unsolicited membership reports
> are not being transferred either.
Hi Daniel
I think all the testing i've done in this area i've had the bridge
acting as the IGMP queirer. Hence it has replied to the query, rather
than forward it out other ports.
So this could be a bug.
> I've traced these frames through the bridge code and figured forwarding
> fails in should_deliver() in net/bridge/br_forward.c because
> nbp_switchdev_allowed_egress() denies it due to the fact that the frame
> has already been forwarded by the same parent device.
To get this far, has the bridge determined it is not the elected
querier? I guess it must of done. Otherwise it would not be
forwarding it.
> So my question now is how to fix that. Would the DSA driver need to mark
> the ports as independent somehow?
The problem here is:
https://elixir.bootlin.com/linux/v5.8-rc1/source/net/dsa/tag_edsa.c#L159
Setting offload_fwd_mark means the switch has forwarded the frame as
needed to other ports of the switch. If the frame is an IGMP query
frame, and the bridge is not the elected quierer, i guess we need to
set this false? Or we need an FDB in the switch to forward it. What
group address is being used?
Andrew
next prev parent reply other threads:[~2020-06-19 21:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-19 21:31 Question on DSA switches, IGMP forwarding and switchdev Daniel Mack
2020-06-19 21:58 ` Andrew Lunn [this message]
2020-06-19 22:05 ` Jason Cobham
2020-06-19 22:36 ` Andrew Lunn
2020-06-20 6:02 ` Daniel Mack
2020-06-20 14:35 ` Andrew Lunn
2020-06-20 18:01 ` Daniel Mack
2020-06-20 5:32 ` Daniel Mack
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=20200619215817.GN279339@lunn.ch \
--to=andrew@lunn.ch \
--cc=daniel@zonque.org \
--cc=f.fainelli@gmail.com \
--cc=idosch@idosch.org \
--cc=ivecera@redhat.com \
--cc=jiri@resnulli.us \
--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).