From: Lukasz Majewski <lukma@denx.de>
To: Paolo Abeni <pabeni@redhat.com>
Cc: Tristram.Ha@microchip.com, Eric Dumazet <edumazet@google.com>,
davem@davemloft.net, Woojung Huh <woojung.huh@microchip.com>,
Vladimir Oltean <olteanv@gmail.com>, Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
Jakub Kicinski <kuba@kernel.org>,
UNGLinuxDriver@microchip.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] net: dsa: Extend the dsa_switch structure to hold info about HSR ports
Date: Thu, 31 Aug 2023 11:29:15 +0200 [thread overview]
Message-ID: <20230831112915.5b114379@wsk> (raw)
In-Reply-To: <6b4733f4a5bedd465b7ee5ea435dcdaf12a61321.camel@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2734 bytes --]
Hi Paolo,
> 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@denx.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.
That was mine first idea - to move it to struct ksz_device from
./drivers/net/dsa/ksz_common.h
However, this file and this struct is not easily accessible from
net/dsa/tag_ksz.c
One idea was to use an exported function - e.g. ksz_get_hsr_ports() and
in it I would read the hsr_ports member ?
Another option would be to loop through all switch ports with
hsr_for_each_port(), but this would affect overall network performance.
> 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???)
I will use the idea of exported helper function to get HSR members
ports.
>
> 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.
>
I will prepare v2 and then adjust it to net-next when required.
> Cheers,
>
> Paolo
>
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2023-08-31 9:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-29 12:11 [PATCH 0/4] net: dsa: hsr: Enable HSR HW offloading for KSZ9477 Lukasz Majewski
2023-08-29 12:11 ` [PATCH 1/4] net: dsa: Extend the dsa_switch structure to hold info about HSR ports Lukasz Majewski
2023-08-31 9:10 ` Paolo Abeni
2023-08-31 9:29 ` Lukasz Majewski [this message]
2023-08-29 12:11 ` [PATCH 2/4] net: dsa: Extend ksz9477 TAG setup to support HSR frames duplication Lukasz Majewski
2023-08-29 12:11 ` [PATCH 3/4] net: dsa: hsr: Enable in KSZ9477 switch HW HSR offloading Lukasz Majewski
2023-08-29 12:11 ` [PATCH 4/4] net: dsa: hsr: Provide generic HSR ksz_hsr_{join|leave} functions Lukasz Majewski
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=20230831112915.5b114379@wsk \
--to=lukma@denx.de \
--cc=Tristram.Ha@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=woojung.huh@microchip.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