Blackhole routes are routes that cause matching packets to be silently
dropped. This is in contrast to unreachable routes that generate an ICMP
host unreachable packet in response.

The driver currently programs both route types with a trap action and
lets the kernel drop matching packets. This is sub-optimal as packets
routed using a blackhole route can be directly dropped by the ASIC.

Patch #1 alters mlxsw to program blackhole routes with a discard action.

Patch #2 adds a matching test.

Ido Schimmel (2):
  mlxsw: spectrum_router: Offload blackhole routes
  selftests: mlxsw: Add a test for blackhole routes

 .../ethernet/mellanox/mlxsw/spectrum_router.c |  27 ++-
 .../drivers/net/mlxsw/blackhole_routes.sh     | 200 ++++++++++++++++++
 2 files changed, 225 insertions(+), 2 deletions(-)
 create mode 100755 
tools/testing/selftests/drivers/net/mlxsw/blackhole_routes.sh

-- 
2.20.1

Reply via email to