Skip to content

mlxsw: Improve IPv6 route insertion rate

Ido Schimmel netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest16 patches 3 repliesIn review
  2. v117 patches 11 repliesSuperseded

Changes in v2 from the cover letter

* Remove patch adjusting netdevsim to consume resources for each fib6_info. Instead, consume one resource for the entire multipath route
* Remove 'multipath_rt' usage in patch #10
* Remove 'multipath_rt' from 'struct fib6_entry_notifier_info' in patch #15. The member is only removed in this patch to prevent drivers from processing multipath routes twice during the series

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/16netlink: Document all fields of 'struct nl_info'include/net/netlink.h+2 -00 replies
2/16netlink: Add field to skip in-kernel notificationsinclude/net/netlink.h+3 -10 replies
3/16ipv6: Extend notifier info for multipath routesinclude/net/ip6_fib.h net/ipv6/ip6_fib.c+24 -01 reply
4/16mlxsw: spectrum_router: Ignore IPv6 multipath notificationsdrivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+2 -00 replies
5/16netdevsim: Ignore IPv6 multipath notificationsdrivers/net/netdevsim/fib.c+7 -00 replies
6/16ipv6: Add IPv6 multipath notifications for add / replacenet/ipv6/route.c+15 -00 replies
7/16ipv6: Add IPv6 multipath notification for route deletenet/ipv6/route.c+6 -00 replies
8/16mlxsw: spectrum_router: Remove processing of IPv6 append notificationsdrivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+0 -20 replies
9/16mlxsw: spectrum_router: Prepare function to return errorsdrivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+11 -30 replies
10/16mlxsw: spectrum_router: Pass multiple routes to work itemdrivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+65 -70 replies
11/16mlxsw: spectrum_router: Adjust IPv6 replace logic to new notificationsdrivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+7 -70 replies
12/16mlxsw: spectrum_router: Pass array of routes to route handling functionsdrivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+10 -40 replies
13/16mlxsw: spectrum_router: Add / delete multiple IPv6 nexthopsdrivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+39 -220 replies
14/16mlxsw: spectrum_router: Create IPv6 multipath routes in one godrivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+23 -130 replies
15/16ipv6: Stop sending in-kernel notifications for each nexthopdrivers/net/ethernet/mellanox/mlxsw/spectrum_router.c drivers/net/netdevsim/fib.c include/net/ip6_fib.h +1 more+17 -221 reply
16/16selftests: mlxsw: Add a test for FIB offload indicationtools/testing/selftests/drivers/net/mlxsw/fib_offload.sh+349 -00 replies

Reviews trailers per patch

15 of 16 patches have a Reviewed-by or Acked-by.

PatchJiri PirkoDavid Ahern
1/16A-b R-b
2/16A-b R-b
3/16A-b R-b
4/16A-b
5/16A-b
6/16A-b R-b
7/16A-b R-b
8/16A-b
9/16A-b
10/16A-b
11/16A-b
12/16A-b
13/16A-b
14/16A-b
15/16A-b R-b
16/16

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH net-next v2 00/16] mlxsw: Improve IPv6 route insertion rate

From: Ido Schimmel <[email protected]>

Unlike IPv4, an IPv6 multipath route in the kernel is composed from multiple sibling routes, each representing a single nexthop.

Therefore, an addition of a multipath route with N nexthops translates to N in-kernel notifications. This is inefficient for device drivers that need to program the route to the underlying device. Each time a new nexthop is appended, a new nexthop group needs to be constructed and the old one deleted.

This patchset improves the situation by sending a single notification for a multipath route addition / deletion instead of one per-nexthop. When adding thousands of multipath routes with 16 nexthops, I measured an improvement of about x10 in the insertion rate.

Patches #1-#3 add a flag that indicates that in-kernel notifications need to be suppressed and extend the IPv6 FIB notification info with information about the number of sibling routes that are being notified.

Patches #4-#5 adjust the two current listeners to these notifications to ignore notifications about IPv6 multipath routes.

Patches #6-#7 adds add / delete notifications for IPv6 multipath routes.

Patches #8-#14 do the same for mlxsw.

Patch #15 finally removes the limitations added in patches #4-#5 and stops the kernel from sending a notification for each added / deleted nexthop.

Patch #16 adds test cases.

v2 (David Ahern):
* Remove patch adjusting netdevsim to consume resources for each fib6_info. Instead, consume one resource for the entire multipath route
* Remove 'multipath_rt' usage in patch #10
* Remove 'multipath_rt' from 'struct fib6_entry_notifier_info' in patch #15. The member is only removed in this patch to prevent drivers from processing multipath routes twice during the series

Ido Schimmel (16):
netlink: Document all fields of 'struct nl_info'
netlink: Add field to skip in-kernel notifications
ipv6: Extend notifier info for multipath routes
mlxsw: spectrum_router: Ignore IPv6 multipath notifications
netdevsim: Ignore IPv6 multipath notifications
ipv6: Add IPv6 multipath notifications for add / replace
ipv6: Add IPv6 multipath notification for route delete
mlxsw: spectrum_router: Remove processing of IPv6 append notifications
mlxsw: spectrum_router: Prepare function to return errors
mlxsw: spectrum_router: Pass multiple routes to work item
mlxsw: spectrum_router: Adjust IPv6 replace logic to new notifications
mlxsw: spectrum_router: Pass array of routes to route handling
functions
mlxsw: spectrum_router: Add / delete multiple IPv6 nexthops
mlxsw: spectrum_router: Create IPv6 multipath routes in one go
ipv6: Stop sending in-kernel notifications for each nexthop
selftests: mlxsw: Add a test for FIB offload indication

 .../ethernet/mellanox/mlxsw/spectrum_router.c | 209 ++++++++---
 include/net/ip6_fib.h                         |   6 +
 include/net/netlink.h                         |   6 +-
 net/ipv6/ip6_fib.c                            |  44 ++-
 net/ipv6/route.c                              |  21 ++
 .../drivers/net/mlxsw/fib_offload.sh          | 349 ++++++++++++++++++
 6 files changed, 567 insertions(+), 68 deletions(-)
 create mode 100755 tools/testing/selftests/drivers/net/mlxsw/fib_offload.sh
Signature · 1 line
2.20.1