mptcp: remove unused returned value
Subsystems (2)
Matthieu Baerts (NGI0)
maintainerPATCH 1/1 mptcp: remove unused returned value
When working on a fix modifying mptcp_check_data_fin(), I noticed the returned value was no longer used.
It looks like it was used for 3 days, between commit 7ed90803a213 ("mptcp: send explicit ack on delayed ack_seq incr") and commit ea4ca586b16f ("mptcp: refine MPTCP-level ack scheduling").
This returned value can be safely removed.
--- net/mptcp/protocol.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
net/mptcp/protocol.c +1 -4
@@ -530,11 +530,10 @@ static void mptcp_cleanup_rbuf(struct mptcp_sock *msk, int copied) } } -static bool mptcp_check_data_fin (struct sock *sk) +static void mptcp_check_data_fin (struct sock *sk) {struct mptcp_sock *msk =mptcp_sk (sk);u64 rcv_data_fin_seq; -bool ret = false;/* Need to ack a DATA_FIN received from a peer while this side * of the connection is in ESTABLISHED, FIN_WAIT1, or FIN_WAIT2.
@@ -572,12 +571,10 @@ static bool mptcp_check_data_fin(struct sock *sk)break ; } - ret = true;if (!__mptcp_check_fallback (msk))mptcp_send_ack (msk);mptcp_close_wake_up (sk); } -return ret; }static void mptcp_dss_corruption (struct mptcp_sock *msk,struct sock *ssk)
---
base-commit: e9091ee333eb716a0933dcb08617228dcd3d3623
change-id: 20250906-check_data_fin_ret-6d284170880a
Best regards,
Signature · 1 line
Matthieu Baerts (NGI0) <[email protected]>
Hi Matthieu,
Thank you for your modifications, that's great!
Our CI did some validations and here is its report:
- KVM Validation: normal: Success! ✅
- KVM Validation: debug: Unstable: 1 failed test(s): selftest_mptcp_connect_checksum 🔴
- KVM Validation: btf-normal (only bpftest_all): Success! ✅
- KVM Validation: btf-debug (only bpftest_all): Success! ✅
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/17515731496
Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/ffb29b394e92
Patchwork: https://patchwork.kernel.org/project/mptcp/list/?series=999625
If there are some issues, you can reproduce them using the same environment as the one used by the CI thanks to a docker image, e.g.:
$ cd [kernel source code]
$ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
--pull always mptcp/mptcp-upstream-virtme-docker:latest \
auto-normalFor more details:
https://github.com/multipath-tcp/mptcp-upstream-virtme-docker
Please note that despite all the efforts that have been already done to have a stable tests suite when executed on a public CI like here, it is possible some reported issues are not due to your modifications. Still, do not hesitate to help us improve that ;-)
Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)
Hi Matt,
Quoted 10 lines · On Sat, 2025-09-06 at 16:13 +0200, Matthieu Baerts (NGI0) wrote:
When working on a fix modifying
mptcp_check_data_fin(), I noticed the returned value was no longer used.It looks like it was used for 3 days, between commit
7ed90803a213("mptcp: send explicit ack on delayedack_seqincr") and commitea4ca586b16f("mptcp: refine MPTCP-level ack scheduling").This returned value can be safely removed.
Signed-off-by Matthieu Baerts (NGI0) <[email protected]>
LGTM!
Thanks,
-Geliang
Quoted 47 lines
---
net/mptcp/protocol.c | 5 +----1 file changed, 1 insertion(+), 4 deletions(-)net/mptcp/protocol.c +0
-0index
1c26acf6c4145896ecbb5c7f7004121c66a20649..f3dda47ad1d70b5c6a326c17dbe6d244c5638ca2100644net/mptcp/protocol.c +0
-0@@ -530,11 +530,10 @@ static void mptcp_cleanup_rbuf(struct mptcp_sock *msk, int copied) } }net/mptcp/protocol.c +1
-1-static bool mptcp_check_data_fin (struct sock *sk) +static void mptcp_check_data_fin (struct sock *sk){
structmptcp_sock*msk =mptcp_sk(sk);
u64rcv_data_fin_seq;net/mptcp/protocol.c +0
-1-bool ret = false;
/* Need to ack aDATA_FINreceived from a peer while this side
* of the connection is in ESTABLISHED,FIN_WAIT1, orFIN_WAIT2.net/mptcp/protocol.c +0
-0@@ -572,12 +571,10 @@ static bool mptcp_check_data_fin(struct sock *sk) break; }net/mptcp/protocol.c +0
-1- ret = true;if (!__mptcp_check_fallback(msk))
mptcp_send_ack(msk);
mptcp_close_wake_up(sk);
}net/mptcp/protocol.c +0
-1-return ret;}
static voidmptcp_dss_corruption(struct mptcp_sock *msk, struct sock *ssk)---
base-commit:e9091ee333eb716a0933dcb08617228dcd3d3623
change-id: 20250906-check_data_fin_ret-6d284170880aBest regards,
Geliang Tang
reviewerHi Matt,
Quoted 11 lines · Geliang Tang
Hi Matt,
Quoted 8 lines · On Sat, 2025-09-06 at 16:13 +0200, Matthieu Baerts (NGI0) wrote:
When working on a fix modifying
mptcp_check_data_fin(), I noticed the
returned value was no longer used.It looks like it was used for 3 days, between commit
7ed90803a213("mptcp: send explicit ack on delayedack_seqincr") and commitea4ca586b16f("mptcp: refine MPTCP-level ack scheduling").
Quoted 7 lines
Quoted 3 lines
This returned value can be safely removed.
Signed-off-by Matthieu Baerts (NGI0) <[email protected]>LGTM!
Reviewed-by Geliang Tang <[email protected]>
Please update the subject when applying this patch, similar to this:
mptcp: remove unused returned value of check_data_fin
Thanks,
-Geliang
Quoted 53 lines
Thanks,
-GeliangQuoted 49 lines
---
net/mptcp/protocol.c | 5 +----1 file changed, 1 insertion(+), 4 deletions(-)net/mptcp/protocol.c +0
-0index
1c26acf6c4145896ecbb5c7f7004121c66a20649..f3dda47ad1d70b5c6a326c17dbe6d244c5638ca2100644net/mptcp/protocol.c +0
-0@@ -530,11 +530,10 @@ static void mptcp_cleanup_rbuf(struct mptcp_sock *msk, int copied) } }net/mptcp/protocol.c +1
-1-static bool mptcp_check_data_fin (struct sock *sk) +static void mptcp_check_data_fin (struct sock *sk){
structmptcp_sock*msk =mptcp_sk(sk);
u64rcv_data_fin_seq;net/mptcp/protocol.c +0
-1-bool ret = false;
/* Need to ack aDATA_FINreceived from a peer while this side
* of the connection is in ESTABLISHED,FIN_WAIT1, orFIN_WAIT2.net/mptcp/protocol.c +0
-0@@ -572,12 +571,10 @@ static bool mptcp_check_data_fin(struct sock *sk) break; }net/mptcp/protocol.c +0
-1- ret = true;if (!__mptcp_check_fallback(msk))
mptcp_send_ack(msk);
mptcp_close_wake_up(sk);
}net/mptcp/protocol.c +0
-1-return ret;}
static void mptcp_dss_corruption(structmptcp_sock*msk, struct sock
*ssk)---
base-commit:e9091ee333eb716a0933dcb08617228dcd3d3623
change-id: 20250906-check_data_fin_ret-6d284170880aBest regards,
Matthieu Baerts
maintainerHi Geliang,
Quoted 18 lines · Geliang Tang
Hi Matt,
Quoted 15 lines · Geliang Tang
Hi Matt,
Quoted 11 lines · On Sat, 2025-09-06 at 16:13 +0200, Matthieu Baerts (NGI0) wrote:
When working on a fix modifying
mptcp_check_data_fin(), I noticed the
returned value was no longer used.It looks like it was used for 3 days, between commit
7ed90803a213("mptcp: send explicit ack on delayedack_seqincr") and commitea4ca586b16f("mptcp: refine MPTCP-level ack scheduling").This returned value can be safely removed.
Signed-off-by Matthieu Baerts (NGI0) <[email protected]>
Quoted 7 lines
Quoted 3 lines
LGTM!
Reviewed-by Geliang Tang <[email protected]>Please update the subject when applying this patch, similar to this:
mptcp: remove unused returned value of
check_data_fin
Done. Thank you for the review!
Now in our tree:
New patches for t/upstream:
- f99b062ae907: mptcp: remove unused returned value of check_data_fin
- Results: 1e51af26b216..2356642572b2 (export)
Tests are now in progress:
Cheers,
Matt
Signature · 1 line
Sponsored by the NGI0 Core fund.