Skip to content

mlxsw: Support for IPv6 UC router

Jiri Pirko netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest17 patches 17 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/17net: core: Make the FIB notification chain genericdrivers/net/ethernet/mellanox/mlxsw/spectrum_router.c drivers/net/ethernet/rocker/rocker_main.c include/net/fib_notifier.h +10 more+282 -932 replies
2/17mlxsw: spectrum_router: Ignore address families other than IPv4drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+2 -10 replies
3/17rocker: Ignore address families other than IPv4drivers/net/ethernet/rocker/rocker_main.c+4 -00 replies
4/17net: fib_rules: Implement notification logic in coreinclude/net/fib_rules.h include/net/ip_fib.h net/core/fib_rules.c +2 more+101 -490 replies
5/17ipv6: fib_rules: Check if rule is a default ruleinclude/net/ip6_fib.h net/ipv6/fib6_rules.c+25 -00 replies
6/17ipv6: fib: Add FIB notifiers callbacksinclude/net/ip6_fib.h include/net/netns/ipv6.h net/ipv6/Makefile +2 more+75 -10 replies
7/17ipv6: fib: Add in-kernel notifications for route add / deleteinclude/net/ip6_fib.h net/ipv6/ip6_fib.c+22 -02 replies
8/17ipv6: fib_rules: Dump rules during registration to FIB chaininclude/net/ip6_fib.h net/ipv6/fib6_notifier.c net/ipv6/fib6_rules.c+23 -20 replies
9/17ipv6: fib: Dump tables during registration to FIB chaininclude/net/ip6_fib.h net/ipv6/fib6_notifier.c net/ipv6/ip6_fib.c+104 -20 replies
10/17ipv6: fib: Add offload indication to routesinclude/uapi/linux/ipv6_route.h net/ipv6/route.c+17 -34 replies
11/17ipv6: fib: Allow non-FIB users to take reference on routeinclude/net/ip6_fib.h net/ipv6/ip6_fib.c net/ipv6/route.c+25 -63 replies
12/17mlxsw: spectrum_router: Demultiplex FIB event based on familydrivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+44 -210 replies
13/17mlxsw: spectrum_router: Sanitize IPv6 FIB rulesdrivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+25 -00 replies
14/17mlxsw: spectrum_router: Add support for IPv6 routes addition / deletiondrivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+682 -34 replies
15/17mlxsw: spectrum_router: Add support for route replacedrivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+49 -140 replies
16/17mlxsw: spectrum_router: Abort on source-specific routesdrivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+3 -02 replies
17/17mlxsw: spectrum_router: Don't ignore IPv6 notificationsdrivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+1 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [patch net-next 00/17] mlxsw: Support for IPv6 UC router

From: Jiri Pirko <[email protected]>

This set adds support for IPv6 unicast routes offload. The first four patches make the FIB notification chain generic so that it could be used by address families other than IPv4. This is done by having each address family register its callbacks with the common code, so that its FIB tables and rules could be dumped upon registration to the chain, while ensuring the integrity of the dump. The exact mechanics are explained in detail in the first patch.

The next seven patches build upon this work and add the necessary callbacks in IPv6 code. This allows listeners of the chain to receive notifications about IPv6 routes addition, deletion and replacement as well as FIB rules notifications.

Unlike user space notifications for IPv6 multipath routes, the FIB notification chain notifies these on a per-nexthop basis. This allows us to keep the common code lean and is also unnecessary, as notifications are serialized by each table's lock whereas applications maintaining netlink caches may suffer from concurrent dumps and deletions / additions of routes.

The last six patches enable the mlxsw driver to offload IPv6 unicast routes to the Spectrum ASIC. Without resorting to ACLs, lookup is done solely based on the destination IP, so the abort mechanism is invoked upon the addition of source-specific routes.

Follow-up patch sets will increase the scale of gatewayed routes by consolidating identical nexthop groups to one adjacency entry in the device's adjacency table (as in IPv4), as well as add support for NH_{ADD,DEL} events which enable support for the 'ignore_routes_with_linkdown' sysctl.

Ido Schimmel (17):
net: core: Make the FIB notification chain generic
mlxsw: spectrum_router: Ignore address families other than IPv4
rocker: Ignore address families other than IPv4
net: fib_rules: Implement notification logic in core
ipv6: fib_rules: Check if rule is a default rule
ipv6: fib: Add FIB notifiers callbacks
ipv6: fib: Add in-kernel notifications for route add / delete
ipv6: fib_rules: Dump rules during registration to FIB chain
ipv6: fib: Dump tables during registration to FIB chain
ipv6: fib: Add offload indication to routes
ipv6: fib: Allow non-FIB users to take reference on route
mlxsw: spectrum_router: Demultiplex FIB event based on family
mlxsw: spectrum_router: Sanitize IPv6 FIB rules
mlxsw: spectrum_router: Add support for IPv6 routes addition /
deletion
mlxsw: spectrum_router: Add support for route replace
mlxsw: spectrum_router: Abort on source-specific routes
mlxsw: spectrum_router: Don't ignore IPv6 notifications

 .../net/ethernet/mellanox/mlxsw/spectrum_router.c  | 815 ++++++++++++++++++++-
 drivers/net/ethernet/rocker/rocker_main.c          |   5 +
 include/net/fib_notifier.h                         |  44 ++
 include/net/fib_rules.h                            |   9 +
 include/net/ip6_fib.h                              |  52 ++
 include/net/ip_fib.h                               |  54 +-
 include/net/net_namespace.h                        |   1 +
 include/net/netns/ipv4.h                           |   1 +
 include/net/netns/ipv6.h                           |   1 +
 include/uapi/linux/ipv6_route.h                    |   1 +
 net/core/Makefile                                  |   3 +-
 net/core/fib_notifier.c                            | 164 +++++
 net/core/fib_rules.c                               |  63 ++
 net/ipv4/fib_frontend.c                            |  17 +-
 net/ipv4/fib_notifier.c                            |  99 ++-
 net/ipv4/fib_rules.c                               |  44 +-
 net/ipv4/fib_semantics.c                           |   9 +-
 net/ipv4/fib_trie.c                                |   5 +-
 net/ipv6/Makefile                                  |   2 +-
 net/ipv6/fib6_notifier.c                           |  61 ++
 net/ipv6/fib6_rules.c                              |  31 +
 net/ipv6/ip6_fib.c                                 | 126 +++-
 net/ipv6/route.c                                   |  23 +-
 23 files changed, 1459 insertions(+), 171 deletions(-)
 create mode 100644 include/net/fib_notifier.h
 create mode 100644 net/core/fib_notifier.c
 create mode 100644 net/ipv6/fib6_notifier.c
Signature · 1 line
2.9.3