Message ID | 95f0f96d90264cc6411b024753fe8430f6998e4f.1661258990.git.geliang.tang@suse.com (mailing list archive) |
---|---|
State | Accepted, archived |
Commit | 695cc660c6c669af4613fda1c844bbbc728a0cad |
Delegated to: | Matthieu Baerts |
Headers | show |
Series | [mptcp-next] mptcp: add do_check_data_fin to replace copied | expand |
Context | Check | Description |
---|---|---|
matttbe/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 26 lines checked |
matttbe/build | success | Build and static analysis OK |
matttbe/KVM_Validation__normal | warning | Unstable: 2 failed test(s): selftest_mptcp_join selftest_simult_flows |
matttbe/KVM_Validation__debug | warning | Unstable: 2 failed test(s): packetdrill_mp_join packetdrill_sockopts |
Hi Geliang, Thank you for your modifications, that's great! Our CI did some validations and here is its report: - KVM Validation: normal: - Unstable: 2 failed test(s): selftest_mptcp_join selftest_simult_flows
Hi Geliang, On 23/08/2022 14:52, Geliang Tang wrote: > This patch adds a new bool variable 'do_check_data_fin' to replace the > original int variable 'copied' in __mptcp_push_pending(), check it to > determine whether to call __mptcp_check_send_data_fin(). Thank you for this clean-up! (and good to see you around again!) Sorry for the delay, I had a few days off but it is now in our tree (feat. for net-next): New patches for t/upstream: - 695cc660c6c6: mptcp: add do_check_data_fin to replace copied - Results: 276e5dcffc80..0838c359eb16 (export) Tests are now in progress: https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export/20220829T154355 > @@ -1510,7 +1511,7 @@ void __mptcp_push_pending(struct sock *sk, unsigned int flags) > } > > info.sent += ret; > - copied += ret; > + do_check_data_fin = true; Note that I just moved this new line one line above to do the two operations with 'ret' together. > len -= ret; > > mptcp_update_post_push(msk, dfrag, ret); Cheers, Matt
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index 74699bd47edf..fb574d135002 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -1473,8 +1473,9 @@ void __mptcp_push_pending(struct sock *sk, unsigned int flags) struct mptcp_sendmsg_info info = { .flags = flags, }; + bool do_check_data_fin = false; struct mptcp_data_frag *dfrag; - int len, copied = 0; + int len; while ((dfrag = mptcp_send_head(sk))) { info.sent = dfrag->already_sent; @@ -1510,7 +1511,7 @@ void __mptcp_push_pending(struct sock *sk, unsigned int flags) } info.sent += ret; - copied += ret; + do_check_data_fin = true; len -= ret; mptcp_update_post_push(msk, dfrag, ret); @@ -1526,7 +1527,7 @@ void __mptcp_push_pending(struct sock *sk, unsigned int flags) /* ensure the rtx timer is running */ if (!mptcp_timer_pending(sk)) mptcp_reset_timer(sk); - if (copied) + if (do_check_data_fin) __mptcp_check_send_data_fin(sk); }
This patch adds a new bool variable 'do_check_data_fin' to replace the original int variable 'copied' in __mptcp_push_pending(), check it to determine whether to call __mptcp_check_send_data_fin(). Suggested-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: Geliang Tang <geliang.tang@suse.com> --- Do a small cleanup as Mat suggested in [1]. [1] https://patchwork.kernel.org/project/mptcp/patch/ef3d52ff98c97b3c3e5b1efd84a1d4bf3448df5d.1656578856.git.geliang.tang@suse.com/ --- net/mptcp/protocol.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)