[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6b4733f4a5bedd465b7ee5ea435dcdaf12a61321.camel@redhat.com>
Date: Thu, 31 Aug 2023 11:10:00 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Lukasz Majewski <lukma@...x.de>, Tristram.Ha@...rochip.com, Eric Dumazet
<edumazet@...gle.com>, davem@...emloft.net, Woojung Huh
<woojung.huh@...rochip.com>, Vladimir Oltean <olteanv@...il.com>
Cc: Andrew Lunn <andrew@...n.ch>, Florian Fainelli <f.fainelli@...il.com>,
Jakub Kicinski
<kuba@...nel.org>, UNGLinuxDriver@...rochip.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/4] net: dsa: Extend the dsa_switch structure to hold
info about HSR ports
On Tue, 2023-08-29 at 14:11 +0200, Lukasz Majewski wrote:
> Information about HSR aware ports in a DSA switch can be helpful when
> one needs tags to be adjusted before the HSR frame is sent.
>
> For example - with ksz9477 switch - the TAG needs to be adjusted to have
> both HSR ports marked in tag to allow execution of HW based frame
> duplication.
>
> Signed-off-by: Lukasz Majewski <lukma@...x.de>
> ---
> include/net/dsa.h | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/include/net/dsa.h b/include/net/dsa.h
> index d309ee7ed04b..15274afc42bb 100644
> --- a/include/net/dsa.h
> +++ b/include/net/dsa.h
> @@ -470,6 +470,9 @@ struct dsa_switch {
> /* Number of switch port queues */
> unsigned int num_tx_queues;
>
> + /* Bitmask indicating ports supporting HSR */
> + u16 hsr_ports;
> +
> /* Drivers that benefit from having an ID associated with each
> * offloaded LAG should set this to the maximum number of
> * supported IDs. DSA will then maintain a mapping of _at
Out of sheer ignorance, I think this new field does not belong to
dsa_switch, at least not in this form. AFAICS there is no current hard
limitation on the number of ports a DSA switch can handle at the API
level, and this will introduce an hard one.
I think you are better off keeping this field in the KSZ-specific
struct. If you really want to keep it here you should remove the above
limitation somehow (possibly a query op to check if a given port is HSR
aware???)
In any case this series looks like net-next material, does not apply
correctly to net-next and net-next is currently closed. You can share a
new version as RFC or wait for net-next to re-open in ~2w.
Cheers,
Paolo
Powered by blists - more mailing lists