[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0039b9d9-9dc5-4b88-99f0-92f275b0b4d3@lunn.ch>
Date: Wed, 10 Apr 2024 14:42:00 +0200
From: Andrew Lunn <andrew@...n.ch>
To: MD Danish Anwar <danishanwar@...com>
Cc: Diogo Ivo <diogo.ivo@...mens.com>, Rob Herring <robh@...nel.org>,
Dan Carpenter <dan.carpenter@...aro.org>,
Jan Kiszka <jan.kiszka@...mens.com>,
Simon Horman <horms@...nel.org>,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
Arnd Bergmann <arnd@...db.de>,
Vignesh Raghavendra <vigneshr@...com>,
Vladimir Oltean <vladimir.oltean@....com>,
Roger Quadros <rogerq@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Jakub Kicinski <kuba@...nel.org>,
Eric Dumazet <edumazet@...gle.com>,
"David S. Miller" <davem@...emloft.net>,
linux-arm-kernel@...ts.infradead.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, srk@...com, r-gunasekaran@...com
Subject: Re: [PATCH net-next v3 3/3] net: ti: icssg-prueth: Add support for
ICSSG switch firmware
> I have been working on this and have found a way to change firmwares
> without bringing the interfaces up / down.
>
> By default the interfaces are in MAC mode and the ICSSG EMAC firmwares
> are running on pru cores. To enable switch mode we will need to stop the
> cores and reload them with the ICSSG Switch firmwares. We can do this
> without bringing the interfaces up / down.
>
> When first interface is added to bridge it will still run emac
> firmwares. The moment second interface gets added to bridge, we will
> disable the ports and stop the pru cores. Load the switch firmwares on
> to the cores, start the cores and enable the ports. All of this is done
> from the driver.
>
> The user need not to bring the interfaces up / down. Loading / Reloading
> of firmwares will be handled inside the driver only. But we do need to
> stop the cores for changing firmwares. For stopping the cores we will
> change the port state to disable by sending r30 command to firmware.
>
> As we are not restarting the interfaces, the DRAM, SMEM and MSMC RAM
> doesn't get cleared. As a result with this approach all configurations
> will be saved.
>
> Please let me know if this approach looks ok to you.
>
> Below will be the commands to enable switch mode now,
>
> ip link add name br0 type bridge
> ip link set dev eth1 master br0
> ip link set dev eth2 master br0 (At this point we will stop the
> cores, reload switch firmware, start the cores)
> ip link set dev br0 up
> bridge vlan add dev br0 vid 1 pvid untagged
This sounds a lot better.
Note that the bridge interface br0 might already be up when the
interfaces are added. So that is a different order to what you showed
here.
There will be some packet losses when you swap firmware, but it
probably is not that bad. When interfaces are added to a bridge
packets are dropped anywhere while spanning tree determines the
network topology. It will just appear your device is slow at doing
that.
Andrew
Powered by blists - more mailing lists