diff options
author | Petr Machata | 2018-06-25 09:48:15 +0200 |
---|---|---|
committer | David S. Miller | 2018-06-26 11:05:22 +0200 |
commit | 0c41292bc5ffb4e514652731dfeda1552e2df120 (patch) | |
tree | 53bbe60d989926f37d5f57dba940a335a560b29a /drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | |
parent | mlxsw: spectrum_router: Allocate FID according to PVID (diff) | |
download | kernel-qcow2-linux-0c41292bc5ffb4e514652731dfeda1552e2df120.tar.gz kernel-qcow2-linux-0c41292bc5ffb4e514652731dfeda1552e2df120.tar.xz kernel-qcow2-linux-0c41292bc5ffb4e514652731dfeda1552e2df120.zip |
mlxsw: spectrum_router: Publish mlxsw_sp_rif_find_by_dev()
In order to guard against removal of a PVID for which a FID was
allocated, spectrum_switchdev needs to first determine whether there is
a RIF associated with a given bridge. To that end, publish a preexisting
function mlxsw_sp_rif_find_by_dev().
Signed-off-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c index c7243d3f91df..880092c6c94c 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c @@ -343,10 +343,6 @@ static void mlxsw_sp_rif_counters_free(struct mlxsw_sp_rif *rif) mlxsw_sp_rif_counter_free(mlxsw_sp, rif, MLXSW_SP_RIF_COUNTER_EGRESS); } -static struct mlxsw_sp_rif * -mlxsw_sp_rif_find_by_dev(const struct mlxsw_sp *mlxsw_sp, - const struct net_device *dev); - #define MLXSW_SP_PREFIX_COUNT (sizeof(struct in6_addr) * BITS_PER_BYTE + 1) struct mlxsw_sp_prefix_usage { @@ -5968,7 +5964,7 @@ static int mlxsw_sp_router_fib_event(struct notifier_block *nb, return NOTIFY_DONE; } -static struct mlxsw_sp_rif * +struct mlxsw_sp_rif * mlxsw_sp_rif_find_by_dev(const struct mlxsw_sp *mlxsw_sp, const struct net_device *dev) { |