[PATCH mptcp-next v7 09/11] mptcp: sysctl: drop get_pm_type helper

Geliang Tang posted 11 patches 1 month, 1 week ago
There is a newer version of this series
[PATCH mptcp-next v7 09/11] mptcp: sysctl: drop get_pm_type helper
Posted by Geliang Tang 1 month, 1 week ago
From: Geliang Tang <tanggeliang@kylinos.cn>

The helper mptcp_get_pm_type() is unused now, it's replaced by the
new one mptcp_get_path_manager(). So drop it.

Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
---
 net/mptcp/ctrl.c     | 5 -----
 net/mptcp/protocol.h | 1 -
 2 files changed, 6 deletions(-)

diff --git a/net/mptcp/ctrl.c b/net/mptcp/ctrl.c
index 643472eb11b2..fd797f071886 100644
--- a/net/mptcp/ctrl.c
+++ b/net/mptcp/ctrl.c
@@ -79,11 +79,6 @@ unsigned int mptcp_close_timeout(const struct sock *sk)
 	return mptcp_get_pernet(sock_net(sk))->close_timeout;
 }
 
-int mptcp_get_pm_type(const struct net *net)
-{
-	return mptcp_get_pernet(net)->pm_type;
-}
-
 const char *mptcp_get_path_manager(const struct net *net)
 {
 	return mptcp_get_pernet(net)->path_manager;
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
index 56eeee1cbccc..3579c31650fa 100644
--- a/net/mptcp/protocol.h
+++ b/net/mptcp/protocol.h
@@ -693,7 +693,6 @@ int mptcp_is_checksum_enabled(const struct net *net);
 int mptcp_allow_join_id0(const struct net *net);
 unsigned int mptcp_stale_loss_cnt(const struct net *net);
 unsigned int mptcp_close_timeout(const struct sock *sk);
-int mptcp_get_pm_type(const struct net *net);
 const char *mptcp_get_path_manager(const struct net *net);
 const char *mptcp_get_scheduler(const struct net *net);
 
-- 
2.43.0
Re: [PATCH mptcp-next v7 09/11] mptcp: sysctl: drop get_pm_type helper
Posted by Matthieu Baerts 1 month, 1 week ago
Hi Geliang,

On 03/03/2025 05:22, Geliang Tang wrote:
> From: Geliang Tang <tanggeliang@kylinos.cn>
> 
> The helper mptcp_get_pm_type() is unused now, it's replaced by the
> new one mptcp_get_path_manager(). So drop it.

Same as with the previous commit: probably too early to drop it. If we
drop it, we should drop the variable in the mptcp_pernet structure, see
my comment on patch 3/11.

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.