* [PATCH net-next] mlxsw: spectrum_router: Remove unused functions
@ 2025-02-03 19:01 linux
2025-02-04 9:24 ` Ido Schimmel
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: linux @ 2025-02-03 19:01 UTC (permalink / raw)
To: idosch, petrm, andrew+netdev, davem, edumazet, kuba, pabeni
Cc: netdev, linux-kernel, Dr. David Alan Gilbert
From: "Dr. David Alan Gilbert" <linux@treblig.org>
mlxsw_sp_ipip_lb_ul_vr_id() has been unused since 2020's
commit acde33bf7319 ("mlxsw: spectrum_router: Reduce
mlxsw_sp_ipip_fib_entry_op_gre4()")
mlxsw_sp_rif_exists() has been unused since 2023's
commit 49c3a615d382 ("mlxsw: spectrum_router: Replay MACVLANs when RIF is
made")
mlxsw_sp_rif_vid() has been unused since 2023's
commit a5b52692e693 ("mlxsw: spectrum_switchdev: Manage RIFs on PVID
change")
Remove them.
Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
---
.../net/ethernet/mellanox/mlxsw/spectrum.h | 3 --
.../ethernet/mellanox/mlxsw/spectrum_router.c | 48 -------------------
.../ethernet/mellanox/mlxsw/spectrum_router.h | 1 -
3 files changed, 52 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
index b10f80fc651b..fa7082ee5183 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
@@ -754,9 +754,6 @@ void
mlxsw_sp_port_vlan_router_leave(struct mlxsw_sp_port_vlan *mlxsw_sp_port_vlan);
void mlxsw_sp_rif_destroy_by_dev(struct mlxsw_sp *mlxsw_sp,
struct net_device *dev);
-bool mlxsw_sp_rif_exists(struct mlxsw_sp *mlxsw_sp,
- const struct net_device *dev);
-u16 mlxsw_sp_rif_vid(struct mlxsw_sp *mlxsw_sp, const struct net_device *dev);
u16 mlxsw_sp_router_port(const struct mlxsw_sp *mlxsw_sp);
int mlxsw_sp_router_nve_promote_decap(struct mlxsw_sp *mlxsw_sp, u32 ul_tb_id,
enum mlxsw_sp_l3proto ul_proto,
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
index 7d6d859cef3f..464821dd492d 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
@@ -8184,41 +8184,6 @@ mlxsw_sp_rif_find_by_dev(const struct mlxsw_sp *mlxsw_sp,
return NULL;
}
-bool mlxsw_sp_rif_exists(struct mlxsw_sp *mlxsw_sp,
- const struct net_device *dev)
-{
- struct mlxsw_sp_rif *rif;
-
- mutex_lock(&mlxsw_sp->router->lock);
- rif = mlxsw_sp_rif_find_by_dev(mlxsw_sp, dev);
- mutex_unlock(&mlxsw_sp->router->lock);
-
- return rif;
-}
-
-u16 mlxsw_sp_rif_vid(struct mlxsw_sp *mlxsw_sp, const struct net_device *dev)
-{
- struct mlxsw_sp_rif *rif;
- u16 vid = 0;
-
- mutex_lock(&mlxsw_sp->router->lock);
- rif = mlxsw_sp_rif_find_by_dev(mlxsw_sp, dev);
- if (!rif)
- goto out;
-
- /* We only return the VID for VLAN RIFs. Otherwise we return an
- * invalid value (0).
- */
- if (rif->ops->type != MLXSW_SP_RIF_TYPE_VLAN)
- goto out;
-
- vid = mlxsw_sp_fid_8021q_vid(rif->fid);
-
-out:
- mutex_unlock(&mlxsw_sp->router->lock);
- return vid;
-}
-
static int mlxsw_sp_router_rif_disable(struct mlxsw_sp *mlxsw_sp, u16 rif)
{
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)
return lb_rif->common.rif_index;
}
-u16 mlxsw_sp_ipip_lb_ul_vr_id(const struct mlxsw_sp_rif_ipip_lb *lb_rif)
-{
- struct net_device *dev = mlxsw_sp_rif_dev(&lb_rif->common);
- u32 ul_tb_id = mlxsw_sp_ipip_dev_ul_tb_id(dev);
- struct mlxsw_sp_vr *ul_vr;
-
- ul_vr = mlxsw_sp_vr_get(lb_rif->common.mlxsw_sp, ul_tb_id, NULL);
- if (WARN_ON(IS_ERR(ul_vr)))
- return 0;
-
- return ul_vr->id;
-}
-
u16 mlxsw_sp_ipip_lb_ul_rif_id(const struct mlxsw_sp_rif_ipip_lb *lb_rif)
{
return lb_rif->ul_rif_id;
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h
index 0432c7cc6b07..313efab5c324 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h
@@ -90,7 +90,6 @@ struct mlxsw_sp_ipip_entry;
struct mlxsw_sp_rif *mlxsw_sp_rif_by_index(const struct mlxsw_sp *mlxsw_sp,
u16 rif_index);
u16 mlxsw_sp_ipip_lb_rif_index(const struct mlxsw_sp_rif_ipip_lb *rif);
-u16 mlxsw_sp_ipip_lb_ul_vr_id(const struct mlxsw_sp_rif_ipip_lb *rif);
u16 mlxsw_sp_ipip_lb_ul_rif_id(const struct mlxsw_sp_rif_ipip_lb *lb_rif);
u32 mlxsw_sp_ipip_dev_ul_tb_id(const struct net_device *ol_dev);
int mlxsw_sp_rif_dev_ifindex(const struct mlxsw_sp_rif *rif);
--
2.48.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] mlxsw: spectrum_router: Remove unused functions
2025-02-03 19:01 [PATCH net-next] mlxsw: spectrum_router: Remove unused functions linux
@ 2025-02-04 9:24 ` Ido Schimmel
2025-02-04 9:52 ` Petr Machata
2025-02-04 22:20 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Ido Schimmel @ 2025-02-04 9:24 UTC (permalink / raw)
To: linux
Cc: petrm, andrew+netdev, davem, edumazet, kuba, pabeni, netdev,
linux-kernel
On Mon, Feb 03, 2025 at 07:01:41PM +0000, linux@treblig.org wrote:
> From: "Dr. David Alan Gilbert" <linux@treblig.org>
>
> mlxsw_sp_ipip_lb_ul_vr_id() has been unused since 2020's
> commit acde33bf7319 ("mlxsw: spectrum_router: Reduce
> mlxsw_sp_ipip_fib_entry_op_gre4()")
>
> mlxsw_sp_rif_exists() has been unused since 2023's
> commit 49c3a615d382 ("mlxsw: spectrum_router: Replay MACVLANs when RIF is
> made")
>
> mlxsw_sp_rif_vid() has been unused since 2023's
> commit a5b52692e693 ("mlxsw: spectrum_switchdev: Manage RIFs on PVID
> change")
>
> Remove them.
>
> Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] mlxsw: spectrum_router: Remove unused functions
2025-02-03 19:01 [PATCH net-next] mlxsw: spectrum_router: Remove unused functions linux
2025-02-04 9:24 ` Ido Schimmel
@ 2025-02-04 9:52 ` Petr Machata
2025-02-04 22:20 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Petr Machata @ 2025-02-04 9:52 UTC (permalink / raw)
To: linux
Cc: idosch, petrm, andrew+netdev, davem, edumazet, kuba, pabeni,
netdev, linux-kernel
linux@treblig.org writes:
> From: "Dr. David Alan Gilbert" <linux@treblig.org>
>
> mlxsw_sp_ipip_lb_ul_vr_id() has been unused since 2020's
> commit acde33bf7319 ("mlxsw: spectrum_router: Reduce
> mlxsw_sp_ipip_fib_entry_op_gre4()")
>
> mlxsw_sp_rif_exists() has been unused since 2023's
> commit 49c3a615d382 ("mlxsw: spectrum_router: Replay MACVLANs when RIF is
> made")
>
> mlxsw_sp_rif_vid() has been unused since 2023's
> commit a5b52692e693 ("mlxsw: spectrum_switchdev: Manage RIFs on PVID
> change")
>
> Remove them.
>
> Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] mlxsw: spectrum_router: Remove unused functions
2025-02-03 19:01 [PATCH net-next] mlxsw: spectrum_router: Remove unused functions linux
2025-02-04 9:24 ` Ido Schimmel
2025-02-04 9:52 ` Petr Machata
@ 2025-02-04 22:20 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-02-04 22:20 UTC (permalink / raw)
To: Dr. David Alan Gilbert
Cc: idosch, petrm, andrew+netdev, davem, edumazet, kuba, pabeni,
netdev, linux-kernel
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Mon, 3 Feb 2025 19:01:41 +0000 you wrote:
> From: "Dr. David Alan Gilbert" <linux@treblig.org>
>
> mlxsw_sp_ipip_lb_ul_vr_id() has been unused since 2020's
> commit acde33bf7319 ("mlxsw: spectrum_router: Reduce
> mlxsw_sp_ipip_fib_entry_op_gre4()")
>
> mlxsw_sp_rif_exists() has been unused since 2023's
> commit 49c3a615d382 ("mlxsw: spectrum_router: Replay MACVLANs when RIF is
> made")
>
> [...]
Here is the summary with links:
- [net-next] mlxsw: spectrum_router: Remove unused functions
https://git.kernel.org/netdev/net-next/c/626b36727609
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-02-04 22:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-03 19:01 [PATCH net-next] mlxsw: spectrum_router: Remove unused functions linux
2025-02-04 9:24 ` Ido Schimmel
2025-02-04 9:52 ` Petr Machata
2025-02-04 22:20 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).