OSDN Git Service

mlxsw: spectrum_router: Add nexthop bucket replacement support
authorIdo Schimmel <idosch@nvidia.com>
Wed, 24 Mar 2021 20:14:18 +0000 (22:14 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Mar 2021 23:34:57 +0000 (16:34 -0700)
commit617a77f044ed7a92bb0c01c939d816f870947d5a
treee03252b0827166da22fe6b837433fcec93560a97
parent197fdfd107e30a59e96691273b0b175cbf2471b8
mlxsw: spectrum_router: Add nexthop bucket replacement support

Replace a single nexthop bucket upon receiving a
'NEXTHOP_EVENT_BUCKET_REPLACE' notification.

When the 'force' parameter is not set, instruct the device to only
overwrite an adjacency entry if its activity is cleared, so as not to
break existing flows using the adjacency entry. The device does not
provide feedback if the replacement was successful in this case, so the
contents of the adjacency entry after the replacement are compared with
the replacement request.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c