Skip to content

Commit

Permalink
Squash to "mptcp: add a new sysctl checksum_enabled"
Browse files Browse the repository at this point in the history
Update this patch as Florian suggested in the "MP_CAPABLE C flag" series.

Signed-off-by: Geliang Tang <[email protected]>
Signed-off-by: Matthieu Baerts <[email protected]>
  • Loading branch information
geliangtang authored and matttbe committed May 6, 2021
1 parent c8600f2 commit ad81f7f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Documentation/networking/mptcp-sysctl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ add_addr_timeout - INTEGER (seconds)

Default: 120

checksum_enabled - INTEGER
checksum_enabled - BOOLEAN
Control whether DSS checksum can be enabled.

DSS checksum can be enabled if the value is nonzero. This is a
Expand Down
8 changes: 5 additions & 3 deletions net/mptcp/ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ struct mptcp_pernet {

u8 mptcp_enabled;
unsigned int add_addr_timeout;
int checksum_enabled;
u8 checksum_enabled;
};

static struct mptcp_pernet *mptcp_get_pernet(struct net *net)
Expand Down Expand Up @@ -74,9 +74,11 @@ static struct ctl_table mptcp_sysctl_table[] = {
},
{
.procname = "checksum_enabled",
.maxlen = sizeof(int),
.maxlen = sizeof(u8),
.mode = 0644,
.proc_handler = proc_dointvec,
.proc_handler = proc_dou8vec_minmax,
.extra1 = SYSCTL_ZERO,
.extra2 = SYSCTL_ONE
},
{}
};
Expand Down

0 comments on commit ad81f7f

Please sign in to comment.