Wed, Oct 02, 2019 at 05:58:52PM CEST, ro...@cumulusnetworks.com wrote: >On Wed, Oct 2, 2019 at 1:41 AM Ido Schimmel <ido...@idosch.org> wrote: >> >> From: Ido Schimmel <ido...@mellanox.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)