Skip to content

Commit 626b367

Browse files
Dr. David Alan Gilbertkuba-moo
authored andcommitted
mlxsw: spectrum_router: Remove unused functions
mlxsw_sp_ipip_lb_ul_vr_id() has been unused since 2020's commit acde33b ("mlxsw: spectrum_router: Reduce mlxsw_sp_ipip_fib_entry_op_gre4()") mlxsw_sp_rif_exists() has been unused since 2023's commit 49c3a61 ("mlxsw: spectrum_router: Replay MACVLANs when RIF is made") mlxsw_sp_rif_vid() has been unused since 2023's commit a5b5269 ("mlxsw: spectrum_switchdev: Manage RIFs on PVID change") Remove them. Signed-off-by: Dr. David Alan Gilbert <[email protected]> Reviewed-by: Ido Schimmel <[email protected]> Reviewed-by: Petr Machata <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 15c51f1 commit 626b367

File tree

3 files changed

+0
-52
lines changed

3 files changed

+0
-52
lines changed

drivers/net/ethernet/mellanox/mlxsw/spectrum.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -754,9 +754,6 @@ void
754754
mlxsw_sp_port_vlan_router_leave(struct mlxsw_sp_port_vlan *mlxsw_sp_port_vlan);
755755
void mlxsw_sp_rif_destroy_by_dev(struct mlxsw_sp *mlxsw_sp,
756756
struct net_device *dev);
757-
bool mlxsw_sp_rif_exists(struct mlxsw_sp *mlxsw_sp,
758-
const struct net_device *dev);
759-
u16 mlxsw_sp_rif_vid(struct mlxsw_sp *mlxsw_sp, const struct net_device *dev);
760757
u16 mlxsw_sp_router_port(const struct mlxsw_sp *mlxsw_sp);
761758
int mlxsw_sp_router_nve_promote_decap(struct mlxsw_sp *mlxsw_sp, u32 ul_tb_id,
762759
enum mlxsw_sp_l3proto ul_proto,

drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -8184,41 +8184,6 @@ mlxsw_sp_rif_find_by_dev(const struct mlxsw_sp *mlxsw_sp,
81848184
return NULL;
81858185
}
81868186

8187-
bool mlxsw_sp_rif_exists(struct mlxsw_sp *mlxsw_sp,
8188-
const struct net_device *dev)
8189-
{
8190-
struct mlxsw_sp_rif *rif;
8191-
8192-
mutex_lock(&mlxsw_sp->router->lock);
8193-
rif = mlxsw_sp_rif_find_by_dev(mlxsw_sp, dev);
8194-
mutex_unlock(&mlxsw_sp->router->lock);
8195-
8196-
return rif;
8197-
}
8198-
8199-
u16 mlxsw_sp_rif_vid(struct mlxsw_sp *mlxsw_sp, const struct net_device *dev)
8200-
{
8201-
struct mlxsw_sp_rif *rif;
8202-
u16 vid = 0;
8203-
8204-
mutex_lock(&mlxsw_sp->router->lock);
8205-
rif = mlxsw_sp_rif_find_by_dev(mlxsw_sp, dev);
8206-
if (!rif)
8207-
goto out;
8208-
8209-
/* We only return the VID for VLAN RIFs. Otherwise we return an
8210-
* invalid value (0).
8211-
*/
8212-
if (rif->ops->type != MLXSW_SP_RIF_TYPE_VLAN)
8213-
goto out;
8214-
8215-
vid = mlxsw_sp_fid_8021q_vid(rif->fid);
8216-
8217-
out:
8218-
mutex_unlock(&mlxsw_sp->router->lock);
8219-
return vid;
8220-
}
8221-
82228187
static int mlxsw_sp_router_rif_disable(struct mlxsw_sp *mlxsw_sp, u16 rif)
82238188
{
82248189
char ritr_pl[MLXSW_REG_RITR_LEN];
@@ -8417,19 +8382,6 @@ u16 mlxsw_sp_ipip_lb_rif_index(const struct mlxsw_sp_rif_ipip_lb *lb_rif)
84178382
return lb_rif->common.rif_index;
84188383
}
84198384

8420-
u16 mlxsw_sp_ipip_lb_ul_vr_id(const struct mlxsw_sp_rif_ipip_lb *lb_rif)
8421-
{
8422-
struct net_device *dev = mlxsw_sp_rif_dev(&lb_rif->common);
8423-
u32 ul_tb_id = mlxsw_sp_ipip_dev_ul_tb_id(dev);
8424-
struct mlxsw_sp_vr *ul_vr;
8425-
8426-
ul_vr = mlxsw_sp_vr_get(lb_rif->common.mlxsw_sp, ul_tb_id, NULL);
8427-
if (WARN_ON(IS_ERR(ul_vr)))
8428-
return 0;
8429-
8430-
return ul_vr->id;
8431-
}
8432-
84338385
u16 mlxsw_sp_ipip_lb_ul_rif_id(const struct mlxsw_sp_rif_ipip_lb *lb_rif)
84348386
{
84358387
return lb_rif->ul_rif_id;

drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ struct mlxsw_sp_ipip_entry;
9090
struct mlxsw_sp_rif *mlxsw_sp_rif_by_index(const struct mlxsw_sp *mlxsw_sp,
9191
u16 rif_index);
9292
u16 mlxsw_sp_ipip_lb_rif_index(const struct mlxsw_sp_rif_ipip_lb *rif);
93-
u16 mlxsw_sp_ipip_lb_ul_vr_id(const struct mlxsw_sp_rif_ipip_lb *rif);
9493
u16 mlxsw_sp_ipip_lb_ul_rif_id(const struct mlxsw_sp_rif_ipip_lb *lb_rif);
9594
u32 mlxsw_sp_ipip_dev_ul_tb_id(const struct net_device *ol_dev);
9695
int mlxsw_sp_rif_dev_ifindex(const struct mlxsw_sp_rif *rif);

0 commit comments

Comments
 (0)