[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220508080823.32154-1-idosch@nvidia.com>
Date: Sun, 8 May 2022 11:08:13 +0300
From: Ido Schimmel <idosch@...dia.com>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
edumazet@...gle.com, petrm@...dia.com, mlxsw@...dia.com,
Ido Schimmel <idosch@...dia.com>
Subject: [PATCH net-next 00/10] mlxsw: A dedicated notifier block for router code
Petr says:
Currently all netdevice events are handled in the centralized notifier
handler maintained by spectrum.c. Since a number of events are involving
router code, spectrum.c needs to dispatch them to spectrum_router.c. The
spectrum module therefore needs to know more about the router code than it
should have, and there is are several API points through which the two
modules communicate.
In this patchset, move bulk of the router-related event handling to the
router code. Some of the knowledge has to stay: spectrum.c cannot veto
events that the router supports, and vice versa. But beyond that, the two
can ignore each other's details, which leads to more focused and simpler
code.
As a side effect, this fixes L3 HW stats support on tunnel netdevices.
The patch set progresses as follows:
- In patch #1, change spectrum code to not bounce L3 enslavement, which the
router code supports.
- In patch #2, add a new do-nothing notifier block to the router code.
- In patches #3-#6, move router-specific event handling to the router
module. In patch #7, clean up a comment.
- In patch #8, use the advantage that all router event handling is in the
router code and clean up taking router lock.
- mlxsw supports L3 HW stats on tunnels as of this patchset. Patches #9 and
#10 therefore add a selftest for L3 HW stats support on tunnels.
Petr Machata (10):
mlxsw: spectrum: Tolerate enslaving of various devices to VRF
mlxsw: spectrum_router: Add a dedicated notifier block
mlxsw: spectrum: Move handling of VRF events to router code
mlxsw: spectrum: Move handling of HW stats events to router code
mlxsw: spectrum: Move handling of router events to router code
mlxsw: spectrum: Move handling of tunnel events to router code
mlxsw: spectrum: Update a comment
mlxsw: spectrum_router: Take router lock in router notifier handler
selftests: lib: Add a generic helper for obtaining HW stats
selftests: forwarding: Add a tunnel-based test for L3 HW stats
.../net/ethernet/mellanox/mlxsw/spectrum.c | 66 ++------
.../net/ethernet/mellanox/mlxsw/spectrum.h | 17 --
.../ethernet/mellanox/mlxsw/spectrum_router.c | 160 +++++++++++++-----
.../ethernet/mellanox/mlxsw/spectrum_router.h | 1 +
.../testing/selftests/net/forwarding/Makefile | 1 +
.../selftests/net/forwarding/hw_stats_l3.sh | 16 +-
.../net/forwarding/hw_stats_l3_gre.sh | 109 ++++++++++++
tools/testing/selftests/net/forwarding/lib.sh | 11 ++
8 files changed, 259 insertions(+), 122 deletions(-)
create mode 100755 tools/testing/selftests/net/forwarding/hw_stats_l3_gre.sh
--
2.35.1
Powered by blists - more mailing lists