mlxsw: Add layer 3 devlink-trap support
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest12 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/12 | devlink: Add layer 3 generic packet trapsDocumentation/ include/ net/ | +77 | 0 replies | |
| 2/12 | mlxsw: Add layer 3 devlink-trap supportdrivers/ drivers/ drivers/ | +49 | 0 replies | |
| 3/12 | selftests: devlink: Export functions to devlink librarytools/ tools/ | +56 | 0 replies | |
| 4/12 | selftests: devlink: Make devlink_trap_cleanup() more generictools/ tools/ | +9 | 0 replies | |
| 5/12 | selftests: mlxsw: Add test cases for devlink-trap layer 3 dropstools/ | +563 | 0 replies | |
| 6/12 | devlink: Add layer 3 generic packet exception trapsDocumentation/ include/ net/ | +44 | 0 replies | |
| 7/12 | mlxsw: Add new FIB entry type for reject routesdrivers/ drivers/ drivers/ | +25 | 0 replies | |
| 8/12 | mlxsw: Add specific trap for packets routed via invalid nexthopsdrivers/ drivers/ drivers/ | +39 | 0 replies | |
| 9/12 | mlxsw: Add layer 3 devlink-trap exceptions supportdrivers/ drivers/ drivers/ | +65 | 0 replies | |
| 10/12 | selftests: forwarding: devlink: Add functionality for trap exceptions testtools/ | +12 | 0 replies | |
| 11/12 | selftests: forwarding: tc_common: Add hitting checktools/ | +11 | 0 replies | |
| 12/12 | selftests: mlxsw: Add test cases for devlink-trap layer 3 exceptionstools/ | +557 | 0 replies |
Reviews trailers per patch
All 12 patches have a Reviewed-by or Acked-by.
| Patch | Jiri Pirko |
|---|---|
| 1/12 | A-b |
| 2/12 | A-b |
| 3/12 | A-b |
| 4/12 | A-b |
| 5/12 | A-b |
| 6/12 | A-b |
| 7/12 | A-b |
| 8/12 | A-b |
| 9/12 | A-b |
| 10/12 | A-b |
| 11/12 | A-b |
| 12/12 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH net-next 00/12] mlxsw: Add layer 3 devlink-trap support
From: Ido Schimmel <[email protected]>
This patch set from Amit adds support in mlxsw for layer 3 traps that can report drops and exceptions via devlink-trap.
In a similar fashion to the existing layer 2 traps, these traps can send packets to the CPU that were not routed as intended by the underlying device.
The traps are divided between the two types detailed in devlink-trap
documentation: drops and exceptions. Unlike drops, packets received via exception traps are also injected to the kernel's receive path, as they are required for the correct functioning of the control plane. For example, packets trapped due to TTL error must be injected to kernel's receive path for traceroute to work properly.
Patch set overview:
Patch #1 adds the layer 3 drop traps to devlink along with their documentation.
Patch #2 adds support for layer 3 drop traps in mlxsw.
Patches #3-#5 add selftests for layer 3 drop traps.
Patch #6 adds the layer 3 exception traps to devlink along with their documentation.
Patches #7-#9 gradually add support for layer 3 exception traps in mlxsw.
Patches #10-#12 add selftests for layer 3 exception traps.
Amit Cohen (12):
devlink: Add layer 3 generic packet traps
mlxsw: Add layer 3 devlink-trap support
selftests: devlink: Export functions to devlink library
selftests: devlink: Make devlink_trap_cleanup() more generic
selftests: mlxsw: Add test cases for devlink-trap layer 3 drops
devlink: Add layer 3 generic packet exception traps
mlxsw: Add new FIB entry type for reject routes
mlxsw: Add specific trap for packets routed via invalid nexthops
mlxsw: Add layer 3 devlink-trap exceptions support
selftests: forwarding: devlink: Add functionality for trap exceptions
test
selftests: forwarding: tc_common: Add hitting check
selftests: mlxsw: Add test cases for devlink-trap layer 3 exceptions
Documentation/networking/devlink-trap.rst | 61 ++ drivers/net/ethernet/mellanox/mlxsw/reg.h | 1 + .../net/ethernet/mellanox/mlxsw/spectrum.c | 5 - .../ethernet/mellanox/mlxsw/spectrum_router.c | 61 +- .../ethernet/mellanox/mlxsw/spectrum_trap.c | 100 ++++ drivers/net/ethernet/mellanox/mlxsw/trap.h | 15 + include/net/devlink.h | 45 ++ net/core/devlink.c | 15 + .../net/mlxsw/devlink_trap_l2_drops.sh | 68 +-- .../net/mlxsw/devlink_trap_l3_drops.sh | 563 ++++++++++++++++++ .../net/mlxsw/devlink_trap_l3_exceptions.sh | 557 +++++++++++++++++ .../selftests/net/forwarding/devlink_lib.sh | 55 ++ .../selftests/net/forwarding/tc_common.sh | 11 + 13 files changed, 1496 insertions(+), 61 deletions(-) create mode 100755 tools/testing/selftests/drivers/net/mlxsw/devlink_trap_l3_drops.sh create mode 100755 tools/testing/selftests/drivers/net/mlxsw/devlink_trap_l3_exceptions.sh
Signature · 1 line
2.21.0