[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CFD0E43B-1D0F-4BC3-8DB8-8CFA09F8AA94@public-files.de>
Date: Fri, 16 Jun 2023 07:44:32 +0200
From: Frank Wunderlich <frank-w@...lic-files.de>
To: arinc9.unal@...il.com,
Arınç ÜNAL <arinc.unal@...nc9.com>,
Daniel Golle <daniel@...rotopia.org>, Landen Chao <Landen.Chao@...iatek.com>,
DENG Qingfang <dqfext@...il.com>, Sean Wang <sean.wang@...iatek.com>,
Andrew Lunn <andrew@...n.ch>, Florian Fainelli <f.fainelli@...il.com>,
Vladimir Oltean <olteanv@...il.com>, "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
Russell King <linux@...linux.org.uk>
CC: Landen Chao <landen.chao@...iatek.com>,
Bartel Eerdekens <bartel.eerdekens@...stell8.be>, mithat.guner@...ont.com,
erkin.bozoglu@...ont.com, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org
Subject: Re: [PATCH net v5 4/6] net: dsa: mt7530: fix handling of LLDP frames
Am 16. Juni 2023 04:53:25 MESZ schrieb arinc9.unal@...il.com:
>From: Arınç ÜNAL <arinc.unal@...nc9.com>
>
>LLDP frames are link-local frames, therefore they must be trapped to the
>CPU port. Currently, the MT753X switches treat LLDP frames as regular
>multicast frames, therefore flooding them to user ports. To fix this, set
>LLDP frames to be trapped to the CPU port(s).
>
>Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch")
>Signed-off-by: Arınç ÜNAL <arinc.unal@...nc9.com>
>---
> drivers/net/dsa/mt7530.c | 8 ++++++++
> drivers/net/dsa/mt7530.h | 5 +++++
> 2 files changed, 13 insertions(+)
>
>diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
>index 7b72cf3a0e30..c85876fd9107 100644
>--- a/drivers/net/dsa/mt7530.c
>+++ b/drivers/net/dsa/mt7530.c
>@@ -2266,6 +2266,10 @@ mt7530_setup(struct dsa_switch *ds)
> mt7530_rmw(priv, MT753X_BPC, MT753X_BPDU_PORT_FW_MASK,
> MT753X_BPDU_CPU_ONLY);
>
>+ /* Trap LLDP frames with :0E MAC DA to the CPU port */
>+ mt7530_rmw(priv, MT753X_RGAC2, MT753X_R0E_PORT_FW_MASK,
>+ MT753X_R0E_PORT_FW(MT753X_BPDU_CPU_ONLY));
>+
> /* Enable and reset MIB counters */
> mt7530_mib_reset(ds);
>
>@@ -2369,6 +2373,10 @@ mt7531_setup_common(struct dsa_switch *ds)
> mt7530_rmw(priv, MT753X_BPC, MT753X_BPDU_PORT_FW_MASK,
> MT753X_BPDU_CPU_ONLY);
>
>+ /* Trap LLDP frames with :0E MAC DA to the CPU port(s) */
>+ mt7530_rmw(priv, MT753X_RGAC2, MT753X_R0E_PORT_FW_MASK,
>+ MT753X_R0E_PORT_FW(MT753X_BPDU_CPU_ONLY));
>+
> /* Enable and reset MIB counters */
> mt7530_mib_reset(ds);
>
I though these 2 hunks should go into some common function as these are redundant or am i wrong?
Btw.thx for your work on this driver :)
regards Frank
Powered by blists - more mailing lists