lists.openwall.net   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  linux-cve-announce  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:   Wed, 2 Oct 2019 20:21:19 +0200
From:   Jiri Pirko <jiri@...nulli.us>
To:     Roopa Prabhu <roopa@...ulusnetworks.com>
Cc:     Ido Schimmel <idosch@...sch.org>, netdev <netdev@...r.kernel.org>,
        David Miller <davem@...emloft.net>,
        David Ahern <dsahern@...il.com>,
        Jiri Pirko <jiri@...lanox.com>,
        Jakub Kicinski <jakub.kicinski@...ronome.com>,
        Saeed Mahameed <saeedm@...lanox.com>,
        mlxsw <mlxsw@...lanox.com>, Ido Schimmel <idosch@...lanox.com>
Subject: Re: [RFC PATCH net-next 12/15] ipv4: Add "in hardware" indication to
 routes

Wed, Oct 02, 2019 at 05:58:52PM CEST, roopa@...ulusnetworks.com wrote:
>On Wed, Oct 2, 2019 at 1:41 AM Ido Schimmel <idosch@...sch.org> wrote:
>>
>> From: Ido Schimmel <idosch@...lanox.com>
>>
>> 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 "in hardware" indication to IPv4 routes, so that
>> users will have better visibility into the offload process. In the
>> future IPv6 will be extended with this indication as well.
>>
>> 'struct fib_alias' is extended with a new field that indicates if
>> the route resides in hardware or not. Note that the new field is 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_in_hw_{set,clear}()
>> with the route's key in order to set / clear the "in hardware
>> indication".
>>
>> The new indication is dumped to user space via a new flag (i.e.,
>> 'RTM_F_IN_HW') in the 'rtm_flags' field in the ancillary header.
>>
>
>nice series Ido. why not call this RTM_F_OFFLOAD to keep it consistent
>with the nexthop offload indication ?.

See the second paragraph of this description.


>But this again does not seem to be similar to the other request flags
>like: RTM_F_FIB_MATCH
>
>(so far i think all the RTNH_F_* flags are used on routes too IIRC
>(see iproute2: print_rt_flags)
>RTNH_F_DEAD seems to fall in this category)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ