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>
This commit is contained in:
parent
e6f1960ae6
commit
0c41292bc5
2 changed files with 3 additions and 5 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -66,6 +66,8 @@ struct mlxsw_sp_neigh_entry;
|
|||
struct mlxsw_sp_nexthop;
|
||||
struct mlxsw_sp_ipip_entry;
|
||||
|
||||
struct mlxsw_sp_rif *mlxsw_sp_rif_find_by_dev(const struct mlxsw_sp *mlxsw_sp,
|
||||
const struct net_device *dev);
|
||||
struct mlxsw_sp_rif *mlxsw_sp_rif_by_index(const struct mlxsw_sp *mlxsw_sp,
|
||||
u16 rif_index);
|
||||
u16 mlxsw_sp_rif_index(const struct mlxsw_sp_rif *rif);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue