Skip to content

Commit ef5a3c4

Browse files
Geliang Tangintel-lab-lkp
authored andcommitted
mptcp: sysctl: drop old pm_type sysctl
Old path manager sysctl "pm_type" can be replaced by the newly added "path_manager". Drop it together with mptcp_get_pm_type() helper. Signed-off-by: Geliang Tang <[email protected]>
1 parent e510d5b commit ef5a3c4

File tree

3 files changed

+0
-38
lines changed

3 files changed

+0
-38
lines changed

Documentation/networking/mptcp-sysctl.rst

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -72,23 +72,6 @@ enabled - BOOLEAN
7272

7373
Default: 1 (enabled)
7474

75-
pm_type - INTEGER
76-
Set the default path manager type to use for each new MPTCP
77-
socket. In-kernel path management will control subflow
78-
connections and address advertisements according to
79-
per-namespace values configured over the MPTCP netlink
80-
API. Userspace path management puts per-MPTCP-connection subflow
81-
connection decisions and address advertisements under control of
82-
a privileged userspace program, at the cost of more netlink
83-
traffic to propagate all of the related events and commands.
84-
85-
This is a per-namespace sysctl.
86-
87-
* 0 - In-kernel path manager
88-
* 1 - Userspace path manager
89-
90-
Default: 0
91-
9275
path_manager - STRING
9376
Set the default path manager name to use for each new MPTCP
9477
socket. In-kernel path management will control subflow

net/mptcp/ctrl.c

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@
1818

1919
static int mptcp_pernet_id;
2020

21-
#ifdef CONFIG_SYSCTL
22-
static int mptcp_pm_type_max = __MPTCP_PM_TYPE_MAX;
23-
#endif
24-
2521
struct mptcp_pernet {
2622
#ifdef CONFIG_SYSCTL
2723
struct ctl_table_header *ctl_table_hdr;
@@ -37,7 +33,6 @@ struct mptcp_pernet {
3733
u8 mptcp_enabled;
3834
u8 checksum_enabled;
3935
u8 allow_join_initial_addr_port;
40-
u8 pm_type;
4136
char path_manager[MPTCP_PM_NAME_MAX];
4237
char scheduler[MPTCP_SCHED_NAME_MAX];
4338
};
@@ -79,11 +74,6 @@ unsigned int mptcp_close_timeout(const struct sock *sk)
7974
return mptcp_get_pernet(sock_net(sk))->close_timeout;
8075
}
8176

82-
int mptcp_get_pm_type(const struct net *net)
83-
{
84-
return mptcp_get_pernet(net)->pm_type;
85-
}
86-
8777
const char *mptcp_get_path_manager(const struct net *net)
8878
{
8979
return mptcp_get_pernet(net)->path_manager;
@@ -105,7 +95,6 @@ static void mptcp_pernet_set_defaults(struct mptcp_pernet *pernet)
10595
pernet->checksum_enabled = 0;
10696
pernet->allow_join_initial_addr_port = 1;
10797
pernet->stale_loss_cnt = 4;
108-
pernet->pm_type = MPTCP_PM_TYPE_KERNEL;
10998
strscpy(pernet->path_manager, "in-kernel", sizeof(pernet->path_manager));
11099
strscpy(pernet->scheduler, "default", sizeof(pernet->scheduler));
111100
}
@@ -257,14 +246,6 @@ static struct ctl_table mptcp_sysctl_table[] = {
257246
.mode = 0644,
258247
.proc_handler = proc_douintvec_minmax,
259248
},
260-
{
261-
.procname = "pm_type",
262-
.maxlen = sizeof(u8),
263-
.mode = 0644,
264-
.proc_handler = proc_dou8vec_minmax,
265-
.extra1 = SYSCTL_ZERO,
266-
.extra2 = &mptcp_pm_type_max
267-
},
268249
{
269250
.procname = "path_manager",
270251
.maxlen = MPTCP_PM_NAME_MAX,
@@ -322,7 +303,6 @@ static int mptcp_pernet_new_table(struct net *net, struct mptcp_pernet *pernet)
322303
table[i++].data = &pernet->checksum_enabled;
323304
table[i++].data = &pernet->allow_join_initial_addr_port;
324305
table[i++].data = &pernet->stale_loss_cnt;
325-
table[i++].data = &pernet->pm_type;
326306
table[i++].data = &pernet->path_manager;
327307
table[i++].data = &pernet->scheduler;
328308
i++; /* table[i] is for available_schedulers which is read-only info */

net/mptcp/protocol.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,6 @@ int mptcp_is_checksum_enabled(const struct net *net);
693693
int mptcp_allow_join_id0(const struct net *net);
694694
unsigned int mptcp_stale_loss_cnt(const struct net *net);
695695
unsigned int mptcp_close_timeout(const struct sock *sk);
696-
int mptcp_get_pm_type(const struct net *net);
697696
const char *mptcp_get_path_manager(const struct net *net);
698697
const char *mptcp_get_scheduler(const struct net *net);
699698

0 commit comments

Comments
 (0)