[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5cf40558-eee8-d92d-4740-d0a88eb64fd7@gmail.com>
Date: Mon, 15 Mar 2021 10:24:25 -0700
From: Florian Fainelli <f.fainelli@...il.com>
To: Álvaro Fernández Rojas <noltari@...il.com>,
jonas.gorski@...il.com, Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
Vladimir Oltean <olteanv@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next 2/2] net: dsa: b53: support legacy tags
On 3/15/2021 7:27 AM, Álvaro Fernández Rojas wrote:
> These tags are used on BCM5325, BCM5365 and BCM63xx switches.
>
> Signed-off-by: Álvaro Fernández Rojas <noltari@...il.com>
> ---
> drivers/net/dsa/b53/Kconfig | 1 +
> drivers/net/dsa/b53/b53_common.c | 9 +++++++--
> 2 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/dsa/b53/Kconfig b/drivers/net/dsa/b53/Kconfig
> index f9891a81c808..90b525160b71 100644
> --- a/drivers/net/dsa/b53/Kconfig
> +++ b/drivers/net/dsa/b53/Kconfig
> @@ -3,6 +3,7 @@ menuconfig B53
> tristate "Broadcom BCM53xx managed switch support"
> depends on NET_DSA
> select NET_DSA_TAG_BRCM
> + select NET_DSA_TAG_BRCM_LEGACY
> select NET_DSA_TAG_BRCM_PREPEND
> help
> This driver adds support for Broadcom managed switch chips. It supports
> diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
> index a162499bcafc..a583948cdf4f 100644
> --- a/drivers/net/dsa/b53/b53_common.c
> +++ b/drivers/net/dsa/b53/b53_common.c
> @@ -2034,6 +2034,7 @@ static bool b53_can_enable_brcm_tags(struct dsa_switch *ds, int port,
>
> switch (tag_protocol) {
> case DSA_TAG_PROTO_BRCM:
> + case DSA_TAG_PROTO_BRCM_LEGACY:
> case DSA_TAG_PROTO_BRCM_PREPEND:
I am not sure about that one, so for now we can probably be
conservative. You can definitively not "stack" two or more switches that
are configured with DSA_TAG_PROTO_BRCM because the first switch
receiving the Broadcom tag will terminate it locally and not pass it up.
The legacy Broadcom tag however is different and has a "Scr Dev ID"
field which is intended to support cascading. Whether that works with
only DSA_TAG_PROTO_BRCM_LEGACY or across DSA_PROTO_BRCM_LEGACY +
DSA_TAG_PROTO_BRCM may be something you will have to determine.
Acked-by: Florian Fainelli <f.fainelli@...il.com>
--
Florian
Powered by blists - more mailing lists