* [PATCH mptcp-next v2] mptcp: update userspace pm subflows info
@ 2023-01-13 8:45 Geliang Tang
2023-01-13 9:51 ` mptcp: update userspace pm subflows info: Tests Results MPTCP CI
2023-01-25 18:13 ` [PATCH mptcp-next v2] mptcp: update userspace pm subflows info Matthieu Baerts
0 siblings, 2 replies; 5+ messages in thread
From: Geliang Tang @ 2023-01-13 8:45 UTC (permalink / raw)
To: mptcp; +Cc: Geliang Tang
Increase pm subflows counter when userspace pm creates a new subflow,
and decrease the counter when it closes a subflow.
Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/329
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
v2:
- hold pm locks.
---
net/mptcp/pm_userspace.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/net/mptcp/pm_userspace.c b/net/mptcp/pm_userspace.c
index a02d3cbf2a1b..9f7fc0b0d960 100644
--- a/net/mptcp/pm_userspace.c
+++ b/net/mptcp/pm_userspace.c
@@ -302,6 +302,10 @@ int mptcp_nl_cmd_sf_create(struct sk_buff *skb, struct genl_info *info)
goto create_err;
}
+ spin_lock_bh(&msk->pm.lock);
+ msk->pm.subflows++;
+ spin_unlock_bh(&msk->pm.lock);
+
lock_sock(sk);
err = __mptcp_subflow_connect(sk, &addr_l, &addr_r);
@@ -424,6 +428,9 @@ int mptcp_nl_cmd_sf_destroy(struct sk_buff *skb, struct genl_info *info)
mptcp_subflow_shutdown(sk, ssk, RCV_SHUTDOWN | SEND_SHUTDOWN);
mptcp_close_ssk(sk, ssk, subflow);
MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_RMSUBFLOW);
+ spin_lock_bh(&msk->pm.lock);
+ msk->pm.subflows--;
+ spin_unlock_bh(&msk->pm.lock);
err = 0;
} else {
err = -ESRCH;
--
2.35.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: mptcp: update userspace pm subflows info: Tests Results
2023-01-13 8:45 [PATCH mptcp-next v2] mptcp: update userspace pm subflows info Geliang Tang
@ 2023-01-13 9:51 ` MPTCP CI
2023-01-25 18:13 ` [PATCH mptcp-next v2] mptcp: update userspace pm subflows info Matthieu Baerts
1 sibling, 0 replies; 5+ messages in thread
From: MPTCP CI @ 2023-01-13 9:51 UTC (permalink / raw)
To: Geliang Tang; +Cc: mptcp
Hi Geliang,
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):
- Success! ✅:
- Task: https://cirrus-ci.com/task/6024448923402240
- Summary: https://api.cirrus-ci.com/v1/artifact/task/6024448923402240/summary/summary.txt
- KVM Validation: debug (except selftest_mptcp_join):
- Success! ✅:
- Task: https://cirrus-ci.com/task/6587398876823552
- Summary: https://api.cirrus-ci.com/v1/artifact/task/6587398876823552/summary/summary.txt
- KVM Validation: normal (only selftest_mptcp_join):
- Success! ✅:
- Task: https://cirrus-ci.com/task/5461498969980928
- Summary: https://api.cirrus-ci.com/v1/artifact/task/5461498969980928/summary/summary.txt
- KVM Validation: debug (only selftest_mptcp_join):
- Unstable: 1 failed test(s): selftest_mptcp_join 🔴:
- Task: https://cirrus-ci.com/task/4757811528204288
- Summary: https://api.cirrus-ci.com/v1/artifact/task/4757811528204288/summary/summary.txt
Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/59ca5c77a991
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)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH mptcp-next v2] mptcp: update userspace pm subflows info
2023-01-13 8:45 [PATCH mptcp-next v2] mptcp: update userspace pm subflows info Geliang Tang
2023-01-13 9:51 ` mptcp: update userspace pm subflows info: Tests Results MPTCP CI
@ 2023-01-25 18:13 ` Matthieu Baerts
2023-01-28 2:44 ` Geliang Tang
1 sibling, 1 reply; 5+ messages in thread
From: Matthieu Baerts @ 2023-01-25 18:13 UTC (permalink / raw)
To: Geliang Tang, mptcp
Hi Geliang,
On 13/01/2023 09:45, Geliang Tang wrote:
> Increase pm subflows counter when userspace pm creates a new subflow,
> and decrease the counter when it closes a subflow.
>
> Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/329
(sorry for the delay)
Thank you, the patch looks good to me! But I don't think it is enough to
close the ticket 329.
I think there are other fields visible in `MPTCP_INFO` but only updated
by the in-kernel PM. e.g.
- add_addr_signaled
- add_addr_accepted
- local_addr_used
I guess these counters should be modified as well (in different
commits), no?
Also, I don't know if we should consider this as a "new feature" for
net-next: to me, it looks like we forgot to update the counters and it
is not really a new feature to update them but more a bug-fix. So maybe
we can target -net? I'm open to suggestions on that point :)
Not directly related but for the issue #330 -- 'subflows' counters not
incremented for the server side -- it could be considered as a bug fix
as well depending on how it is implemented: if it is backported, we
would have the same behaviour with all kernels. Or we add new field(s)
in MPTCP_INFO but this is maybe not needed.
Cheers,
Matt
--
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH mptcp-next v2] mptcp: update userspace pm subflows info
2023-01-25 18:13 ` [PATCH mptcp-next v2] mptcp: update userspace pm subflows info Matthieu Baerts
@ 2023-01-28 2:44 ` Geliang Tang
2023-01-28 13:54 ` Matthieu Baerts
0 siblings, 1 reply; 5+ messages in thread
From: Geliang Tang @ 2023-01-28 2:44 UTC (permalink / raw)
To: Matthieu Baerts; +Cc: mptcp
On Wed, Jan 25, 2023 at 07:13:31PM +0100, Matthieu Baerts wrote:
> Hi Geliang,
>
> On 13/01/2023 09:45, Geliang Tang wrote:
> > Increase pm subflows counter when userspace pm creates a new subflow,
> > and decrease the counter when it closes a subflow.
> >
> > Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/329
>
> (sorry for the delay)
>
> Thank you, the patch looks good to me! But I don't think it is enough to
> close the ticket 329.
>
> I think there are other fields visible in `MPTCP_INFO` but only updated
> by the in-kernel PM. e.g.
>
> - add_addr_signaled
> - add_addr_accepted
> - local_addr_used
>
> I guess these counters should be modified as well (in different
> commits), no?
Yes, I'll modify these counters in v3.
>
> Also, I don't know if we should consider this as a "new feature" for
> net-next: to me, it looks like we forgot to update the counters and it
> is not really a new feature to update them but more a bug-fix. So maybe
> we can target -net? I'm open to suggestions on that point :)
Sure. I'll update this in v3.
>
> Not directly related but for the issue #330 -- 'subflows' counters not
> incremented for the server side -- it could be considered as a bug fix
> as well depending on how it is implemented: if it is backported, we
> would have the same behaviour with all kernels. Or we add new field(s)
> in MPTCP_INFO but this is maybe not needed.
OK, I'll address #330 in v3 too.
Thanks,
-Geliang
>
> Cheers,
> Matt
> --
> Tessares | Belgium | Hybrid Access Solutions
> www.tessares.net
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH mptcp-next v2] mptcp: update userspace pm subflows info
2023-01-28 2:44 ` Geliang Tang
@ 2023-01-28 13:54 ` Matthieu Baerts
0 siblings, 0 replies; 5+ messages in thread
From: Matthieu Baerts @ 2023-01-28 13:54 UTC (permalink / raw)
To: Geliang Tang; +Cc: mptcp
Hi Geliang,
On 28/01/2023 03:44, Geliang Tang wrote:
> On Wed, Jan 25, 2023 at 07:13:31PM +0100, Matthieu Baerts wrote:
>> Hi Geliang,
>>
>> On 13/01/2023 09:45, Geliang Tang wrote:
>>> Increase pm subflows counter when userspace pm creates a new subflow,
>>> and decrease the counter when it closes a subflow.
>>>
>>> Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/329
>>
>> (sorry for the delay)
>>
>> Thank you, the patch looks good to me! But I don't think it is enough to
>> close the ticket 329.
>>
>> I think there are other fields visible in `MPTCP_INFO` but only updated
>> by the in-kernel PM. e.g.
>>
>> - add_addr_signaled
>> - add_addr_accepted
>> - local_addr_used
>>
>> I guess these counters should be modified as well (in different
>> commits), no?
>
> Yes, I'll modify these counters in v3.
>
>>
>> Also, I don't know if we should consider this as a "new feature" for
>> net-next: to me, it looks like we forgot to update the counters and it
>> is not really a new feature to update them but more a bug-fix. So maybe
>> we can target -net? I'm open to suggestions on that point :)
>
> Sure. I'll update this in v3.
>
>>
>> Not directly related but for the issue #330 -- 'subflows' counters not
>> incremented for the server side -- it could be considered as a bug fix
>> as well depending on how it is implemented: if it is backported, we
>> would have the same behaviour with all kernels. Or we add new field(s)
>> in MPTCP_INFO but this is maybe not needed.
>
> OK, I'll address #330 in v3 too.
Great, thank you!
Happy New Year!
Cheers,
Matt
--
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-01-28 13:54 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-13 8:45 [PATCH mptcp-next v2] mptcp: update userspace pm subflows info Geliang Tang
2023-01-13 9:51 ` mptcp: update userspace pm subflows info: Tests Results MPTCP CI
2023-01-25 18:13 ` [PATCH mptcp-next v2] mptcp: update userspace pm subflows info Matthieu Baerts
2023-01-28 2:44 ` Geliang Tang
2023-01-28 13:54 ` Matthieu Baerts
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.