From: "Anwar, Md Danish" <a0501179@ti.com>
To: Andrew Lunn <andrew@lunn.ch>, MD Danish Anwar <danishanwar@ti.com>
Cc: Diogo Ivo <diogo.ivo@siemens.com>, Rob Herring <robh@kernel.org>,
Dan Carpenter <dan.carpenter@linaro.org>,
Jan Kiszka <jan.kiszka@siemens.com>,
Simon Horman <horms@kernel.org>,
Wolfram Sang <wsa+renesas@sang-engineering.com>,
Arnd Bergmann <arnd@arndb.de>,
Vignesh Raghavendra <vigneshr@ti.com>,
Vladimir Oltean <vladimir.oltean@nxp.com>,
Roger Quadros <rogerq@kernel.org>,
Paolo Abeni <pabeni@redhat.com>, Jakub Kicinski <kuba@kernel.org>,
Eric Dumazet <edumazet@google.com>,
"David S. Miller" <davem@davemloft.net>,
<linux-arm-kernel@lists.infradead.org>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <srk@ti.com>,
<r-gunasekaran@ti.com>
Subject: Re: [PATCH net-next v3 3/3] net: ti: icssg-prueth: Add support for ICSSG switch firmware
Date: Fri, 12 Apr 2024 13:31:44 +0530 [thread overview]
Message-ID: <cae18a4a-0085-493d-93a1-1e3127a0bd64@ti.com> (raw)
In-Reply-To: <0039b9d9-9dc5-4b88-99f0-92f275b0b4d3@lunn.ch>
On 4/10/2024 6:12 PM, Andrew Lunn wrote:
>> 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.
>
Hi Andrew, I have tested with that sequence as well and forwarding
works. Even if the second interface is added to bridge after bridge is
up, the forwarding works fine.
> 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.
>
Yes there will be packet losses for a slight amount of time but that's
something we can't avoid.
I will post the next revision with these changes soon. Thanks for the
review.
> Andrew
--
Thanks and Regards,
Md Danish Anwar
next prev parent reply other threads:[~2024-04-12 8:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-27 11:40 [PATCH net-next v3 0/3] Introduce switch mode support for ICSSG driver MD Danish Anwar
2024-03-27 11:40 ` [PATCH net-next v3 1/3] net: ti: icssg-prueth: Add helper functions to configure FDB MD Danish Anwar
2024-03-27 11:40 ` [PATCH net-next v3 2/3] net: ti: icssg-switch: Add switchdev based driver for ethernet switch support MD Danish Anwar
2024-03-27 11:40 ` [PATCH net-next v3 3/3] net: ti: icssg-prueth: Add support for ICSSG switch firmware MD Danish Anwar
2024-03-27 12:35 ` Andrew Lunn
2024-03-28 6:09 ` MD Danish Anwar
2024-03-28 12:39 ` Andrew Lunn
2024-04-10 8:42 ` MD Danish Anwar
2024-04-10 12:42 ` Andrew Lunn
2024-04-12 8:01 ` Anwar, Md Danish [this message]
2024-04-12 18:52 ` Andrew Davis
2024-04-15 6:56 ` Anwar, Md Danish
2024-04-16 17:19 ` Andrew Davis
2024-04-17 5:15 ` MD Danish Anwar
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=cae18a4a-0085-493d-93a1-1e3127a0bd64@ti.com \
--to=a0501179@ti.com \
--cc=andrew@lunn.ch \
--cc=arnd@arndb.de \
--cc=dan.carpenter@linaro.org \
--cc=danishanwar@ti.com \
--cc=davem@davemloft.net \
--cc=diogo.ivo@siemens.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jan.kiszka@siemens.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=r-gunasekaran@ti.com \
--cc=robh@kernel.org \
--cc=rogerq@kernel.org \
--cc=srk@ti.com \
--cc=vigneshr@ti.com \
--cc=vladimir.oltean@nxp.com \
--cc=wsa+renesas@sang-engineering.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
all inboxes | Powered by JetHome®