diff options
| author | David S. Miller <davem@davemloft.net> | 2020-01-14 18:53:36 -0800 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2020-01-14 18:53:36 -0800 |
| commit | f6310b61076028dfa5c11d9d68c7ad4adcb7742e (patch) | |
| tree | 29fafc9dd27552631fc104fd9160dffbd6f30970 /include/uapi/linux | |
| parent | 0fadc0a2b1c472c50a6d05b76c5f73c769bce81e (diff) | |
| parent | 212a37c225aed5d7dbe20cb1c1881bf7d35cbc54 (diff) | |
| download | cachepc-linux-f6310b61076028dfa5c11d9d68c7ad4adcb7742e.tar.gz cachepc-linux-f6310b61076028dfa5c11d9d68c7ad4adcb7742e.zip | |
Merge branch 'net-Add-route-offload-indication'
Ido Schimmel says:
====================
net: Add route offload indication
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.
v2 (feedback from David Ahern):
* Patch #2: Name last argument of fib_dump_info()
* Patch #2: Move 'struct fib_rt_info' to include/net/ip_fib.h so that it
could later be passed to fib_alias_hw_flags_set()
* Patch #3: Make use of 'struct fib_rt_info' in fib_alias_hw_flags_set()
* Patch #6: Convert to new fib_alias_hw_flags_set() interface
* Patch #7: Convert to new fib_alias_hw_flags_set() interface
[1] https://patchwork.ozlabs.org/cover/1170530/
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux')
| -rw-r--r-- | include/uapi/linux/rtnetlink.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h index 1418a8362bb7..cd43321d20dd 100644 --- a/include/uapi/linux/rtnetlink.h +++ b/include/uapi/linux/rtnetlink.h @@ -309,6 +309,8 @@ enum rt_scope_t { #define RTM_F_PREFIX 0x800 /* Prefix addresses */ #define RTM_F_LOOKUP_TABLE 0x1000 /* set rtm_table to FIB lookup result */ #define RTM_F_FIB_MATCH 0x2000 /* return full fib lookup match */ +#define RTM_F_OFFLOAD 0x4000 /* route is offloaded */ +#define RTM_F_TRAP 0x8000 /* route is trapping packets */ /* Reserved table identifiers */ |
