mirror-linux/drivers/net/ethernet/microchip/sparx5
Daniel Machon d84ad2c0d8 net: lan969x: add FDMA implementation
The lan969x switch device supports manual frame injection and extraction
to and from the switch core, using a number of injection and extraction
queues.  This technique is currently supported, but delivers poor
performance compared to Frame DMA (FDMA).

This lan969x implementation of FDMA, hooks into the existing FDMA for
Sparx5, but requires its own RX and TX handling, as lan969x does not
support the same native cache coherency that Sparx5 does. Effectively,
this means that we are going to use the DMA mapping API for mapping and
unmapping TX buffers. The RX loop will utilize the page pool API for
efficient RX handling. Other than that, the implementation is largely
the same, and utilizes the FDMA library for DCB and DB handling.

Some numbers:

Manual injection/extraction (before this series):

// iperf3 -c 1.0.1.1

[ ID] Interval           Transfer     Bitrate
[  5]   0.00-10.02  sec   345 MBytes   289 Mbits/sec  sender
[  5]   0.00-10.06  sec   345 MBytes   288 Mbits/sec  receiver

FDMA (after this series):

// iperf3 -c 1.0.1.1

[ ID] Interval           Transfer     Bitrate
[  5]   0.00-10.03  sec  1.10 GBytes   940 Mbits/sec  sender
[  5]   0.00-10.07  sec  1.10 GBytes   936 Mbits/sec  receiver

Reviewed-by: Steen Hegelund <Steen.Hegelund@microchip.com>
Signed-off-by: Daniel Machon <daniel.machon@microchip.com>
Link: https://patch.msgid.link/20250113-sparx5-lan969x-switch-driver-5-v2-5-c468f02fd623@microchip.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-01-15 14:13:33 -08:00
..
lan969x net: lan969x: add FDMA implementation 2025-01-15 14:13:33 -08:00
Kconfig net: lan969x: add FDMA implementation 2025-01-15 14:13:33 -08:00
Makefile net: lan969x: add FDMA implementation 2025-01-15 14:13:33 -08:00
sparx5_calendar.c net: lan969x: fix cyclic dependency reported by depmod 2024-12-09 13:30:16 +00:00
sparx5_dcb.c net: sparx5: use SPX5_CONST for constants which already have a symbol 2024-10-08 12:07:01 +02:00
sparx5_ethtool.c net: sparx5: add is_sparx5 macro and use it throughout 2024-10-08 12:07:01 +02:00
sparx5_fdma.c net: lan969x: add FDMA implementation 2025-01-15 14:13:33 -08:00
sparx5_mactable.c net: sparx5: redefine internal ports and PGID's as offsets 2024-10-08 12:07:02 +02:00
sparx5_main.c net: sparx5: ops out certain FDMA functions 2025-01-15 14:13:33 -08:00
sparx5_main.h net: lan969x: add FDMA implementation 2025-01-15 14:13:33 -08:00
sparx5_main_regs.h net: lan969x: add RGMII registers 2024-12-23 10:57:55 -08:00
sparx5_mirror.c net: sparx5: fix default value of monitor ports 2024-12-09 13:30:16 +00:00
sparx5_netdev.c net: sparx5: use is_sparx5() macro throughout 2024-10-30 18:08:06 -07:00
sparx5_packet.c net: lan969x: add FDMA implementation 2025-01-15 14:13:33 -08:00
sparx5_pgid.c net: sparx5: redefine internal ports and PGID's as offsets 2024-10-08 12:07:02 +02:00
sparx5_phylink.c net: phylink: pass neg_mode into .pcs_get_state() method 2025-01-15 13:23:30 -08:00
sparx5_police.c net: sparx5: ops out functions for getting certain array values 2024-10-08 12:07:01 +02:00
sparx5_pool.c
sparx5_port.c net: lan969x: add RGMII implementation 2024-12-23 10:57:56 -08:00
sparx5_port.h net: sparx5: add function for RGMII port check 2024-12-23 10:57:54 -08:00
sparx5_psfp.c net: sparx5: ops out functions for getting certain array values 2024-10-08 12:07:01 +02:00
sparx5_ptp.c net: lan969x: fix cyclic dependency reported by depmod 2024-12-09 13:30:16 +00:00
sparx5_qos.c net: sparx5: use is_sparx5() macro throughout 2024-10-30 18:08:06 -07:00
sparx5_qos.h net: sparx5: ops out functions for getting certain array values 2024-10-08 12:07:01 +02:00
sparx5_regs.c net: lan969x: add register diffs to match data 2024-10-30 18:08:05 -07:00
sparx5_regs.h net: lan969x: add register diffs to match data 2024-10-30 18:08:05 -07:00
sparx5_sdlb.c net: sparx5: change frequency calculation for SDLB's 2024-10-30 18:08:05 -07:00
sparx5_switchdev.c net: sparx5: redefine internal ports and PGID's as offsets 2024-10-08 12:07:02 +02:00
sparx5_tc.c net: sparx5: add *sparx5 argument to a few functions 2024-10-08 12:07:01 +02:00
sparx5_tc.h
sparx5_tc_flower.c net: sparx5: add feature support 2024-10-30 18:08:06 -07:00
sparx5_tc_matchall.c
sparx5_vcap_ag_api.c
sparx5_vcap_ag_api.h net: sparx5: add new VCAP constants to match data 2024-11-05 13:31:08 +01:00
sparx5_vcap_debugfs.c
sparx5_vcap_debugfs.h
sparx5_vcap_impl.c net: sparx5: add new VCAP constants to match data 2024-11-05 13:31:08 +01:00
sparx5_vcap_impl.h net: sparx5: expose some sparx5 VCAP symbols 2024-11-05 13:31:08 +01:00
sparx5_vlan.c net: sparx5: redefine internal ports and PGID's as offsets 2024-10-08 12:07:02 +02:00