netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 00/10] net: Add route offload indication
@ 2020-01-07 15:45 Ido Schimmel
  2020-01-07 15:45 ` [PATCH net-next 01/10] ipv4: Replace route in list before notifying Ido Schimmel
                   ` (9 more replies)
  0 siblings, 10 replies; 17+ messages in thread
From: Ido Schimmel @ 2020-01-07 15:45 UTC (permalink / raw)
  To: netdev; +Cc: davem, jiri, jakub.kicinski, dsahern, roopa, mlxsw, Ido Schimmel

From: Ido Schimmel <idosch@mellanox.com>

This patch set adds offload indication to IPv4 and IPv6 routes. So far
offload indication was only available for the nexthop via
'RTNH_F_OFFLOAD', which is problematic as a nexthop is usually shared
between multiple routes.

Based on feedback from Roopa and David on the RFC [1], the indication is
split to 'offload' and 'trap'. This is done because not all the routes
present in hardware actually offload traffic from the kernel. For
example, host routes merely trap packets to the kernel. The two flags
are dumped to user space via the 'rtm_flags' field in the ancillary
header of the rtnetlink message.

In addition, the patch set uses the new flags in order to test the FIB
offload API by adding a dummy FIB offload implementation to netdevsim.
The new tests are added to a shared library and can be therefore shared
between different drivers.

Patches #1-#3 add offload indication to IPv4 routes.
Patches #4 adds offload indication to IPv6 routes.
Patches #5-#6 add support for the offload indication in mlxsw.
Patch #7 adds dummy FIB offload implementation in netdevsim.
Patches #8-#10 add selftests.

[1] https://patchwork.ozlabs.org/cover/1170530/

Ido Schimmel (10):
  ipv4: Replace route in list before notifying
  ipv4: Encapsulate function arguments in a struct
  ipv4: Add "offload" and "trap" indications to routes
  ipv6: Add "offload" and "trap" indications to routes
  mlxsw: spectrum_router: Separate nexthop offload indication from route
  mlxsw: spectrum_router: Set hardware flags for routes
  netdevsim: fib: Add dummy implementation for FIB offload
  selftests: forwarding: Add helpers and tests for FIB offload
  selftests: netdevsim: Add test for FIB offload API
  selftests: mlxsw: Add test for FIB offload API

 drivers/net/Kconfig                           |   1 +
 .../ethernet/mellanox/mlxsw/spectrum_router.c | 233 +++--
 drivers/net/netdevsim/fib.c                   | 664 ++++++++++++-
 include/net/ip6_fib.h                         |  11 +-
 include/net/ip_fib.h                          |   4 +
 include/uapi/linux/rtnetlink.h                |   2 +
 net/ipv4/fib_lookup.h                         |  20 +-
 net/ipv4/fib_semantics.c                      |  33 +-
 net/ipv4/fib_trie.c                           |  81 +-
 net/ipv4/route.c                              |  31 +-
 net/ipv6/route.c                              |   7 +
 .../selftests/drivers/net/mlxsw/fib.sh        | 180 ++++
 .../selftests/drivers/net/netdevsim/fib.sh    | 341 +++++++
 .../net/forwarding/fib_offload_lib.sh         | 873 ++++++++++++++++++
 14 files changed, 2352 insertions(+), 129 deletions(-)
 create mode 100755 tools/testing/selftests/drivers/net/mlxsw/fib.sh
 create mode 100755 tools/testing/selftests/drivers/net/netdevsim/fib.sh
 create mode 100644 tools/testing/selftests/net/forwarding/fib_offload_lib.sh

-- 
2.24.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2020-01-09 16:22 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-07 15:45 [PATCH net-next 00/10] net: Add route offload indication Ido Schimmel
2020-01-07 15:45 ` [PATCH net-next 01/10] ipv4: Replace route in list before notifying Ido Schimmel
2020-01-08 18:33   ` David Ahern
2020-01-07 15:45 ` [PATCH net-next 02/10] ipv4: Encapsulate function arguments in a struct Ido Schimmel
2020-01-08 18:37   ` David Ahern
2020-01-09  8:26     ` Ido Schimmel
2020-01-07 15:45 ` [PATCH net-next 03/10] ipv4: Add "offload" and "trap" indications to routes Ido Schimmel
2020-01-09 15:47   ` David Ahern
2020-01-07 15:45 ` [PATCH net-next 04/10] ipv6: " Ido Schimmel
2020-01-09 15:48   ` David Ahern
2020-01-09 16:24   ` Roopa Prabhu
2020-01-07 15:45 ` [PATCH net-next 05/10] mlxsw: spectrum_router: Separate nexthop offload indication from route Ido Schimmel
2020-01-07 15:45 ` [PATCH net-next 06/10] mlxsw: spectrum_router: Set hardware flags for routes Ido Schimmel
2020-01-07 15:45 ` [PATCH net-next 07/10] netdevsim: fib: Add dummy implementation for FIB offload Ido Schimmel
2020-01-07 15:45 ` [PATCH net-next 08/10] selftests: forwarding: Add helpers and tests " Ido Schimmel
2020-01-07 15:45 ` [PATCH net-next 09/10] selftests: netdevsim: Add test for FIB offload API Ido Schimmel
2020-01-07 15:45 ` [PATCH net-next 10/10] selftests: mlxsw: " Ido Schimmel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).