Skip to content

net: dsa: mt7530: improve, trap BPDU & LLDP, and prefer CPU port

[email protected] linux-arm-kernel linux-mediatek lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest30 patches 90 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/30net: dsa: mt7530: add missing @p5_interface to mt7530_priv descriptiondrivers/net/dsa/mt7530.h+2 -11 reply
2/30net: dsa: mt7530: use p5_interface_select as data type for p5_intf_seldrivers/net/dsa/mt7530.h+2 -22 replies
3/30net: dsa: mt7530: properly support MT7531AE and MT7531BEdrivers/net/dsa/mt7530-mdio.c drivers/net/dsa/mt7530.c drivers/net/dsa/mt7530.h+22 -392 replies
4/30net: dsa: mt7530: improve comments regarding port 5 and 6drivers/net/dsa/mt7530.c+13 -62 replies
5/30net: dsa: mt7530: read XTAL value from correct registerdrivers/net/dsa/mt7530.c+1 -17 replies
6/30net: dsa: mt7530: improve code path for setting up port 5drivers/net/dsa/mt7530.c+8 -112 replies
7/30net: dsa: mt7530: do not run mt7530_setup_port5() if port 5 is disableddrivers/net/dsa/mt7530.c+3 -61 reply
8/30net: dsa: mt7530: change p{5,6}_interface to p{5,6}_configureddrivers/net/dsa/mt7530.c drivers/net/dsa/mt7530.h+10 -1926 replies
9/30net: dsa: mt7530: empty default case on mt7530_setup_port5()drivers/net/dsa/mt7530.c+1 -43 replies
10/30net: dsa: mt7530: call port 6 setup from mt7530_mac_config()drivers/net/dsa/mt7530.c+15 -61 reply
11/30net: dsa: mt7530: remove pad_setup function pointerdrivers/net/dsa/mt7530.c drivers/net/dsa/mt7530.h+2 -371 reply
12/30net: dsa: mt7530: move XTAL check to mt7530_setup()drivers/net/dsa/mt7530.c+10 -83 replies
13/30net: dsa: mt7530: move enabling port 6 to mt7530_setup_port6()drivers/net/dsa/mt7530.c+7 -30 replies
14/30net: dsa: mt7530: switch to if/else statements on mt7530_setup_port6()drivers/net/dsa/mt7530.c+11 -241 reply
15/30net: dsa: mt7530: set TRGMII RD TAP if trgmii is being useddrivers/net/dsa/mt7530.c+6 -51 reply
16/30net: dsa: mt7530: move lowering port 5 RGMII driving to mt7530_setup()drivers/net/dsa/mt7530.c+4 -43 replies
17/30net: dsa: mt7530: fix port capabilities for MT7988drivers/net/dsa/mt7530.c+1 -31 reply
18/30net: dsa: mt7530: remove .mac_port_config for MT7988 and make it optionaldrivers/net/dsa/mt7530.c+4 -141 reply
19/30net: dsa: mt7530: set interrupt register only for MT7530drivers/net/dsa/mt7530.c+1 -12 replies
20/30net: dsa: mt7530: properly reset MT7531 switchdrivers/net/dsa/mt7530.c+2 -40 replies
21/30net: dsa: mt7530: get rid of useless error returns on phylink code pathdrivers/net/dsa/mt7530.c drivers/net/dsa/mt7530.h+19 -680 replies
22/30net: dsa: mt7530: rename p5_intf_sel and use only for MT7530 switchdrivers/net/dsa/mt7530.c drivers/net/dsa/mt7530.h+32 -440 replies
23/30net: dsa: mt7530: run mt7530_pll_setup() only with 40 MHz XTALdrivers/net/dsa/mt7530.c+2 -10 replies
24/30net: dsa: mt7530: rename MT7530_MFC to MT753X_MFCdrivers/net/dsa/mt7530.c drivers/net/dsa/mt7530.h+39 -355 replies
25/30net: dsa: mt7530: properly set MT7531_CPU_PMAPdrivers/net/dsa/mt7530.c drivers/net/dsa/mt7530.h+10 -84 replies
26/30net: dsa: mt7530: properly set MT7530_CPU_PORTdrivers/net/dsa/mt7530.c drivers/net/dsa/mt7530.h+32 -72 replies
27/30net: dsa: mt7530: introduce BPDU trapping for MT7530 switchdrivers/net/dsa/mt7530.c+4 -07 replies
28/30net: dsa: mt7530: introduce LLDP frame trappingdrivers/net/dsa/mt7530.c drivers/net/dsa/mt7530.h+22 -130 replies
29/30net: dsa: introduce preferred_default_local_cpu_port and use on MT7530drivers/net/dsa/mt7530.c include/net/dsa.h net/dsa/dsa.c+46 -12 replies
30/30MAINTAINERS: add me as maintainer of MEDIATEK SWITCH DRIVERMAINTAINERS+3 -22 replies

Reviews trailers per patch

18 of 30 patches have a Reviewed-by or Acked-by.

PatchDaniel GolleArınç ÜNALAndrew LunnVladimir Oltean
SeriesT-b
1/30A-b R-b
2/30A-b
3/30A-b
4/30A-b R-b
5/30T-b R-b
6/30T-b
7/30T-b R-b
8/30A-b T-b
9/30T-b R-b
10/30T-b R-b
11/30A-b T-b R-b
12/30T-b R-b
13/30T-b
14/30T-b R-b
15/30T-b R-b
16/30T-b
17/30A-b
18/30R-b
19/30A-b T-b
20/30T-b
21/30A-b T-b T-b
22/30
23/30T-b
24/30
25/30T-b
26/30T-b
27/30T-b
28/30T-b
29/30
30/30R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v1 thread

Cover letter [PATCH net-next 00/30] net: dsa: mt7530: improve, trap BPDU & LLDP, and prefer CPU port

Hello!

This patch series simplifies the code, improves the logic of the switch hardware support, traps LLDP frames and BPDUs for MT7530, MT7531, and MT7988 SoC switches, and introduces the preferring local CPU port operation.

There's also a patch for fixing the port capabilities of the switch on the MT7988 SoC.

I have done a bidirectional speed test using iperf3 on all ports of the MT7530 and MT7531 switches with this patch series applied. I have tested every possible configuration on the MCM and standalone MT7530 and MT7531 switch. I'll let the name of the dtb files speak for themselves.

MT7621 Unielec:

only-gmac0-mt7621-unielec-u7621-06-16m.dtb
rgmii-only-gmac0-mt7621-unielec-u7621-06-16m.dtb
only-gmac1-mt7621-unielec-u7621-06-16m.dtb
gmac0-and-gmac1-mt7621-unielec-u7621-06-16m.dtb
phy0-muxing-mt7621-unielec-u7621-06-16m.dtb
phy4-muxing-mt7621-unielec-u7621-06-16m.dtb
port5-as-user-mt7621-unielec-u7621-06-16m.dtb

tftpboot 0x80008000 mips-uzImage-next-20230519.bin; tftpboot 0x83000000 mips-rootfs.cpio.uboot; tftpboot 0x83f00000 $dtb; bootm 0x80008000 0x83000000 0x83f00000

MT7622 Bananapi:

only-gmac0-mt7622-bananapi-bpi-r64.dtb
gmac0-and-gmac1-mt7622-bananapi-bpi-r64.dtb
port5-as-user-mt7622-bananapi-bpi-r64.dtb

tftpboot 0x40000000 arm64-Image-next-20230519; tftpboot 0x45000000 arm64-rootfs.cpio.uboot; tftpboot 0x4a000000 $dtb; booti 0x40000000 0x45000000 0x4a000000

MT7623 Bananapi:

only-gmac0-mt7623n-bananapi-bpi-r2.dtb
rgmii-only-gmac0-mt7623n-bananapi-bpi-r2.dtb
only-gmac1-mt7623n-bananapi-bpi-r2.dtb
gmac0-and-gmac1-mt7623n-bananapi-bpi-r2.dtb
phy0-muxing-mt7623n-bananapi-bpi-r2.dtb
phy4-muxing-mt7623n-bananapi-bpi-r2.dtb
port5-as-user-mt7623n-bananapi-bpi-r2.dtb

tftpboot 0x80008000 arm-zImage-next-20230519; tftpboot 0x83000000 arm-rootfs.cpio.uboot; tftpboot 0x83f00000 $dtb; bootz 0x80008000 0x83000000 0x83f00000

Arınç

Arınç ÜNAL (30):
net: dsa: mt7530: add missing @p5_interface to mt7530_priv description
net: dsa: mt7530: use p5_interface_select as data type for p5_intf_sel
net: dsa: mt7530: properly support MT7531AE and MT7531BE
net: dsa: mt7530: improve comments regarding port 5 and 6
net: dsa: mt7530: read XTAL value from correct register
net: dsa: mt7530: improve code path for setting up port 5
net: dsa: mt7530: do not run mt7530_setup_port5() if port 5 is disabled
net: dsa: mt7530: change p{5,6}_interface to p{5,6}_configured
net: dsa: mt7530: empty default case on mt7530_setup_port5()
net: dsa: mt7530: call port 6 setup from mt7530_mac_config()
net: dsa: mt7530: remove pad_setup function pointer
net: dsa: mt7530: move XTAL check to mt7530_setup()
net: dsa: mt7530: move enabling port 6 to mt7530_setup_port6()
net: dsa: mt7530: switch to if/else statements on mt7530_setup_port6()
net: dsa: mt7530: set TRGMII RD TAP if trgmii is being used
net: dsa: mt7530: move lowering port 5 RGMII driving to mt7530_setup()
net: dsa: mt7530: fix port capabilities for MT7988
net: dsa: mt7530: remove .mac_port_config for MT7988 and make it optional
net: dsa: mt7530: set interrupt register only for MT7530
net: dsa: mt7530: properly reset MT7531 switch
net: dsa: mt7530: get rid of useless error returns on phylink code path
net: dsa: mt7530: rename p5_intf_sel and use only for MT7530 switch
net: dsa: mt7530: run mt7530_pll_setup() only with 40 MHz XTAL
net: dsa: mt7530: rename MT7530_MFC to MT753X_MFC
net: dsa: mt7530: properly set MT7531_CPU_PMAP
net: dsa: mt7530: properly set MT7530_CPU_PORT
net: dsa: mt7530: introduce BPDU trapping for MT7530 switch
net: dsa: mt7530: introduce LLDP frame trapping
net: dsa: introduce preferred_default_local_cpu_port and use on MT7530
MAINTAINERS: add me as maintainer of MEDIATEK SWITCH DRIVER

 MAINTAINERS                   |   5 +-
 drivers/net/dsa/mt7530-mdio.c |   7 +-
 drivers/net/dsa/mt7530.c      | 470 ++++++++++++++++---------------------
 drivers/net/dsa/mt7530.h      | 107 +++++----
 include/net/dsa.h             |   8 +
 net/dsa/dsa.c                 |  24 +-
 6 files changed, 289 insertions(+), 332 deletions(-)