[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5128f815-f710-4ab7-9ca9-828506054db2@lunn.ch>
Date: Wed, 14 Aug 2024 16:02:30 +0200
From: Andrew Lunn <andrew@...n.ch>
To: MD Danish Anwar <danishanwar@...com>
Cc: Dan Carpenter <dan.carpenter@...aro.org>,
Jan Kiszka <jan.kiszka@...mens.com>,
Vignesh Raghavendra <vigneshr@...com>,
Javier Carrasco <javier.carrasco.cruz@...il.com>,
Jacob Keller <jacob.e.keller@...el.com>,
Diogo Ivo <diogo.ivo@...mens.com>, Simon Horman <horms@...nel.org>,
Richard Cochran <richardcochran@...il.com>,
Paolo Abeni <pabeni@...hat.com>, Jakub Kicinski <kuba@...nel.org>,
Eric Dumazet <edumazet@...gle.com>,
"David S. Miller" <davem@...emloft.net>,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, srk@...com,
Roger Quadros <rogerq@...nel.org>
Subject: Re: [PATCH net-next v2 4/7] net: ti: icssg-prueth: Add support for
HSR frame forward offload
> Yes, the icssg_init_ and many other APIs are common for switch and hsr.
> They can be renamed to indicate that as well.
>
> How does icssg_init_switch_or_hsr_mode() sound?
I would say it is too long. And when you add the next thing, say
bonding, will it become icssg_init_switch_or_hsr_or_bond_mode()?
Maybe name the function after what it actually does, not why you call
it.
> >> static struct icssg_firmwares icssg_switch_firmwares[] = {
> >> {
> >> .pru = "ti-pruss/am65x-sr2-pru0-prusw-fw.elf",
> >> @@ -152,6 +168,8 @@ static int prueth_emac_start(struct prueth *prueth, struct prueth_emac *emac)
> >>
> >> if (prueth->is_switch_mode)
> >> firmwares = icssg_switch_firmwares;
> >> + else if (prueth->is_hsr_offload_mode)
> >> + firmwares = icssg_hsr_firmwares;
> >
> > Documentation/networking/netdev-features.rst
> >
> > * hsr-fwd-offload
> >
> > This should be set for devices which forward HSR (High-availability Seamless
> > Redundancy) frames from one port to another in hardware.
> >
> > To me, this suggests if the flag is not set, you should keep in dual
> > EMACS or switchdev mode and perform HSR in software.
>
>
> Correct. This is the expected behavior. If the flag is not set we remain
> in dual EMAC firmware and do HSR in software. Please see
> prueth_hsr_port_link() for detail on this.
O.K.
Andrew
Powered by blists - more mailing lists