lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 14 Jan 2020 08:43:06 -0700
From:   David Ahern <>
To:     Ido Schimmel <>,
        Ido Schimmel <>
Subject: Re: [PATCH net-next v2 03/10] ipv4: Add "offload" and "trap"
 indications to routes

On 1/14/20 4:23 AM, Ido Schimmel wrote:
> From: Ido Schimmel <>
> When performing L3 offload, routes and nexthops are usually programmed
> into two different tables in the underlying device. Therefore, the fact
> that a nexthop resides in hardware does not necessarily mean that all
> the associated routes also reside in hardware and vice-versa.
> While the kernel can signal to user space the presence of a nexthop in
> hardware (via 'RTNH_F_OFFLOAD'), it does not have a corresponding flag
> for routes. In addition, the fact that a route resides in hardware does
> not necessarily mean that the traffic is offloaded. For example,
> unreachable routes (i.e., 'RTN_UNREACHABLE') are programmed to trap
> packets to the CPU so that the kernel will be able to generate the
> appropriate ICMP error packet.
> This patch adds an "offload" and "trap" indications to IPv4 routes, so
> that users will have better visibility into the offload process.
> 'struct fib_alias' is extended with two new fields that indicate if the
> route resides in hardware or not and if it is offloading traffic from
> the kernel or trapping packets to it. Note that the new fields are added
> in the 6 bytes hole and therefore the struct still fits in a single
> cache line [1].
> Capable drivers are expected to invoke fib_alias_hw_flags_set() with the
> route's key in order to set the flags.
> The indications are dumped to user space via a new flags (i.e.,
> 'RTM_F_OFFLOAD' and 'RTM_F_TRAP') in the 'rtm_flags' field in the
> ancillary header.


> Signed-off-by: Ido Schimmel <>
> ---
>  include/net/ip_fib.h           |  4 +++
>  include/uapi/linux/rtnetlink.h |  2 ++
>  net/ipv4/fib_lookup.h          |  3 ++
>  net/ipv4/fib_semantics.c       |  7 +++++
>  net/ipv4/fib_trie.c            | 52 ++++++++++++++++++++++++++++++++++
>  net/ipv4/route.c               | 19 +++++++++++++
>  6 files changed, 87 insertions(+)

Reviewed-by: David Ahern <>

Powered by blists - more mailing lists