RE: [PATCH net] net: renesas: rswitch: fix forwarding offload statemachine
From: Michael Dege <hidden>
Date: 2026-02-06 05:54:22
Also in:
linux-renesas-soc, lkml
Hello Nikita, I am sorry I missed this latest message of yours.
-----Original Message----- From: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Sent: Thursday, February 5, 2026 4:04 PM To: Michael Dege <redacted>; Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>; Andrew Lunn [off-list ref]; David S. Miller [off-list ref]; Eric Dumazet [off-list ref]; Jakub Kicinski [off-list ref]; Paolo Abeni [off-list ref] Cc: netdev@vger.kernel.org; linux-renesas-soc@vger.kernel.org; linux-kernel@vger.kernel.org Subject: Re: [PATCH net] net: renesas: rswitch: fix forwarding offload statemachinequoted
quoted
quoted
The driver was originally designed to enable hardware forwarding when not less than two ports are in forwarding state. When only one port has hw forwarding, thereis no destination to forward.quoted
quoted
quoted
NikitaThe current driver allows Linux to use the bridge port as local port to the bridge. The offloading Also supports switching traffic to Linux through the bridge port. Therefore, the offloading shouldn't Be dropped if only one externalport is up on the bridge.quoted
"Offloading" means - forward a frame from one hw port to other hw port without inserting it into CPU queue. Offloaded frame is never visible to software bridge. There is code that allows offload only if the linux bridge device used to connect rswitch ports does not have anything else. If it has something else, offloading is disabled (because there is no way to know when a frame can beprocessed within rswitch hw without sending it to cpu). Ah I see the code that explicitly enabled l2 offload only when at least two ports are active is not in mainline. Still, l2 offload requires at least two ports participating, by definition. When there is only one port with hw forwarding enabled, it will get empty allowed forward destination mask.
Yes, that is right, but there are still two HW ports involved in the HW forwarding. The remaining TSN port and the GWCA as internal port. Therefore, it is OK from the HW viewpoint. Best regards, Michael