public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [net-next PATCH 00/13] net: renesas: rswitch: R-Car S4 add VLAN aware switching
@ 2026-03-17  9:41 Michael Dege
  2026-03-17  9:41 ` [PATCH net-next 01/13] net: renesas: rswitch: improve port change mode functions Michael Dege
                   ` (12 more replies)
  0 siblings, 13 replies; 17+ messages in thread
From: Michael Dege @ 2026-03-17  9:41 UTC (permalink / raw)
  To: Yoshihiro Shimoda, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni
  Cc: netdev, linux-renesas-soc, linux-kernel, Michael Dege

Hello!

The current R-Car S4 rswitch driver only supports basic HW offloading
for L2 switching/bridgeing. This patchset extends the driver with
support for VLAN aware switching.

1. For every port mode change from configuration to operation and
   vice-versa you need to change to disabled mode first. The
   functions rswitch_<port>_change_mode now take care of this. 

2. In upcomming changes for adding vlan support struct net_device
   will not be available in all cases, therefore use struct device
   instead.

3. Fix typo in register define macro and remove duplicate macro.

4. Add register definitions needed fo vlan support.

5. Add exception path for packets with unknown destitination MAC
   addresses.

6. Make the helper functions rswitch_reg_wait(),
   rswitch_etha_change_mode() and rswitch_etha_change_mode()
   available to the whole driver.

7. Add basic start-up time initialization needed to support VLANs.

8. Update ETHA and GWCA port HW initializations.

9. Clean up is_rdev() rswitch_device checking.

10. Provide struct rswitch_private to notifiers.

11. Add handler for FDB notifications to configure bridge MAC address
    to GWCA registers and update static MAC table entry.

12. Add vlan support to L2 HW bridge.

Configuration example:
ip link add name br0 type bridge vlan_filtering 1
ip link set dev tsn0 master br0
ip link set dev tsn1 master br0
ip link set dev br0 up
ip link set dev tsn0 up
ip link set dev tsn1 up
bridge vlan add dev tsn0 vid 4
bridge vlan add dev tsn1 vid 4
bridge vlan add dev br0 vid 4 self
ip a a 192.168.1.20/24 dev br0
ip l a link br0 name br0.1 type vlan id 1
ip l a link br0 name br0.4 type vlan id 4
ip a a 192.168.2.20/24 dev br0.1
ip a a 192.168.4.20/24 dev br0.4
ip link set dev br0.1 up
ip link set dev br0.4 up

Signed-off-by: Michael Dege <michael.dege@renesas.com>
---
Michael Dege (13):
      net: renesas: rswitch: improve port change mode functions
      net: renesas: rswitch: use device instead of net_device
      net: renesas: rswitch: fix FWPC2 register access macros
      net: renesas: rswitch: add register definitions for vlan support
      net: renesas: rswitch: add exception path for packets with unknown dst MAC
      net: renesas: rswitch: add forwarding rules for gwca
      net: renesas: rswitch: make helper functions available to whole driver
      net: renesas: rswitch: add basic vlan init to rswitch_fwd_init
      net: renesas: rswitch: update port HW init
      net: renesas: rswitch: clean up is_rdev rswitch_device checking
      net: renesas: rswitch: add passing of rswitch_private into notifiers
      net: renesas: rswitch: add handler for FDB notification
      net: renesas: rswitch: add vlan aware switching

 drivers/net/ethernet/renesas/rswitch.h      | 181 +++++++-
 drivers/net/ethernet/renesas/rswitch_l2.c   | 641 ++++++++++++++++++++++++----
 drivers/net/ethernet/renesas/rswitch_l2.h   |   6 +-
 drivers/net/ethernet/renesas/rswitch_main.c | 203 ++++++---
 4 files changed, 875 insertions(+), 156 deletions(-)
---
base-commit: 1f318b96cc84d7c2ab792fcc0bfd42a7ca890681
change-id: 20260120-rswitch_add_vlans-39488bfb296c

Best regards,
-- 
Michael Dege <michael.dege@renesas.com>


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2026-03-19  1:35 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-17  9:41 [net-next PATCH 00/13] net: renesas: rswitch: R-Car S4 add VLAN aware switching Michael Dege
2026-03-17  9:41 ` [PATCH net-next 01/13] net: renesas: rswitch: improve port change mode functions Michael Dege
2026-03-17  9:41 ` [PATCH net-next 02/13] net: renesas: rswitch: use device instead of net_device Michael Dege
2026-03-17  9:41 ` [PATCH net-next 03/13] net: renesas: rswitch: fix FWPC2 register access macros Michael Dege
2026-03-17  9:41 ` [PATCH net-next 04/13] net: renesas: rswitch: add register definitions for vlan support Michael Dege
2026-03-17  9:41 ` [PATCH net-next 05/13] net: renesas: rswitch: add exception path for packets with unknown dst MAC Michael Dege
2026-03-17  9:41 ` [PATCH net-next 06/13] net: renesas: rswitch: add forwarding rules for gwca Michael Dege
2026-03-17 16:15   ` Geert Uytterhoeven
2026-03-18  6:15     ` Michael Dege
2026-03-17  9:42 ` [PATCH net-next 07/13] net: renesas: rswitch: make helper functions available to whole driver Michael Dege
2026-03-17  9:42 ` [PATCH net-next 08/13] net: renesas: rswitch: add basic vlan init to rswitch_fwd_init Michael Dege
2026-03-17  9:42 ` [PATCH net-next 09/13] net: renesas: rswitch: update port HW init Michael Dege
2026-03-17  9:42 ` [PATCH net-next 10/13] net: renesas: rswitch: clean up is_rdev rswitch_device checking Michael Dege
2026-03-17  9:42 ` [PATCH net-next 11/13] net: renesas: rswitch: add passing of rswitch_private into notifiers Michael Dege
2026-03-17  9:42 ` [PATCH net-next 12/13] net: renesas: rswitch: add handler for FDB notification Michael Dege
2026-03-17  9:42 ` [PATCH net-next 13/13] net: renesas: rswitch: add vlan aware switching Michael Dege
2026-03-19  1:29   ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox