OSDN Git Service

mlxsw: Convert does-RIF-have-this-netdev queries to a dedicated helper
authorPetr Machata <petrm@nvidia.com>
Fri, 9 Jun 2023 17:32:12 +0000 (19:32 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 12 Jun 2023 08:49:30 +0000 (09:49 +0100)
commit5374a50f2eb617022cdd1aab6b1b7d4d2a952d56
treeb1d42a6e1ae351fb46ca8c5ed1921a97495677a3
parent0255f74845c0035d918697b7abff1fcf45ed2789
mlxsw: Convert does-RIF-have-this-netdev queries to a dedicated helper

In a number of places, a netdevice underlying a RIF is obtained only to
compare it to another pointer. In order to clean up the interface between
the router and the other modules, add a new helper to specifically answer
this question, and convert the relevant uses to this new interface.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Amit Cohen <amcohen@nvidia.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h