Skip to content

RFC net: dsa: microchip: vlan configuration for bridge_vlan_unaware ports

Arun Ramadoss lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4net: dsa: microchip: modify vlan_add function prototypedrivers/net/dsa/microchip/ksz8.h drivers/net/dsa/microchip/ksz8795.c drivers/net/dsa/microchip/ksz9477.c +3 more+24 -352 replies
2/4net: dsa: microchip: lan937x: remove vlan_filtering_is_global flagdrivers/net/dsa/microchip/lan937x_main.c+0 -53 replies
3/4net: dsa: microchip: common ksz pvid get and set functiondrivers/net/dsa/microchip/ksz8795.c drivers/net/dsa/microchip/ksz9477.c drivers/net/dsa/microchip/ksz_common.c +1 more+37 -92 replies
4/4net: dsa: microchip: use private pvid for bridge_vlan_unwawaredrivers/net/dsa/microchip/ksz8.h drivers/net/dsa/microchip/ksz8795.c drivers/net/dsa/microchip/ksz9477.c +3 more+95 -403 replies

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchVladimir OlteanFlorian Fainelli
1/4
2/4
3/4R-b R-b
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [Patch RFC net-next 0/4] net: dsa: microchip: vlan configuration for bridge_vlan_unaware ports

During refactoring of ksz spi probe, ds->configure_vlan_while_filtering flag is set in the ksz_setup function. It makes the extack warning when vlan_add command is used when vlan_filtering is turned off for the port.
To allow the vlan_add for the bridge vlan unaware ports, private pvid is used for it. This pvid is used for the vlan_unaware ports. The private pvid is added to the vlan_table during the port_setup function.
For the vlan aware ports, pvid issued by the user application will be used. Bridge vlan pvid is stored in the ksz port structure which can be used during transition between the vlan aware to unaware and vice versa.

Tested using the following sequence for ksz9477 and lan937x
----------------
Setup -> Host1 --- LAN1 -- LAN2 --- Host2

ip link set dev br0 type bridge vlan_filtering 0
bridge vlan add vid 5 dev lan1 pvid untagged
bridge vlan add vid 5 dev lan2 pvid untagged
bridge vlan del vid 5 dev lan1
bridge vlan del vid 5 dev lan2

After each step of execution, transmitted the packets from Host1 and successfully received by the Host2.

Arun Ramadoss (4):
net: dsa: microchip: modify vlan_add function prototype
net: dsa: microchip: lan937x: remove vlan_filtering_is_global flag
net: dsa: microchip: common ksz pvid get and set function
net: dsa: microchip: use private pvid for bridge_vlan_unwaware

 drivers/net/dsa/microchip/ksz8.h         |  6 +-
 drivers/net/dsa/microchip/ksz8795.c      | 42 +++-------
 drivers/net/dsa/microchip/ksz9477.c      | 40 ++++------
 drivers/net/dsa/microchip/ksz9477.h      |  5 +-
 drivers/net/dsa/microchip/ksz_common.c   | 98 +++++++++++++++++++++++-
 drivers/net/dsa/microchip/ksz_common.h   | 21 ++++-
 drivers/net/dsa/microchip/lan937x_main.c |  5 --
 7 files changed, 142 insertions(+), 75 deletions(-)

base-commit: ba323f6bee1d1e70aed280f8c89ac06959559855

Signature · 1 line
2.36.1