]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_router: Don't check state when refreshing offload indication
authorIdo Schimmel <idosch@mellanox.com>
Wed, 2 Aug 2017 07:56:04 +0000 (09:56 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Aug 2017 00:00:23 +0000 (17:00 -0700)
commitc4fdd758f0e9da25d33f9076e5ed57a0db168a75
tree8c9d1da6969fff4f6c51f08ad6e1e61e146ddecc
parentda06164dd98fe3e3b3795ba240e93ca6999aaf19
mlxsw: spectrum_router: Don't check state when refreshing offload indication

Previous patch removed the reliance on the counter in the FIB info to
set the offload indication, so we no longer need to keep an offload
state on each FIB entry and can just set or unset the RTNH_F_OFFLOAD
flag in each nexthop.

This is also necessary because we're going to need to refresh the
offload indication whenever the nexthop group associated with the FIB
entry is refreshed. Current check would prevent us from marking a newly
resolved nexthop as offloaded if the FIB entry is already marked as
offloaded.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Tested-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c