From: Vladimir Oltean <olteanv@gmail.com>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: "DENG Qingfang" <dqfext@gmail.com>,
"Sean Wang" <sean.wang@mediatek.com>,
"Landen Chao" <Landen.Chao@mediatek.com>,
"Andrew Lunn" <andrew@lunn.ch>,
"Vivien Didelot" <vivien.didelot@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
"Jakub Kicinski" <kuba@kernel.org>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
"Philipp Zabel" <p.zabel@pengutronix.de>,
"Russell King" <linux@armlinux.org.uk>,
netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
"Frank Wunderlich" <frank-w@public-files.de>,
"René van Dorst" <opensource@vdorst.com>
Subject: Re: [PATCH net-next] net: dsa: mt7530: support MDB and bridge flag operations
Date: Mon, 15 Mar 2021 23:15:41 +0200 [thread overview]
Message-ID: <20210315211541.pj5mpy2foi3wlhbe@skbuf> (raw)
In-Reply-To: <84bb93da-cc3b-d2a5-dda8-a8fb973c3bae@gmail.com>
On Mon, Mar 15, 2021 at 01:44:02PM -0700, Florian Fainelli wrote:
> On 3/15/2021 1:09 PM, Vladimir Oltean wrote:
> > On Mon, Mar 15, 2021 at 01:03:10PM -0700, Florian Fainelli wrote:
> >>
> >>
> >> On 3/15/2021 10:09 AM, DENG Qingfang wrote:
> >>> Support port MDB and bridge flag operations.
> >>>
> >>> As the hardware can manage multicast forwarding itself, offload_fwd_mark
> >>> can be unconditionally set to true.
> >>>
> >>> Signed-off-by: DENG Qingfang <dqfext@gmail.com>
> >>> ---
> >>> Changes since RFC:
> >>> Replaced BR_AUTO_MASK with BR_FLOOD | BR_LEARNING
> >>>
> >>> drivers/net/dsa/mt7530.c | 124 +++++++++++++++++++++++++++++++++++++--
> >>> drivers/net/dsa/mt7530.h | 1 +
> >>> net/dsa/tag_mtk.c | 14 +----
> >>> 3 files changed, 122 insertions(+), 17 deletions(-)
> >>>
> >>> diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
> >>> index 2342d4528b4c..f765984330c9 100644
> >>> --- a/drivers/net/dsa/mt7530.c
> >>> +++ b/drivers/net/dsa/mt7530.c
> >>> @@ -1000,8 +1000,9 @@ mt753x_cpu_port_enable(struct dsa_switch *ds, int port)
> >>> mt7530_write(priv, MT7530_PVC_P(port),
> >>> PORT_SPEC_TAG);
> >>>
> >>> - /* Unknown multicast frame forwarding to the cpu port */
> >>> - mt7530_rmw(priv, MT7530_MFC, UNM_FFP_MASK, UNM_FFP(BIT(port)));
> >>> + /* Disable flooding by default */
> >>> + mt7530_rmw(priv, MT7530_MFC, BC_FFP_MASK | UNM_FFP_MASK | UNU_FFP_MASK,
> >>> + BC_FFP(BIT(port)) | UNM_FFP(BIT(port)) | UNU_FFP(BIT(port)));
> >>
> >> It's not clear to me why this is appropriate especially when the ports
> >> operated in standalone mode, can you expand a bit more on this?
> >
> > We are in the function called "mt753x_cpu_port_enable" here. It's ok to
> > apply this config for the CPU port.
>
> Because the user ports will flood unknown traffic and we have mediatek
> tags enabled presumably, so all traffic is copied to the CPU port, OK.
Actually this is just how Qingfang explained it:
https://patchwork.kernel.org/project/netdevbpf/patch/20210224081018.24719-1-dqfext@gmail.com/
I just assume that MT7530/7531 switches don't need to enable flooding on
user ports when the only possible traffic source is the CPU port - the
CPU port can inject traffic into any port regardless of egress flooding
setting. If that's not true, I don't see how traffic in standalone ports
mode would work after this patch.
next prev parent reply other threads:[~2021-03-15 21:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-15 17:09 [PATCH net-next] net: dsa: mt7530: support MDB and bridge flag operations DENG Qingfang
2021-03-15 20:03 ` Florian Fainelli
2021-03-15 20:09 ` Vladimir Oltean
2021-03-15 20:44 ` Florian Fainelli
2021-03-15 21:15 ` Vladimir Oltean [this message]
2021-03-16 4:36 ` DENG Qingfang
2021-03-16 9:55 ` Vladimir Oltean
2021-03-16 9:56 ` Vladimir Oltean
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=20210315211541.pj5mpy2foi3wlhbe@skbuf \
--to=olteanv@gmail.com \
--cc=Landen.Chao@mediatek.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=dqfext@gmail.com \
--cc=f.fainelli@gmail.com \
--cc=frank-w@public-files.de \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux@armlinux.org.uk \
--cc=matthias.bgg@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=opensource@vdorst.com \
--cc=p.zabel@pengutronix.de \
--cc=sean.wang@mediatek.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).