[net-next PATCH v3 0/8] net: dsa: realtek: rtl8365mb: bridge offloading and VLAN support

Luiz Angelo Daros de Luca posted 8 patches 1 month, 1 week ago
There is a newer version of this series
drivers/net/dsa/realtek/Makefile                   |   4 +
drivers/net/dsa/realtek/realtek.h                  |  42 ++
drivers/net/dsa/realtek/rtl8365mb_l2.c             | 493 +++++++++++++
drivers/net/dsa/realtek/rtl8365mb_l2.h             |  32 +
.../dsa/realtek/{rtl8365mb.c => rtl8365mb_main.c}  | 548 ++++++++++++--
drivers/net/dsa/realtek/rtl8365mb_table.c          | 214 ++++++
drivers/net/dsa/realtek/rtl8365mb_table.h          | 131 ++++
drivers/net/dsa/realtek/rtl8365mb_vlan.c           | 797 +++++++++++++++++++++
drivers/net/dsa/realtek/rtl8365mb_vlan.h           |  25 +
drivers/net/dsa/realtek/rtl83xx.c                  | 482 +++++++++++++
drivers/net/dsa/realtek/rtl83xx.h                  |  27 +
11 files changed, 2727 insertions(+), 68 deletions(-)
[net-next PATCH v3 0/8] net: dsa: realtek: rtl8365mb: bridge offloading and VLAN support
Posted by Luiz Angelo Daros de Luca 1 month, 1 week ago
This series introduces bridge offloading, FDB management, and VLAN support
for the Realtek rtl8365mb DSA switch driver. The primary goal is to
enable hardware frame forwarding between bridge ports, reducing CPU
overhead and providing advanced features like VLAN and FDB isolation.

Some of these patches are based on original work by Alvin Šipraga,
subsequently adapted and updated for the current net-next state.

---
I attempted to reach Alvin for review of the final version but was
unable to establish contact. Any regressions in this version are my
responsibility.

Changes in v3:
- Fixed kernel-doc warnings
- Removed unnecessary defensive checks
- Link to v2: https://patch.msgid.link/20260503-realtek_forward-v2-0-d064e220b391@gmail.com

Changes in v2:
- added patch to use ERR_PTR()
- dropped bitfield patch. Use FIELD_PREP instead. Suggested by Yury
  Norov
- tag_rtl8_4 patches were submitted on its own series (already accepted)
- dropped rtl8365mb_vlan_mc_port_{add,del}(). rtl8365mb_vlan_mc_port_set
  is now called directly from PVID methods.
- reordered methods in rtl8365mb_vlan.c
- use dsa_switch_for_each_user_port() instead of simple for in bridge
  port join/leave
- PVID check now uses dsa_switch_for_each_available_port instead of
  dsa_switch_for_each_port
- set EFID of user ports to 0 at setup(), although it is the expected
  state after reset
- STP patch was dropped and replaced by a more extensive one that
  disables all ports (including unused ones) before setting CPU and user
  ports. It also extended the CPU port isolation to include all user
  ports.
- refactored bridge, FDB, and MDB port operations into the common
  rtl83xx module, introducing new realtek_ops callbacks to abstract the
  hardware access
- Collected Reviewed-by and Suggested-by tags
- Link to v1:
  https://patch.msgid.link/20260331-realtek_forward-v1-0-44fb63033b7e@gmail.com

To: Linus Walleij <linusw@kernel.org>
To: Alvin Šipraga <alsi@bang-olufsen.dk>
To: Andrew Lunn <andrew@lunn.ch>
To: Vladimir Oltean <olteanv@gmail.com>
To: "David S. Miller" <davem@davemloft.net>
To: Eric Dumazet <edumazet@google.com>
To: Jakub Kicinski <kuba@kernel.org>
To: Paolo Abeni <pabeni@redhat.com>
To: Russell King <linux@armlinux.org.uk>
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org

---
Alvin Šipraga (6):
      net: dsa: realtek: rtl8365mb: prepare for multiple source files
      net: dsa: realtek: rtl8365mb: add table lookup interface
      net: dsa: realtek: rtl8365mb: add VLAN support
      net: dsa: realtek: rtl8365mb: add port_bridge_{join,leave}
      net: dsa: realtek: rtl8365mb: add FDB support
      net: dsa: realtek: rtl8365mb: add bridge port flags

Luiz Angelo Daros de Luca (2):
      net: dsa: realtek: rtl8365mb: use ERR_PTR
      net: dsa: realtek: rtl8365mb: use dsa helpers for port iteration

 drivers/net/dsa/realtek/Makefile                   |   4 +
 drivers/net/dsa/realtek/realtek.h                  |  42 ++
 drivers/net/dsa/realtek/rtl8365mb_l2.c             | 493 +++++++++++++
 drivers/net/dsa/realtek/rtl8365mb_l2.h             |  32 +
 .../dsa/realtek/{rtl8365mb.c => rtl8365mb_main.c}  | 548 ++++++++++++--
 drivers/net/dsa/realtek/rtl8365mb_table.c          | 214 ++++++
 drivers/net/dsa/realtek/rtl8365mb_table.h          | 131 ++++
 drivers/net/dsa/realtek/rtl8365mb_vlan.c           | 797 +++++++++++++++++++++
 drivers/net/dsa/realtek/rtl8365mb_vlan.h           |  25 +
 drivers/net/dsa/realtek/rtl83xx.c                  | 482 +++++++++++++
 drivers/net/dsa/realtek/rtl83xx.h                  |  27 +
 11 files changed, 2727 insertions(+), 68 deletions(-)
---
base-commit: edf4bee4215a173c0534d1851d7523d827149f9e
change-id: 20260323-realtek_forward-1bac3a77c664

Best regards,
--  
Luiz Angelo Daros de Luca <luizluca@gmail.com>

Re: [net-next PATCH v3 0/8] net: dsa: realtek: rtl8365mb: bridge offloading and VLAN support
Posted by Jakub Kicinski 1 month ago
On Wed, 06 May 2026 23:58:17 -0300 Luiz Angelo Daros de Luca wrote:
> This series introduces bridge offloading, FDB management, and VLAN support
> for the Realtek rtl8365mb DSA switch driver. The primary goal is to
> enable hardware frame forwarding between bridge ports, reducing CPU
> overhead and providing advanced features like VLAN and FDB isolation.
> 
> Some of these patches are based on original work by Alvin Šipraga,
> subsequently adapted and updated for the current net-next state.

Could you please look thru the feedback provided by AI bots?
Most of it looks kinda subjective to me but hard for me to evaluate
the HW details on patch 7, especially.
Re: [net-next PATCH v3 0/8] net: dsa: realtek: rtl8365mb: bridge offloading and VLAN support
Posted by Luiz Angelo Daros de Luca 1 month ago
> Could you please look thru the feedback provided by AI bots?

Sure, Jakub.

I was expecting that, if it was an AI bot reviewing, I would receive
an answer or something here. However, Simon Horman sent me the links.
I'm already working on the fixes.

> Most of it looks kinda subjective to me but hard for me to evaluate
> the HW details on patch 7, especially.

Yes, I'll have to rethink how to deal with the HW limitations. It'll
take me some days.

Regards,

Luiz
Re: [net-next PATCH v3 0/8] net: dsa: realtek: rtl8365mb: bridge offloading and VLAN support
Posted by Linus Walleij 1 month ago
On Mon, May 11, 2026 at 6:58 AM Luiz Angelo Daros de Luca
<luizluca@gmail.com> wrote:

> Yes, I'll have to rethink how to deal with the HW limitations. It'll
> take me some days.

Thanks a lot for your efforts Luiz!

I'm excited about the patches and look forward to making
some RTL8366RB modifications on top once they get merged.

Yours,
Linus Walleij