Skip to contentSkip to conversation

mptcp: Remove unnecessary test for __mptcp_init_sock().

PATCH In review Kuniyuki Iwashima 3 participants 10 messages Aug 9, 2023 – Aug 10, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mptcp: Remove unnecessary test for __mptcp_init_sock().

__mptcp_init_sock() always returns 0 because mptcp_init_sock() used to return the value directly.

But after commit 18b683bff89d ("mptcp: queue data for mptcp level retransmission"), __mptcp_init_sock() need not return value anymore.

Let's remove the unnecessary test for __mptcp_init_sock() and make it return void.

---
 net/mptcp/protocol.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
net/mptcp/protocol.c +2 -7
index 65ee949a8a44..ddafb095fc3d 100644
@@ -2662,7 +2662,7 @@ static void mptcp_worker(struct work_struct *work)
 	sock_put(sk);
 }
 
-static int __mptcp_init_sock(struct sock *sk)
+static void __mptcp_init_sock(struct sock *sk)
 {
 	struct mptcp_sock *msk = mptcp_sk(sk);
 
@@ -2689,8 +2689,6 @@ static int __mptcp_init_sock(struct sock *sk)
 	/* re-use the csk retrans timer for MPTCP-level retrans */
 	timer_setup(&msk->sk.icsk_retransmit_timer, mptcp_retransmit_timer, 0);
 	timer_setup(&sk->sk_timer, mptcp_timeout_timer, 0);
-
-	return 0;
 }
 
 static void mptcp_ca_reset(struct sock *sk)
@@ -2708,11 +2706,8 @@ static void mptcp_ca_reset(struct sock *sk)
 static int mptcp_init_sock(struct sock *sk)
 {
 	struct net *net = sock_net(sk);
-	int ret;
 
-	ret = __mptcp_init_sock(sk);
-	if (ret)
-		return ret;
+	__mptcp_init_sock(sk);
 
 	if (!mptcp_is_enabled(net))
 		return -ENOPROTOOPT;
Signature · 1 line
2.30.2
#1 lore raw

Re: mptcp: Remove unnecessary test for __mptcp_init_sock().: Build Failure

Hi Kuniyuki,

Thank you for your modifications, that's great!

But sadly, our CI spotted some issues with it when trying to build it.

You can find more details there:

https://patchwork.kernel.org/project/mptcp/patch/[email protected]/
https://github.com/multipath-tcp/mptcp_net-next/actions/runs/5815022877

Status: failure
Initiator: MPTCPimporter
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/e7b0047cdbb4

Feel free to reply to this email if you cannot access logs, if you need some support to fix the error, if this doesn't seem to be caused by your modifications or if the error is a false positive one.

Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (Tessares)

#2 lore raw

Re: mptcp: Remove unnecessary test for __mptcp_init_sock().: Build Failure

From: MPTCP CI <[email protected]>
Date: Wed, 09 Aug 2023 23:20:04 +0000

Quoted 6 lines

Hi Kuniyuki,

Thank you for your modifications, that's great!

But sadly, our CI spotted some issues with it when trying to build it.

Quoted 8 lines

You can find more details there:

https://patchwork.kernel.org/project/mptcp/patch/[email protected]/
https://github.com/multipath-tcp/mptcp_net-next/actions/runs/5815022877

Status: failure
Initiator: MPTCPimporter
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/e7b0047cdbb4

Oops, I used net-next and missed f2b529788d80 ("mptcp: add sched in mptcp_sock").

I'll rebase on the mptcp tree.

#3 lore raw

Re: mptcp: Remove unnecessary test for __mptcp_init_sock().: Build Failure

Hi Kuniyuki,

Thank you for the patch!

Quoted 13 lines · Kuniyuki Iwashima

From: MPTCP CI <[email protected]>
Date: Wed, 09 Aug 2023 23:20:04 +0000

Quoted 11 lines

Hi Kuniyuki,

Thank you for your modifications, that's great!

But sadly, our CI spotted some issues with it when trying to build it.

You can find more details there:

https://patchwork.kernel.org/project/mptcp/patch/[email protected]/
https://github.com/multipath-tcp/mptcp_net-next/actions/runs/5815022877

Quoted 8 lines
Quoted 3 lines

Status: failure
Initiator: MPTCPimporter
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/e7b0047cdbb4

Oops, I used net-next and missed f2b529788d80 ("mptcp: add sched in mptcp_sock").

I'll rebase on the mptcp tree.

That's OK, I can apply your patch on our side before "mptcp: add sched in mptcp_sock" (we will not send it to netdev before next week anyway). When doing that, I will also adapt this other commit not to have the compilation issue.

That way, your patch can be applied in net-next directly and our daily automatic rebase will handle that without issue. I will send a reply on your email including the patch where netdev ML was cced (the CI only sends emails to MPTCP ML).

Cheers,
Matt

Signature · 2 lines
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net
#4 lore raw

Re: mptcp: Remove unnecessary test for __mptcp_init_sock().: Build Failure

Quoted 28 lines · Matthieu Baerts
Quoted 13 lines · Kuniyuki Iwashima

From: MPTCP CI <[email protected]>
Date: Wed, 09 Aug 2023 23:20:04 +0000

Quoted 11 lines

Hi Kuniyuki,

Thank you for your modifications, that's great!

But sadly, our CI spotted some issues with it when trying to build it.

You can find more details there:

https://patchwork.kernel.org/project/mptcp/patch/[email protected]/
https://github.com/multipath-tcp/mptcp_net-next/actions/runs/5815022877

Quoted 8 lines
Quoted 3 lines

Status: failure
Initiator: MPTCPimporter
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/e7b0047cdbb4

Oops, I used net-next and missed f2b529788d80 ("mptcp: add sched in mptcp_sock").

I'll rebase on the mptcp tree.

That's OK, I can apply your patch on our side before "mptcp: add sched in mptcp_sock" (we will not send it to netdev before next week anyway). When doing that, I will also adapt this other commit not to have the compilation issue.

Quoted 4 lines

That way, your patch can be applied in net-next directly and our daily automatic rebase will handle that without issue. I will send a reply on your email including the patch where netdev ML was cced (the CI only sends emails to MPTCP ML).

I just noticed your patch was addressed to us with netdev ML in CC and not addressed to the Net maintainers. That's fine of course but I guess the Net maintainers will expect us to apply the patch on our side and send it later with other ones. I will just make it clean to the Net maintainers who is doing what :)

Cheers,
Matt

Signature · 2 lines
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net
#5 lore raw

Re: mptcp: Remove unnecessary test for __mptcp_init_sock().: Tests Results

In reply to Kuniyuki Iwashima

Hi Kuniyuki,

Thank you for your modifications, that's great!

Our CI did some validations and here is its report:

- KVM Validation: normal (except selftest_mptcp_join):
- Script error! ❓:
- Task: https://cirrus-ci.com/task/5907693383188480
- Summary: https://api.cirrus-ci.com/v1/artifact/task/5907693383188480/summary/summary.txt

- {"code":404,"message":
- "Can't find artifacts containing file conclusion.txt"}:
- Task: https://cirrus-ci.com/task/6470643336609792
- Summary: https://api.cirrus-ci.com/v1/artifact/task/6470643336609792/summary/summary.txt

- KVM Validation: debug (only selftest_mptcp_join):
- Script error! ❓:
- Task: https://cirrus-ci.com/task/5063268453056512
- Summary: https://api.cirrus-ci.com/v1/artifact/task/5063268453056512/summary/summary.txt

- KVM Validation: normal (only selftest_mptcp_join):
- Script error! ❓:
- Task: https://cirrus-ci.com/task/5344743429767168
- Summary: https://api.cirrus-ci.com/v1/artifact/task/5344743429767168/summary/summary.txt

Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/e7b0047cdbb4

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-debug

For 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 (Tessares)

Reviewed-by on v1 1/1
#6 lore raw
In reply to Kuniyuki Iwashima

Hi Kuniyuki,

Quoted 8 lines · Kuniyuki Iwashima

__mptcp_init_sock() always returns 0 because mptcp_init_sock() used to return the value directly.

But after commit 18b683bff89d ("mptcp: queue data for mptcp level retransmission"), __mptcp_init_sock() need not return value anymore.

Let's remove the unnecessary test for __mptcp_init_sock() and make it return void.

Thank you for your patch, it looks good to me!

As the CI said (on MPTCP ML only), there is a conflict with another patch already in MPTCP tree that is going to be sent later. But that's fine, no need to rebase, it is fine to apply your patch as it is in our tree before the other patch and modify the latter one to avoid compilation issue.

So just to be clear, I just applied this patch in MPTCP tree and we will send it to Netdev later. I hope it is OK if I change the Patchwork status to "Deferred". (If it is the correct status because it looks like the "Handled Elsewhere" status is not used in Netdev PW and the bot doesn't support it).

pw-bot: defer

New patches for t/upstream:
- 769fb24aa39c: mptcp: Remove unnecessary test for __mptcp_init_sock()
- 1ba457522bce: mptcp: fix compilation issue in "mptcp: add sched in mptcp_sock"
- Results: 3a7cf9f5d51c..649448c9126d (export)

Tests are now in progress:

https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export/20230810T092803

Cheers,
Matt

Signature · 2 lines
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net
#7 lore raw

Re: mptcp: Remove unnecessary test for __mptcp_init_sock().: Build Failure

In reply to Kuniyuki Iwashima

Hi Kuniyuki,

Thank you for your modifications, that's great!

But sadly, our CI spotted some issues with it when trying to build it.

You can find more details there:

https://patchwork.kernel.org/project/mptcp/patch/[email protected]/
https://github.com/multipath-tcp/mptcp_net-next/actions/runs/5819664427

Status: failure
Initiator: MPTCPimporter
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/d9cabde674a5

Feel free to reply to this email if you cannot access logs, if you need some support to fix the error, if this doesn't seem to be caused by your modifications or if the error is a false positive one.

Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (Tessares)

#8 lore raw

Re: mptcp: Remove unnecessary test for __mptcp_init_sock().: Build Failure

Hi Kuniyuki,

Quoted 3 lines · MPTCP CI

Thank you for your modifications, that's great!

But sadly, our CI spotted some issues with it when trying to build it.

Sorry for that, Patchew[1] automatically re-applies patches when tags (Reviewed-By, etc.) are sent on the ML and we cannot control that. So here this report is exactly the same as the one you got with your original patch, just before I applied your patch and did the modifications in the other commit. So you can safely ignore this email and the next one.

[1] https://patchew.org/MPTCP/[email protected]/

Cheers,
Matt

Signature · 2 lines
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net
#9 lore raw

Re: mptcp: Remove unnecessary test for __mptcp_init_sock().: Tests Results

In reply to Kuniyuki Iwashima

Hi Kuniyuki,

Thank you for your modifications, that's great!

Our CI did some validations and here is its report:

- KVM Validation: normal (except selftest_mptcp_join):
- Script error! ❓:
- Task: https://cirrus-ci.com/task/4953412383539200
- Summary: https://api.cirrus-ci.com/v1/artifact/task/4953412383539200/summary/summary.txt

- KVM Validation: normal (only selftest_mptcp_join):
- Script error! ❓:
- Task: https://cirrus-ci.com/task/6079312290381824
- Summary: https://api.cirrus-ci.com/v1/artifact/task/6079312290381824/summary/summary.txt

- KVM Validation: debug (except selftest_mptcp_join):
- Script error! ❓:
- Task: https://cirrus-ci.com/task/5516362336960512
- Summary: https://api.cirrus-ci.com/v1/artifact/task/5516362336960512/summary/summary.txt

- KVM Validation: debug (only selftest_mptcp_join):
- Script error! ❓:
- Task: https://cirrus-ci.com/task/6642262243803136
- Summary: https://api.cirrus-ci.com/v1/artifact/task/6642262243803136/summary/summary.txt

Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/d9cabde674a5

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-debug

For 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 (Tessares)