* Re: selftests: mptcp: userspace pm get addr tests: Tests Results
2023-12-11 8:15 [PATCH mptcp-next 12/12] selftests: mptcp: userspace pm get addr tests Geliang Tang
@ 2023-12-11 11:24 ` MPTCP CI
0 siblings, 0 replies; 37+ messages in thread
From: MPTCP CI @ 2023-12-11 11:24 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):
- Unstable: 1 failed test(s): packetdrill_fastclose 🔴:
- Task: https://cirrus-ci.com/task/6001690181107712
- Summary: https://api.cirrus-ci.com/v1/artifact/task/6001690181107712/summary/summary.txt
- KVM Validation: normal (only selftest_mptcp_join):
- Success! ✅:
- Task: https://cirrus-ci.com/task/5438740227686400
- Summary: https://api.cirrus-ci.com/v1/artifact/task/5438740227686400/summary/summary.txt
- KVM Validation: debug (only selftest_mptcp_join):
- Unstable: 1 failed test(s): selftest_mptcp_join - Critical: 2 Call Trace(s) ❌:
- Task: https://cirrus-ci.com/task/4735052785909760
- Summary: https://api.cirrus-ci.com/v1/artifact/task/4735052785909760/summary/summary.txt
- KVM Validation: debug (except selftest_mptcp_join):
- Unstable: 1 failed test(s): packetdrill_fastclose - Critical: 3 Call Trace(s) ❌:
- Task: https://cirrus-ci.com/task/6564640134529024
- Summary: https://api.cirrus-ci.com/v1/artifact/task/6564640134529024/summary/summary.txt
Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/c6be3369e827
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 (NGI0 Core)
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: selftests: mptcp: userspace pm get addr tests: Tests Results
2023-12-18 9:23 [PATCH mptcp-next v2 15/15] selftests: mptcp: userspace pm get addr tests Geliang Tang
@ 2023-12-18 10:58 ` MPTCP CI
0 siblings, 0 replies; 37+ messages in thread
From: MPTCP CI @ 2023-12-18 10:58 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/4505113289555968
- Summary: https://api.cirrus-ci.com/v1/artifact/task/4505113289555968/summary/summary.txt
- KVM Validation: debug (except selftest_mptcp_join):
- Critical: 3 Call Trace(s) ❌:
- Task: https://cirrus-ci.com/task/5804062763909120
- Summary: https://api.cirrus-ci.com/v1/artifact/task/5804062763909120/summary/summary.txt
- KVM Validation: normal (only selftest_mptcp_join):
- Success! ✅:
- Task: https://cirrus-ci.com/task/5631013196398592
- Summary: https://api.cirrus-ci.com/v1/artifact/task/5631013196398592/summary/summary.txt
- KVM Validation: debug (only selftest_mptcp_join):
- Unstable: 1 failed test(s): selftest_mptcp_join - Critical: 3 Call Trace(s) ❌:
- Task: https://cirrus-ci.com/task/6193963149819904
- Summary: https://api.cirrus-ci.com/v1/artifact/task/6193963149819904/summary/summary.txt
Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/14e9a9fcd464
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 (NGI0 Core)
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: selftests: mptcp: userspace pm get addr tests: Tests Results
2023-12-19 8:19 [PATCH mptcp-next v3 14/14] selftests: mptcp: userspace pm get addr tests Geliang Tang
@ 2023-12-19 8:36 ` MPTCP CI
2023-12-19 10:55 ` MPTCP CI
1 sibling, 0 replies; 37+ messages in thread
From: MPTCP CI @ 2023-12-19 8:36 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:
- {"code":404,"message":
- "Can't find artifacts containing file conclusion.txt"}:
- Task: https://cirrus-ci.com/task/6002476764102656
- Summary: https://api.cirrus-ci.com/v1/artifact/task/6002476764102656/summary/summary.txt
- {"code":404,"message":
- "Can't find artifacts containing file conclusion.txt"}:
- Task: https://cirrus-ci.com/task/6565426717523968
- Summary: https://api.cirrus-ci.com/v1/artifact/task/6565426717523968/summary/summary.txt
- {"code":404,"message":
- "Can't find artifacts containing file conclusion.txt"}:
- Task: https://cirrus-ci.com/task/5439526810681344
- Summary: https://api.cirrus-ci.com/v1/artifact/task/5439526810681344/summary/summary.txt
- {"code":404,"message":
- "Can't find artifacts containing file conclusion.txt"}:
- Task: https://cirrus-ci.com/task/4735839368904704
- Summary: https://api.cirrus-ci.com/v1/artifact/task/4735839368904704/summary/summary.txt
Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/f1dcab025390
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 (NGI0 Core)
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: selftests: mptcp: userspace pm get addr tests: Tests Results
2023-12-19 8:19 [PATCH mptcp-next v3 14/14] selftests: mptcp: userspace pm get addr tests Geliang Tang
2023-12-19 8:36 ` selftests: mptcp: userspace pm get addr tests: Tests Results MPTCP CI
@ 2023-12-19 10:55 ` MPTCP CI
2023-12-19 12:19 ` Matthieu Baerts
1 sibling, 1 reply; 37+ messages in thread
From: MPTCP CI @ 2023-12-19 10:55 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:
- {"code":404,"message":
- "Can't find artifacts containing file conclusion.txt"}:
- Task: https://cirrus-ci.com/task/4651956644347904
- Summary: https://api.cirrus-ci.com/v1/artifact/task/4651956644347904/summary/summary.txt
- {"code":404,"message":
- "Can't find artifacts containing file conclusion.txt"}:
- Task: https://cirrus-ci.com/task/6340806504611840
- Summary: https://api.cirrus-ci.com/v1/artifact/task/6340806504611840/summary/summary.txt
- {"code":404,"message":
- "Can't find artifacts containing file conclusion.txt"}:
- Task: https://cirrus-ci.com/task/5777856551190528
- Summary: https://api.cirrus-ci.com/v1/artifact/task/5777856551190528/summary/summary.txt
- {"code":404,"message":
- "Can't find artifacts containing file conclusion.txt"}:
- Task: https://cirrus-ci.com/task/5214906597769216
- Summary: https://api.cirrus-ci.com/v1/artifact/task/5214906597769216/summary/summary.txt
Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/8745a4886c7f
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 (NGI0 Core)
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: selftests: mptcp: userspace pm get addr tests: Tests Results
2023-12-19 10:55 ` MPTCP CI
@ 2023-12-19 12:19 ` Matthieu Baerts
0 siblings, 0 replies; 37+ messages in thread
From: Matthieu Baerts @ 2023-12-19 12:19 UTC (permalink / raw)
To: mptcp, Geliang Tang
Hi Geliang,
On 19/12/2023 11:55, MPTCP CI wrote:
> Hi Geliang,
>
> Thank you for your modifications, that's great!
>
> Our CI did some validations and here is its report:
>
> - {"code":404,"message":
> - "Can't find artifacts containing file conclusion.txt"}:
> - Task: https://cirrus-ci.com/task/4651956644347904
> - Summary: https://api.cirrus-ci.com/v1/artifact/task/4651956644347904/summary/summary.txt
>
> - {"code":404,"message":
> - "Can't find artifacts containing file conclusion.txt"}:
> - Task: https://cirrus-ci.com/task/6340806504611840
> - Summary: https://api.cirrus-ci.com/v1/artifact/task/6340806504611840/summary/summary.txt
>
> - {"code":404,"message":
> - "Can't find artifacts containing file conclusion.txt"}:
> - Task: https://cirrus-ci.com/task/5777856551190528
> - Summary: https://api.cirrus-ci.com/v1/artifact/task/5777856551190528/summary/summary.txt
>
> - {"code":404,"message":
> - "Can't find artifacts containing file conclusion.txt"}:
> - Task: https://cirrus-ci.com/task/5214906597769216
> - Summary: https://api.cirrus-ci.com/v1/artifact/task/5214906597769216/summary/summary.txt
>
> Initiator: Patchew Applier
> Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/8745a4886c7f
Please ignore this one: I just updated our CI config to ignore "skipped"
tests (because we reached our monthly limit on the public CI).
Please note that this series has not been validated by the CI!
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: selftests: mptcp: userspace pm get addr tests: Tests Results
2024-02-14 11:40 [PATCH mptcp-next v12 15/15] selftests: mptcp: userspace pm get addr tests Geliang Tang
@ 2024-02-14 12:37 ` MPTCP CI
2024-02-14 12:48 ` MPTCP CI
1 sibling, 0 replies; 37+ messages in thread
From: MPTCP CI @ 2024-02-14 12:37 UTC (permalink / raw)
To: Geliang Tang; +Cc: mptcp
Hi Geliang,
Thank you for your modifications, that's great!
Our CI (GitHub Action) did some validations and here is its report:
- KVM Validation: normal:
- Success! ✅:
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/7900781714
Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/ef0e97c755ed
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-normal
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 (NGI0 Core)
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: selftests: mptcp: userspace pm get addr tests: Tests Results
2024-02-14 11:40 [PATCH mptcp-next v12 15/15] selftests: mptcp: userspace pm get addr tests Geliang Tang
2024-02-14 12:37 ` selftests: mptcp: userspace pm get addr tests: Tests Results MPTCP CI
@ 2024-02-14 12:48 ` MPTCP CI
1 sibling, 0 replies; 37+ messages in thread
From: MPTCP CI @ 2024-02-14 12:48 UTC (permalink / raw)
To: Geliang Tang; +Cc: mptcp
Hi Geliang,
Thank you for your modifications, that's great!
Our CI (Cirrus) did some validations with a debug kernel and here is its report:
- KVM Validation: debug (except selftest_mptcp_join):
- Success! ✅:
- Task: https://cirrus-ci.com/task/5161940717142016
- Summary: https://api.cirrus-ci.com/v1/artifact/task/5161940717142016/summary/summary.txt
- KVM Validation: debug (only selftest_mptcp_join):
- Success! ✅:
- Task: https://cirrus-ci.com/task/6287840623984640
- Summary: https://api.cirrus-ci.com/v1/artifact/task/6287840623984640/summary/summary.txt
Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/ef0e97c755ed
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 (NGI0 Core)
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: selftests: mptcp: userspace pm get addr tests: Tests Results
2024-02-16 7:42 [PATCH mptcp-next v13 14/14] selftests: mptcp: userspace pm get addr tests Geliang Tang
@ 2024-02-16 8:34 ` MPTCP CI
2024-02-16 9:55 ` MPTCP CI
` (4 subsequent siblings)
5 siblings, 0 replies; 37+ messages in thread
From: MPTCP CI @ 2024-02-16 8:34 UTC (permalink / raw)
To: Geliang Tang; +Cc: mptcp
Hi Geliang,
Thank you for your modifications, that's great!
Our CI (GitHub Action) did some validations and here is its report:
- KVM Validation: normal:
- Success! ✅:
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/7927632070
Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/ce45d1802870
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-normal
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 (NGI0 Core)
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: selftests: mptcp: userspace pm get addr tests: Tests Results
2024-02-16 7:42 [PATCH mptcp-next v13 14/14] selftests: mptcp: userspace pm get addr tests Geliang Tang
2024-02-16 8:34 ` selftests: mptcp: userspace pm get addr tests: Tests Results MPTCP CI
@ 2024-02-16 9:55 ` MPTCP CI
2024-02-16 10:14 ` MPTCP CI
` (3 subsequent siblings)
5 siblings, 0 replies; 37+ messages in thread
From: MPTCP CI @ 2024-02-16 9:55 UTC (permalink / raw)
To: Geliang Tang; +Cc: mptcp
Hi Geliang,
Thank you for your modifications, that's great!
Our CI (Cirrus) did some validations with a debug kernel and here is its report:
- KVM Validation: debug (except selftest_mptcp_join):
- Critical: KMemLeak ❌:
- Task: https://cirrus-ci.com/task/5149468870311936
- Summary: https://api.cirrus-ci.com/v1/artifact/task/5149468870311936/summary/summary.txt
- KVM Validation: debug (only selftest_mptcp_join):
- Critical: KMemLeak ❌:
- Task: https://cirrus-ci.com/task/6457206082633728
- Summary: https://api.cirrus-ci.com/v1/artifact/task/6457206082633728/summary/summary.txt
Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/ce45d1802870
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 (NGI0 Core)
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: selftests: mptcp: userspace pm get addr tests: Tests Results
2024-02-16 7:42 [PATCH mptcp-next v13 14/14] selftests: mptcp: userspace pm get addr tests Geliang Tang
2024-02-16 8:34 ` selftests: mptcp: userspace pm get addr tests: Tests Results MPTCP CI
2024-02-16 9:55 ` MPTCP CI
@ 2024-02-16 10:14 ` MPTCP CI
2024-02-16 10:24 ` Matthieu Baerts
2024-02-16 11:08 ` MPTCP CI
` (2 subsequent siblings)
5 siblings, 1 reply; 37+ messages in thread
From: MPTCP CI @ 2024-02-16 10:14 UTC (permalink / raw)
To: Geliang Tang; +Cc: mptcp
Hi Geliang,
Thank you for your modifications, that's great!
Our CI (Cirrus) did some validations with a debug kernel and here is its report:
- {"code":404,"message":
- "Can't find artifacts containing file conclusion.txt"}:
- Task: https://cirrus-ci.com/task/4666244045996032
- Summary: https://api.cirrus-ci.com/v1/artifact/task/4666244045996032/summary/summary.txt
- {"code":404,"message":
- "Can't find artifacts containing file conclusion.txt"}:
- Task: https://cirrus-ci.com/task/4694403713859584
- Summary: https://api.cirrus-ci.com/v1/artifact/task/4694403713859584/summary/summary.txt
Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/ce45d1802870
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 (NGI0 Core)
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: selftests: mptcp: userspace pm get addr tests: Tests Results
2024-02-16 10:14 ` MPTCP CI
@ 2024-02-16 10:24 ` Matthieu Baerts
0 siblings, 0 replies; 37+ messages in thread
From: Matthieu Baerts @ 2024-02-16 10:24 UTC (permalink / raw)
To: mptcp, Geliang Tang
Hello,
On 16/02/2024 11:14, MPTCP CI wrote:
> Hi Geliang,
>
> Thank you for your modifications, that's great!
>
> Our CI (Cirrus) did some validations with a debug kernel and here is its report:
>
> - {"code":404,"message":
> - "Can't find artifacts containing file conclusion.txt"}:
> - Task: https://cirrus-ci.com/task/4666244045996032
> - Summary: https://api.cirrus-ci.com/v1/artifact/task/4666244045996032/summary/summary.txt
>
> - {"code":404,"message":
> - "Can't find artifacts containing file conclusion.txt"}:
> - Task: https://cirrus-ci.com/task/4694403713859584
> - Summary: https://api.cirrus-ci.com/v1/artifact/task/4694403713859584/summary/summary.txt
>
> Initiator: Patchew Applier
> Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/ce45d1802870
FYI, the recent sync with net, including the last changes from Linus
tree, introduces a KMemLeak detected by our CI:
https://api.cirrus-ci.com/v1/artifact/task/6498522040631296/summary/summary.txt
I just added to our tree, a fix from upstream:
https://lore.kernel.org/r/20240215213944.508142048@goodmis.org
And I just cancelled running jobs + forced a rebase of this series: in
other words, this message is "normal", new results should come soon.
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: selftests: mptcp: userspace pm get addr tests: Tests Results
2024-02-16 7:42 [PATCH mptcp-next v13 14/14] selftests: mptcp: userspace pm get addr tests Geliang Tang
` (2 preceding siblings ...)
2024-02-16 10:14 ` MPTCP CI
@ 2024-02-16 11:08 ` MPTCP CI
2024-02-16 11:31 ` MPTCP CI
2024-02-16 20:33 ` MPTCP CI
5 siblings, 0 replies; 37+ messages in thread
From: MPTCP CI @ 2024-02-16 11:08 UTC (permalink / raw)
To: Geliang Tang; +Cc: mptcp
Hi Geliang,
Thank you for your modifications, that's great!
Our CI (GitHub Action) did some validations and here is its report:
- KVM Validation: normal:
- Success! ✅:
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/7929313128
Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/e8eb7a156396
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-normal
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 (NGI0 Core)
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: selftests: mptcp: userspace pm get addr tests: Tests Results
2024-02-16 7:42 [PATCH mptcp-next v13 14/14] selftests: mptcp: userspace pm get addr tests Geliang Tang
` (3 preceding siblings ...)
2024-02-16 11:08 ` MPTCP CI
@ 2024-02-16 11:31 ` MPTCP CI
2024-02-16 20:33 ` MPTCP CI
5 siblings, 0 replies; 37+ messages in thread
From: MPTCP CI @ 2024-02-16 11:31 UTC (permalink / raw)
To: Geliang Tang; +Cc: mptcp
Hi Geliang,
Thank you for your modifications, that's great!
Our CI (Cirrus) did some validations with a debug kernel and here is its report:
- KVM Validation: debug (except selftest_mptcp_join):
- Unstable: 1 failed test(s): packetdrill_regressions 🔴:
- Task: https://cirrus-ci.com/task/6499164826107904
- Summary: https://api.cirrus-ci.com/v1/artifact/task/6499164826107904/summary/summary.txt
- KVM Validation: debug (only selftest_mptcp_join):
- Success! ✅:
- Task: https://cirrus-ci.com/task/4669577477488640
- Summary: https://api.cirrus-ci.com/v1/artifact/task/4669577477488640/summary/summary.txt
Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/e8eb7a156396
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 (NGI0 Core)
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: selftests: mptcp: userspace pm get addr tests: Tests Results
2024-02-16 7:42 [PATCH mptcp-next v13 14/14] selftests: mptcp: userspace pm get addr tests Geliang Tang
` (4 preceding siblings ...)
2024-02-16 11:31 ` MPTCP CI
@ 2024-02-16 20:33 ` MPTCP CI
5 siblings, 0 replies; 37+ messages in thread
From: MPTCP CI @ 2024-02-16 20:33 UTC (permalink / raw)
To: Geliang Tang; +Cc: mptcp
Hi Geliang,
Thank you for your modifications, that's great!
Our CI (GitHub Action) did some validations and here is its report:
- KVM Validation: normal:
- Success! ✅:
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/7935566630
Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/1d4c1fb5ebca
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-normal
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 (NGI0 Core)
^ permalink raw reply [flat|nested] 37+ messages in thread
* [PATCH mptcp-next v14 00/14] dump for userspace pm
@ 2024-02-20 9:58 Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 01/14] mptcp: export mptcp_genl_family & mptcp_nl_fill_addr Geliang Tang
` (15 more replies)
0 siblings, 16 replies; 37+ messages in thread
From: Geliang Tang @ 2024-02-20 9:58 UTC (permalink / raw)
To: mptcp; +Cc: Geliang Tang
From: Geliang Tang <tanggeliang@kylinos.cn>
v14:
- address Matt's comments in v13.
- I have to use these lines in patch #8:
local cmd_ret=0
local out=$(${cmd} 2>${err}) || cmd_ret=${?}
The following expected code breaks pm_netlink.sh, I don't know why:
local out cmd_ret=0
out=$(${cmd} 2>${err}) || cmd_ret=${?}
If this is still a problem, I'll send a squash-to patch to fix it.
Geliang Tang (14):
mptcp: export mptcp_genl_family & mptcp_nl_fill_addr
mptcp: implement mptcp_userspace_pm_dump_addr
mptcp: add token for get-addr in yaml
mptcp: dump addrs in userspace pm list
mptcp: check userspace pm flags
selftests: mptcp: add userspace pm subflow flag
selftests: mptcp: add token for dump_addr
selftests: mptcp: add mptcp_lib_check_output helper
selftests: mptcp: dump userspace addrs list
mptcp: add userspace_pm_lookup_addr_by_id helper
mptcp: implement mptcp_userspace_pm_get_addr
mptcp: get addr in userspace pm list
selftests: mptcp: add token for get_addr
selftests: mptcp: userspace pm get addr tests
Documentation/netlink/specs/mptcp_pm.yaml | 3 +-
net/mptcp/mptcp_pm_gen.c | 7 +-
net/mptcp/mptcp_pm_gen.h | 2 +-
net/mptcp/pm.c | 16 ++
net/mptcp/pm_netlink.c | 26 ++-
net/mptcp/pm_userspace.c | 180 ++++++++++++++++--
net/mptcp/protocol.h | 13 ++
.../testing/selftests/net/mptcp/mptcp_join.sh | 91 +++++++++
.../testing/selftests/net/mptcp/mptcp_lib.sh | 19 ++
.../testing/selftests/net/mptcp/pm_netlink.sh | 18 +-
tools/testing/selftests/net/mptcp/pm_nl_ctl.c | 39 +++-
11 files changed, 368 insertions(+), 46 deletions(-)
--
2.40.1
^ permalink raw reply [flat|nested] 37+ messages in thread
* [PATCH mptcp-next v14 01/14] mptcp: export mptcp_genl_family & mptcp_nl_fill_addr
2024-02-20 9:58 [PATCH mptcp-next v14 00/14] dump for userspace pm Geliang Tang
@ 2024-02-20 9:58 ` Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 02/14] mptcp: implement mptcp_userspace_pm_dump_addr Geliang Tang
` (14 subsequent siblings)
15 siblings, 0 replies; 37+ messages in thread
From: Geliang Tang @ 2024-02-20 9:58 UTC (permalink / raw)
To: mptcp; +Cc: Geliang Tang
From: Geliang Tang <tanggeliang@kylinos.cn>
This patch exports struct mptcp_genl_family and mptcp_nl_fill_addr() helper
to allow them can be used in pm_userspace.c.
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
---
net/mptcp/pm_netlink.c | 9 +++------
net/mptcp/protocol.h | 4 ++++
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
index d5a942b9ab29..5cca84c6b87b 100644
--- a/net/mptcp/pm_netlink.c
+++ b/net/mptcp/pm_netlink.c
@@ -18,9 +18,6 @@
#include "protocol.h"
#include "mib.h"
-/* forward declaration */
-static struct genl_family mptcp_genl_family;
-
static int pm_nl_pernet_id;
struct mptcp_pm_add_entry {
@@ -1636,8 +1633,8 @@ int mptcp_pm_nl_flush_addrs_doit(struct sk_buff *skb, struct genl_info *info)
return 0;
}
-static int mptcp_nl_fill_addr(struct sk_buff *skb,
- struct mptcp_pm_addr_entry *entry)
+int mptcp_nl_fill_addr(struct sk_buff *skb,
+ struct mptcp_pm_addr_entry *entry)
{
struct mptcp_addr_info *addr = &entry->addr;
struct nlattr *attr;
@@ -2281,7 +2278,7 @@ void mptcp_event(enum mptcp_event_type type, const struct mptcp_sock *msk,
nlmsg_free(skb);
}
-static struct genl_family mptcp_genl_family __ro_after_init = {
+struct genl_family mptcp_genl_family __ro_after_init = {
.name = MPTCP_PM_NAME,
.version = MPTCP_PM_VER,
.netnsok = true,
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
index 6343d640ce8f..843c1e31de3f 100644
--- a/net/mptcp/protocol.h
+++ b/net/mptcp/protocol.h
@@ -343,6 +343,8 @@ struct mptcp_sock {
#define mptcp_for_each_subflow_safe(__msk, __subflow, __tmp) \
list_for_each_entry_safe(__subflow, __tmp, &((__msk)->conn_list), node)
+extern struct genl_family mptcp_genl_family;
+
static inline void msk_owned_by_me(const struct mptcp_sock *msk)
{
sock_owned_by_me((const struct sock *)msk);
@@ -1003,6 +1005,8 @@ void __mptcp_fastopen_gen_msk_ackseq(struct mptcp_sock *msk, struct mptcp_subflo
const struct mptcp_options_received *mp_opt);
void mptcp_fastopen_subflow_synack_set_params(struct mptcp_subflow_context *subflow,
struct request_sock *req);
+int mptcp_nl_fill_addr(struct sk_buff *skb,
+ struct mptcp_pm_addr_entry *entry);
static inline bool mptcp_pm_should_add_signal(struct mptcp_sock *msk)
{
--
2.40.1
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH mptcp-next v14 02/14] mptcp: implement mptcp_userspace_pm_dump_addr
2024-02-20 9:58 [PATCH mptcp-next v14 00/14] dump for userspace pm Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 01/14] mptcp: export mptcp_genl_family & mptcp_nl_fill_addr Geliang Tang
@ 2024-02-20 9:58 ` Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 03/14] mptcp: add token for get-addr in yaml Geliang Tang
` (13 subsequent siblings)
15 siblings, 0 replies; 37+ messages in thread
From: Geliang Tang @ 2024-02-20 9:58 UTC (permalink / raw)
To: mptcp; +Cc: Geliang Tang
From: Geliang Tang <tanggeliang@kylinos.cn>
This patch implements mptcp_userspace_pm_dump_addr() to dump addresses
from userspace pm address list. Use mptcp_token_get_sock() to get the
msk from the given token, if userspace PM is enabled in it, traverse
each address entry in address list, put every entry to userspace using
mptcp_pm_nl_put_entry_msg().
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
---
net/mptcp/pm_userspace.c | 60 ++++++++++++++++++++++++++++++++++++++++
net/mptcp/protocol.h | 2 ++
2 files changed, 62 insertions(+)
diff --git a/net/mptcp/pm_userspace.c b/net/mptcp/pm_userspace.c
index bc97cc30f013..d6b7be3afbe5 100644
--- a/net/mptcp/pm_userspace.c
+++ b/net/mptcp/pm_userspace.c
@@ -572,3 +572,63 @@ int mptcp_userspace_pm_set_flags(struct net *net, struct nlattr *token,
sock_put(sk);
return ret;
}
+
+int mptcp_userspace_pm_dump_addr(struct sk_buff *msg,
+ struct netlink_callback *cb)
+{
+ struct id_bitmap {
+ DECLARE_BITMAP(map, MPTCP_PM_MAX_ADDR_ID + 1);
+ } *bitmap;
+ const struct genl_info *info = genl_info_dump(cb);
+ struct net *net = sock_net(msg->sk);
+ struct mptcp_pm_addr_entry *entry;
+ struct mptcp_sock *msk;
+ struct nlattr *token;
+ int ret = -EINVAL;
+ struct sock *sk;
+ void *hdr;
+
+ bitmap = (struct id_bitmap *)cb->ctx;
+ token = info->attrs[MPTCP_PM_ATTR_TOKEN];
+
+ msk = mptcp_token_get_sock(net, nla_get_u32(token));
+ if (!msk) {
+ NL_SET_ERR_MSG_ATTR(info->extack, token, "invalid token");
+ return ret;
+ }
+
+ sk = (struct sock *)msk;
+
+ if (!mptcp_pm_is_userspace(msk)) {
+ GENL_SET_ERR_MSG(info, "invalid request; userspace PM not selected");
+ goto out;
+ }
+
+ lock_sock(sk);
+ spin_lock_bh(&msk->pm.lock);
+ list_for_each_entry(entry, &msk->pm.userspace_pm_local_addr_list, list) {
+ if (test_bit(entry->addr.id, bitmap->map))
+ continue;
+
+ hdr = genlmsg_put(msg, NETLINK_CB(cb->skb).portid,
+ cb->nlh->nlmsg_seq, &mptcp_genl_family,
+ NLM_F_MULTI, MPTCP_PM_CMD_GET_ADDR);
+ if (!hdr)
+ break;
+
+ if (mptcp_nl_fill_addr(msg, entry) < 0) {
+ genlmsg_cancel(msg, hdr);
+ break;
+ }
+
+ __set_bit(entry->addr.id, bitmap->map);
+ genlmsg_end(msg, hdr);
+ }
+ spin_unlock_bh(&msk->pm.lock);
+ release_sock(sk);
+ ret = msg->len;
+
+out:
+ sock_put(sk);
+ return ret;
+}
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
index 843c1e31de3f..0f6eee5496ad 100644
--- a/net/mptcp/protocol.h
+++ b/net/mptcp/protocol.h
@@ -1071,6 +1071,8 @@ bool mptcp_pm_rm_addr_signal(struct mptcp_sock *msk, unsigned int remaining,
int mptcp_pm_get_local_id(struct mptcp_sock *msk, struct sock_common *skc);
int mptcp_pm_nl_get_local_id(struct mptcp_sock *msk, struct mptcp_addr_info *skc);
int mptcp_userspace_pm_get_local_id(struct mptcp_sock *msk, struct mptcp_addr_info *skc);
+int mptcp_userspace_pm_dump_addr(struct sk_buff *msg,
+ struct netlink_callback *cb);
static inline u8 subflow_get_local_id(const struct mptcp_subflow_context *subflow)
{
--
2.40.1
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH mptcp-next v14 03/14] mptcp: add token for get-addr in yaml
2024-02-20 9:58 [PATCH mptcp-next v14 00/14] dump for userspace pm Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 01/14] mptcp: export mptcp_genl_family & mptcp_nl_fill_addr Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 02/14] mptcp: implement mptcp_userspace_pm_dump_addr Geliang Tang
@ 2024-02-20 9:58 ` Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 04/14] mptcp: dump addrs in userspace pm list Geliang Tang
` (12 subsequent siblings)
15 siblings, 0 replies; 37+ messages in thread
From: Geliang Tang @ 2024-02-20 9:58 UTC (permalink / raw)
To: mptcp; +Cc: Geliang Tang
From: Geliang Tang <tanggeliang@kylinos.cn>
This patch adds token parameter together with addr in get-addr section in
mptcp_pm.yaml, then use the following commands to update mptcp_pm_gen.c
and mptcp_pm_gen.h:
./tools/net/ynl/ynl-gen-c.py --mode kernel \
--spec Documentation/netlink/specs/mptcp_pm.yaml --source \
-o net/mptcp/mptcp_pm_gen.c
./tools/net/ynl/ynl-gen-c.py --mode kernel \
--spec Documentation/netlink/specs/mptcp_pm.yaml --header \
-o net/mptcp/mptcp_pm_gen.h
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
---
Documentation/netlink/specs/mptcp_pm.yaml | 3 ++-
net/mptcp/mptcp_pm_gen.c | 7 ++++---
net/mptcp/mptcp_pm_gen.h | 2 +-
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/Documentation/netlink/specs/mptcp_pm.yaml b/Documentation/netlink/specs/mptcp_pm.yaml
index 49f90cfb4698..af525ed29792 100644
--- a/Documentation/netlink/specs/mptcp_pm.yaml
+++ b/Documentation/netlink/specs/mptcp_pm.yaml
@@ -292,13 +292,14 @@ operations:
-
name: get-addr
doc: Get endpoint information
- attribute-set: endpoint
+ attribute-set: attr
dont-validate: [ strict ]
flags: [ uns-admin-perm ]
do: &get-addr-attrs
request:
attributes:
- addr
+ - token
reply:
attributes:
- addr
diff --git a/net/mptcp/mptcp_pm_gen.c b/net/mptcp/mptcp_pm_gen.c
index 670da7822e6c..c30a2a90a192 100644
--- a/net/mptcp/mptcp_pm_gen.c
+++ b/net/mptcp/mptcp_pm_gen.c
@@ -32,8 +32,9 @@ const struct nla_policy mptcp_pm_del_addr_nl_policy[MPTCP_PM_ENDPOINT_ADDR + 1]
};
/* MPTCP_PM_CMD_GET_ADDR - do */
-const struct nla_policy mptcp_pm_get_addr_nl_policy[MPTCP_PM_ENDPOINT_ADDR + 1] = {
- [MPTCP_PM_ENDPOINT_ADDR] = NLA_POLICY_NESTED(mptcp_pm_address_nl_policy),
+const struct nla_policy mptcp_pm_get_addr_nl_policy[MPTCP_PM_ATTR_TOKEN + 1] = {
+ [MPTCP_PM_ATTR_ADDR] = NLA_POLICY_NESTED(mptcp_pm_address_nl_policy),
+ [MPTCP_PM_ATTR_TOKEN] = { .type = NLA_U32, },
};
/* MPTCP_PM_CMD_FLUSH_ADDRS - do */
@@ -110,7 +111,7 @@ const struct genl_ops mptcp_pm_nl_ops[11] = {
.doit = mptcp_pm_nl_get_addr_doit,
.dumpit = mptcp_pm_nl_get_addr_dumpit,
.policy = mptcp_pm_get_addr_nl_policy,
- .maxattr = MPTCP_PM_ENDPOINT_ADDR,
+ .maxattr = MPTCP_PM_ATTR_TOKEN,
.flags = GENL_UNS_ADMIN_PERM,
},
{
diff --git a/net/mptcp/mptcp_pm_gen.h b/net/mptcp/mptcp_pm_gen.h
index ac9fc7225b6a..e24258f6f819 100644
--- a/net/mptcp/mptcp_pm_gen.h
+++ b/net/mptcp/mptcp_pm_gen.h
@@ -18,7 +18,7 @@ extern const struct nla_policy mptcp_pm_add_addr_nl_policy[MPTCP_PM_ENDPOINT_ADD
extern const struct nla_policy mptcp_pm_del_addr_nl_policy[MPTCP_PM_ENDPOINT_ADDR + 1];
-extern const struct nla_policy mptcp_pm_get_addr_nl_policy[MPTCP_PM_ENDPOINT_ADDR + 1];
+extern const struct nla_policy mptcp_pm_get_addr_nl_policy[MPTCP_PM_ATTR_TOKEN + 1];
extern const struct nla_policy mptcp_pm_flush_addrs_nl_policy[MPTCP_PM_ENDPOINT_ADDR + 1];
--
2.40.1
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH mptcp-next v14 04/14] mptcp: dump addrs in userspace pm list
2024-02-20 9:58 [PATCH mptcp-next v14 00/14] dump for userspace pm Geliang Tang
` (2 preceding siblings ...)
2024-02-20 9:58 ` [PATCH mptcp-next v14 03/14] mptcp: add token for get-addr in yaml Geliang Tang
@ 2024-02-20 9:58 ` Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 05/14] mptcp: check userspace pm flags Geliang Tang
` (11 subsequent siblings)
15 siblings, 0 replies; 37+ messages in thread
From: Geliang Tang @ 2024-02-20 9:58 UTC (permalink / raw)
To: mptcp; +Cc: Geliang Tang
From: Geliang Tang <tanggeliang@kylinos.cn>
This patch renames mptcp_pm_nl_get_addr_dumpit() as a dedicated in-kernel
netlink PM dump addrs function mptcp_pm_nl_dump_addr(), and invoke a newly
added wrapper mptcp_pm_dump_addr() in mptcp_pm_nl_get_addr_dumpit().
Invoke in-kernel PM dump addrs function mptcp_pm_nl_dump_addr() or
userspace PM dump addrs function mptcp_userspace_pm_dump_addr() based on
whether the token parameter is passed in or not in the wrapper.
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
---
net/mptcp/pm.c | 9 +++++++++
net/mptcp/pm_netlink.c | 10 ++++++++--
net/mptcp/protocol.h | 3 +++
3 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/net/mptcp/pm.c b/net/mptcp/pm.c
index 53e0b08b1123..193198cec74a 100644
--- a/net/mptcp/pm.c
+++ b/net/mptcp/pm.c
@@ -441,6 +441,15 @@ int mptcp_pm_get_flags_and_ifindex_by_id(struct mptcp_sock *msk, unsigned int id
return mptcp_pm_nl_get_flags_and_ifindex_by_id(msk, id, flags, ifindex);
}
+int mptcp_pm_dump_addr(struct sk_buff *msg, struct netlink_callback *cb)
+{
+ const struct genl_info *info = genl_info_dump(cb);
+
+ if (info->attrs[MPTCP_PM_ATTR_TOKEN])
+ return mptcp_userspace_pm_dump_addr(msg, cb);
+ return mptcp_pm_nl_dump_addr(msg, cb);
+}
+
int mptcp_pm_set_flags(struct net *net, struct nlattr *token,
struct mptcp_pm_addr_entry *loc,
struct mptcp_pm_addr_entry *rem, u8 bkup)
diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
index 5cca84c6b87b..7b15bb4f12c1 100644
--- a/net/mptcp/pm_netlink.c
+++ b/net/mptcp/pm_netlink.c
@@ -1722,8 +1722,8 @@ int mptcp_pm_nl_get_addr_doit(struct sk_buff *skb, struct genl_info *info)
return ret;
}
-int mptcp_pm_nl_get_addr_dumpit(struct sk_buff *msg,
- struct netlink_callback *cb)
+int mptcp_pm_nl_dump_addr(struct sk_buff *msg,
+ struct netlink_callback *cb)
{
struct net *net = sock_net(msg->sk);
struct mptcp_pm_addr_entry *entry;
@@ -1765,6 +1765,12 @@ int mptcp_pm_nl_get_addr_dumpit(struct sk_buff *msg,
return msg->len;
}
+int mptcp_pm_nl_get_addr_dumpit(struct sk_buff *msg,
+ struct netlink_callback *cb)
+{
+ return mptcp_pm_dump_addr(msg, cb);
+}
+
static int parse_limit(struct genl_info *info, int id, unsigned int *limit)
{
struct nlattr *attr = info->attrs[id];
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
index 0f6eee5496ad..6501b0142794 100644
--- a/net/mptcp/protocol.h
+++ b/net/mptcp/protocol.h
@@ -1071,6 +1071,9 @@ bool mptcp_pm_rm_addr_signal(struct mptcp_sock *msk, unsigned int remaining,
int mptcp_pm_get_local_id(struct mptcp_sock *msk, struct sock_common *skc);
int mptcp_pm_nl_get_local_id(struct mptcp_sock *msk, struct mptcp_addr_info *skc);
int mptcp_userspace_pm_get_local_id(struct mptcp_sock *msk, struct mptcp_addr_info *skc);
+int mptcp_pm_dump_addr(struct sk_buff *msg, struct netlink_callback *cb);
+int mptcp_pm_nl_dump_addr(struct sk_buff *msg,
+ struct netlink_callback *cb);
int mptcp_userspace_pm_dump_addr(struct sk_buff *msg,
struct netlink_callback *cb);
--
2.40.1
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH mptcp-next v14 05/14] mptcp: check userspace pm flags
2024-02-20 9:58 [PATCH mptcp-next v14 00/14] dump for userspace pm Geliang Tang
` (3 preceding siblings ...)
2024-02-20 9:58 ` [PATCH mptcp-next v14 04/14] mptcp: dump addrs in userspace pm list Geliang Tang
@ 2024-02-20 9:58 ` Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 06/14] selftests: mptcp: add userspace pm subflow flag Geliang Tang
` (10 subsequent siblings)
15 siblings, 0 replies; 37+ messages in thread
From: Geliang Tang @ 2024-02-20 9:58 UTC (permalink / raw)
To: mptcp; +Cc: Geliang Tang
From: Geliang Tang <tanggeliang@kylinos.cn>
Just like MPTCP_PM_ADDR_FLAG_SIGNAL flag is checked in userspace PM
announce mptcp_pm_nl_announce_doit(), PM flags should be checked in
mptcp_pm_nl_subflow_create_doit() too.
If MPTCP_PM_ADDR_FLAG_SUBFLOW flag is not set, there's no flags field
in the output of dump_addr. This looks a bit strange:
id 10 flags 10.0.3.2
This patch uses mptcp_pm_parse_entry() instead of mptcp_pm_parse_addr()
to get the PM flags of the entry and check it. MPTCP_PM_ADDR_FLAG_SIGNAL
flag shouldn't be set here, and if MPTCP_PM_ADDR_FLAG_SUBFLOW flag is
missing from the netlink attribute, always set this flag.
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
---
net/mptcp/pm_userspace.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/net/mptcp/pm_userspace.c b/net/mptcp/pm_userspace.c
index d6b7be3afbe5..3bd13e94b568 100644
--- a/net/mptcp/pm_userspace.c
+++ b/net/mptcp/pm_userspace.c
@@ -334,7 +334,6 @@ int mptcp_pm_nl_subflow_create_doit(struct sk_buff *skb, struct genl_info *info)
struct nlattr *laddr = info->attrs[MPTCP_PM_ATTR_ADDR];
struct mptcp_pm_addr_entry local = { 0 };
struct mptcp_addr_info addr_r;
- struct mptcp_addr_info addr_l;
struct mptcp_sock *msk;
int err = -EINVAL;
struct sock *sk;
@@ -360,25 +359,31 @@ int mptcp_pm_nl_subflow_create_doit(struct sk_buff *skb, struct genl_info *info)
goto create_err;
}
- err = mptcp_pm_parse_addr(laddr, info, &addr_l);
+ err = mptcp_pm_parse_entry(laddr, info, true, &local);
if (err < 0) {
NL_SET_ERR_MSG_ATTR(info->extack, laddr, "error parsing local addr");
goto create_err;
}
+ if (local.flags & MPTCP_PM_ADDR_FLAG_SIGNAL) {
+ GENL_SET_ERR_MSG(info, "invalid addr flags");
+ err = -EINVAL;
+ goto create_err;
+ }
+ local.flags |= MPTCP_PM_ADDR_FLAG_SUBFLOW;
+
err = mptcp_pm_parse_addr(raddr, info, &addr_r);
if (err < 0) {
NL_SET_ERR_MSG_ATTR(info->extack, raddr, "error parsing remote addr");
goto create_err;
}
- if (!mptcp_pm_addr_families_match(sk, &addr_l, &addr_r)) {
+ if (!mptcp_pm_addr_families_match(sk, &local.addr, &addr_r)) {
GENL_SET_ERR_MSG(info, "families mismatch");
err = -EINVAL;
goto create_err;
}
- local.addr = addr_l;
err = mptcp_userspace_pm_append_new_local_addr(msk, &local, false);
if (err < 0) {
GENL_SET_ERR_MSG(info, "did not match address and id");
@@ -387,7 +392,7 @@ int mptcp_pm_nl_subflow_create_doit(struct sk_buff *skb, struct genl_info *info)
lock_sock(sk);
- err = __mptcp_subflow_connect(sk, &addr_l, &addr_r);
+ err = __mptcp_subflow_connect(sk, &local.addr, &addr_r);
release_sock(sk);
--
2.40.1
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH mptcp-next v14 06/14] selftests: mptcp: add userspace pm subflow flag
2024-02-20 9:58 [PATCH mptcp-next v14 00/14] dump for userspace pm Geliang Tang
` (4 preceding siblings ...)
2024-02-20 9:58 ` [PATCH mptcp-next v14 05/14] mptcp: check userspace pm flags Geliang Tang
@ 2024-02-20 9:58 ` Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 07/14] selftests: mptcp: add token for dump_addr Geliang Tang
` (9 subsequent siblings)
15 siblings, 0 replies; 37+ messages in thread
From: Geliang Tang @ 2024-02-20 9:58 UTC (permalink / raw)
To: mptcp; +Cc: Geliang Tang
From: Geliang Tang <tanggeliang@kylinos.cn>
This patch adds the address flag MPTCP_PM_ADDR_FLAG_SUBFLOW in csf() in
pm_nl_ctl.c when subflow is created by a userspace PM.
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
---
tools/testing/selftests/net/mptcp/pm_nl_ctl.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/tools/testing/selftests/net/mptcp/pm_nl_ctl.c b/tools/testing/selftests/net/mptcp/pm_nl_ctl.c
index 49369c4a5f26..e97856323ec3 100644
--- a/tools/testing/selftests/net/mptcp/pm_nl_ctl.c
+++ b/tools/testing/selftests/net/mptcp/pm_nl_ctl.c
@@ -453,6 +453,7 @@ int csf(int fd, int pm_family, int argc, char *argv[])
char data[NLMSG_ALIGN(sizeof(struct nlmsghdr)) +
NLMSG_ALIGN(sizeof(struct genlmsghdr)) +
1024];
+ u_int32_t flags = MPTCP_PM_ADDR_FLAG_SUBFLOW;
const char *params[5];
struct nlmsghdr *nh;
struct rtattr *addr;
@@ -558,6 +559,13 @@ int csf(int fd, int pm_family, int argc, char *argv[])
off += NLMSG_ALIGN(rta->rta_len);
}
+ /* addr flags */
+ rta = (void *)(data + off);
+ rta->rta_type = MPTCP_PM_ADDR_ATTR_FLAGS;
+ rta->rta_len = RTA_LENGTH(4);
+ memcpy(RTA_DATA(rta), &flags, 4);
+ off += NLMSG_ALIGN(rta->rta_len);
+
addr->rta_len = off - addr_start;
}
--
2.40.1
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH mptcp-next v14 07/14] selftests: mptcp: add token for dump_addr
2024-02-20 9:58 [PATCH mptcp-next v14 00/14] dump for userspace pm Geliang Tang
` (5 preceding siblings ...)
2024-02-20 9:58 ` [PATCH mptcp-next v14 06/14] selftests: mptcp: add userspace pm subflow flag Geliang Tang
@ 2024-02-20 9:58 ` Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 08/14] selftests: mptcp: add mptcp_lib_check_output helper Geliang Tang
` (8 subsequent siblings)
15 siblings, 0 replies; 37+ messages in thread
From: Geliang Tang @ 2024-02-20 9:58 UTC (permalink / raw)
To: mptcp; +Cc: Geliang Tang
From: Geliang Tang <tanggeliang@kylinos.cn>
The command dump_addr() of pm_nl_ctl can be used like this in in-kernel PM:
pm_nl_ctl dump
This patch adds token argument for it to support userspace PM:
pm_nl_ctl dump token $token
If 'token $token' is passed to dump_addr(), copy it into the kernel
netlink.
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
---
tools/testing/selftests/net/mptcp/pm_nl_ctl.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/tools/testing/selftests/net/mptcp/pm_nl_ctl.c b/tools/testing/selftests/net/mptcp/pm_nl_ctl.c
index e97856323ec3..8d7d1b4ed28e 100644
--- a/tools/testing/selftests/net/mptcp/pm_nl_ctl.c
+++ b/tools/testing/selftests/net/mptcp/pm_nl_ctl.c
@@ -1127,8 +1127,16 @@ int dump_addrs(int fd, int pm_family, int argc, char *argv[])
1024];
pid_t pid = getpid();
struct nlmsghdr *nh;
+ u_int32_t token = 0;
+ struct rtattr *rta;
int off = 0;
+ if (argc != 2 && argc != 4)
+ syntax(argv);
+
+ if (argc == 4 && !strcmp(argv[2], "token"))
+ token = strtoul(argv[3], NULL, 10);
+
memset(data, 0, sizeof(data));
nh = (void *)data;
off = init_genl_req(data, pm_family, MPTCP_PM_CMD_GET_ADDR,
@@ -1138,6 +1146,15 @@ int dump_addrs(int fd, int pm_family, int argc, char *argv[])
nh->nlmsg_pid = pid;
nh->nlmsg_len = off;
+ /* token */
+ if (token) {
+ rta = (void *)(data + off);
+ rta->rta_type = MPTCP_PM_ATTR_TOKEN;
+ rta->rta_len = RTA_LENGTH(4);
+ memcpy(RTA_DATA(rta), &token, 4);
+ off += NLMSG_ALIGN(rta->rta_len);
+ }
+
print_addrs(nh, pm_family, do_nl_req(fd, nh, off, sizeof(data)));
return 0;
}
--
2.40.1
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH mptcp-next v14 08/14] selftests: mptcp: add mptcp_lib_check_output helper
2024-02-20 9:58 [PATCH mptcp-next v14 00/14] dump for userspace pm Geliang Tang
` (6 preceding siblings ...)
2024-02-20 9:58 ` [PATCH mptcp-next v14 07/14] selftests: mptcp: add token for dump_addr Geliang Tang
@ 2024-02-20 9:58 ` Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 09/14] selftests: mptcp: dump userspace addrs list Geliang Tang
` (7 subsequent siblings)
15 siblings, 0 replies; 37+ messages in thread
From: Geliang Tang @ 2024-02-20 9:58 UTC (permalink / raw)
To: mptcp; +Cc: Geliang Tang
From: Geliang Tang <tanggeliang@kylinos.cn>
Extract the main part of check() in pm_netlink.sh into a new helper
named mptcp_lib_check_output in mptcp_lib.sh.
This helper will be used for userspace dump addresses tests.
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
---
.../testing/selftests/net/mptcp/mptcp_lib.sh | 19 +++++++++++++++++++
.../testing/selftests/net/mptcp/pm_netlink.sh | 18 +++++++-----------
2 files changed, 26 insertions(+), 11 deletions(-)
diff --git a/tools/testing/selftests/net/mptcp/mptcp_lib.sh b/tools/testing/selftests/net/mptcp/mptcp_lib.sh
index 6d9a2af85a8d..aca35376006b 100644
--- a/tools/testing/selftests/net/mptcp/mptcp_lib.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_lib.sh
@@ -350,3 +350,22 @@ mptcp_lib_check_tools() {
esac
done
}
+
+mptcp_lib_check_output() {
+ local err="$1"
+ local cmd="$2"
+ local expected="$3"
+ local cmd_ret=0
+ local out=$(${cmd} 2>${err}) || cmd_ret=${?}
+
+ if [ $cmd_ret -ne 0 ]; then
+ mptcp_lib_print_err "[FAIL] command execution '$cmd' stderr"
+ cat "${err}"
+ return 2
+ elif [ "$out" = "$expected" ]; then
+ return 0
+ else
+ mptcp_lib_print_err "[FAIL] expected '$expected' got '$out'"
+ return 1
+ fi
+}
diff --git a/tools/testing/selftests/net/mptcp/pm_netlink.sh b/tools/testing/selftests/net/mptcp/pm_netlink.sh
index cb6ea67e688b..1ec9d8622fc9 100755
--- a/tools/testing/selftests/net/mptcp/pm_netlink.sh
+++ b/tools/testing/selftests/net/mptcp/pm_netlink.sh
@@ -49,21 +49,17 @@ check()
local cmd="$1"
local expected="$2"
local msg="$3"
- local out=`$cmd 2>$err`
- local cmd_ret=$?
+ local rc=0
printf "%-50s" "$msg"
- if [ $cmd_ret -ne 0 ]; then
- echo "[FAIL] command execution '$cmd' stderr "
- cat $err
- mptcp_lib_result_fail "${msg} # error ${cmd_ret}"
+ mptcp_lib_check_output "${err}" "${cmd}" "${expected}" || rc=${?}
+ if [ ${rc} -eq 2 ]; then
+ mptcp_lib_result_fail "${msg} # error ${rc}"
ret=1
- elif [ "$out" = "$expected" ]; then
- echo "[ OK ]"
+ elif [ ${rc} -eq 0 ]; then
+ mptcp_lib_print_ok "[ OK ]"
mptcp_lib_result_pass "${msg}"
- else
- echo -n "[FAIL] "
- echo "expected '$expected' got '$out'"
+ elif [ ${rc} -eq 1 ]; then
mptcp_lib_result_fail "${msg} # different output"
ret=1
fi
--
2.40.1
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH mptcp-next v14 09/14] selftests: mptcp: dump userspace addrs list
2024-02-20 9:58 [PATCH mptcp-next v14 00/14] dump for userspace pm Geliang Tang
` (7 preceding siblings ...)
2024-02-20 9:58 ` [PATCH mptcp-next v14 08/14] selftests: mptcp: add mptcp_lib_check_output helper Geliang Tang
@ 2024-02-20 9:58 ` Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 10/14] mptcp: add userspace_pm_lookup_addr_by_id helper Geliang Tang
` (6 subsequent siblings)
15 siblings, 0 replies; 37+ messages in thread
From: Geliang Tang @ 2024-02-20 9:58 UTC (permalink / raw)
To: mptcp; +Cc: Geliang Tang
From: Geliang Tang <tanggeliang@kylinos.cn>
This patch adds a new helper userspace_pm_dump() to dump addresses
for the userspace PM. Use this helper to check whether an ID 0 subflow
is listed in the output of dump command after creating an ID 0 subflow
in "userspace pm create id 0 subflow" test. Dump userspace PM addresses
list in "userspace pm add & remove address" test and in "userspace pm
create destroy subflow" test.
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
---
.../testing/selftests/net/mptcp/mptcp_join.sh | 61 +++++++++++++++++++
1 file changed, 61 insertions(+)
diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
index 4a8217bcc008..9bdf2b535e87 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
@@ -21,6 +21,7 @@ cinfail=""
cinsent=""
tmpfile=""
cout=""
+err=""
capout=""
ns1=""
ns2=""
@@ -163,6 +164,7 @@ init() {
cin=$(mktemp)
cinsent=$(mktemp)
cout=$(mktemp)
+ err=$(mktemp)
evts_ns1=$(mktemp)
evts_ns2=$(mktemp)
@@ -178,6 +180,7 @@ cleanup()
rm -f "$sin" "$sout" "$cinsent" "$cinfail"
rm -f "$tmpfile"
rm -rf $evts_ns1 $evts_ns2
+ rm -f "$err"
cleanup_partial
}
@@ -3330,6 +3333,50 @@ userspace_pm_rm_sf()
wait_rm_sf $1 "${cnt}"
}
+check_output()
+{
+ local cmd="$1"
+ local expected="$2"
+ local msg="$3"
+ local rc=0
+
+ mptcp_lib_check_output "${err}" "${cmd}" "${expected}" || rc=${?}
+ if [ ${rc} -eq 2 ]; then
+ fail_test "fail to check output # error ${rc}"
+ elif [ ${rc} -eq 0 ]; then
+ print_ok
+ elif [ ${rc} -eq 1 ]; then
+ fail_test "fail to check output # different output"
+ fi
+}
+
+# $1: ns
+userspace_pm_dump()
+{
+ local evts=$evts_ns1
+ local tk
+
+ [ "$1" == "$ns2" ] && evts=$evts_ns2
+ tk=$(mptcp_lib_evts_get_info token "$evts")
+
+ ip netns exec $1 ./pm_nl_ctl dump token $tk
+}
+
+userspace_pm_chk_dump_addr()
+{
+ local ns="${1}"
+ local exp="${2}"
+ local check="${3}"
+
+ print_check "dump addrs ${check}"
+
+ if mptcp_lib_kallsyms_has "mptcp_userspace_pm_dump_addr$"; then
+ check_output "userspace_pm_dump ${ns}" "${exp}"
+ else
+ print_skip
+ fi
+}
+
userspace_tests()
{
# userspace pm type prevents add_addr
@@ -3421,10 +3468,16 @@ userspace_tests()
chk_mptcp_info subflows 2 subflows 2
chk_subflows_total 3 3
chk_mptcp_info add_addr_signal 2 add_addr_accepted 2
+ userspace_pm_chk_dump_addr "${ns1}" \
+ $'id 10 flags signal 10.0.2.1\nid 20 flags signal 10.0.3.1' \
+ "signal"
userspace_pm_rm_addr $ns1 10
userspace_pm_rm_sf $ns1 "::ffff:10.0.2.1" $SUB_ESTABLISHED
+ userspace_pm_chk_dump_addr "${ns1}" \
+ "id 20 flags signal 10.0.3.1" "after rm_addr 10"
userspace_pm_rm_addr $ns1 20
userspace_pm_rm_sf $ns1 10.0.3.1 $SUB_ESTABLISHED
+ userspace_pm_chk_dump_addr "${ns1}" "" "after rm_addr 20"
chk_rm_nr 2 2 invert
chk_mptcp_info subflows 0 subflows 0
chk_subflows_total 1 1
@@ -3445,8 +3498,14 @@ userspace_tests()
chk_join_nr 1 1 1
chk_mptcp_info subflows 1 subflows 1
chk_subflows_total 2 2
+ userspace_pm_chk_dump_addr "${ns2}" \
+ "id 20 flags subflow 10.0.3.2" \
+ "subflow"
userspace_pm_rm_addr $ns2 20
userspace_pm_rm_sf $ns2 10.0.3.2 $SUB_ESTABLISHED
+ userspace_pm_chk_dump_addr "${ns2}" \
+ "" \
+ "after rm_addr 20"
chk_rm_nr 1 1
chk_mptcp_info subflows 0 subflows 0
chk_subflows_total 1 1
@@ -3466,6 +3525,8 @@ userspace_tests()
chk_mptcp_info subflows 0 subflows 0
chk_subflows_total 1 1
userspace_pm_add_sf $ns2 10.0.3.2 0
+ userspace_pm_chk_dump_addr "${ns2}" \
+ "id 0 flags subflow 10.0.3.2" "id 0 subflow"
chk_join_nr 1 1 1
chk_mptcp_info subflows 1 subflows 1
chk_subflows_total 2 2
--
2.40.1
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH mptcp-next v14 10/14] mptcp: add userspace_pm_lookup_addr_by_id helper
2024-02-20 9:58 [PATCH mptcp-next v14 00/14] dump for userspace pm Geliang Tang
` (8 preceding siblings ...)
2024-02-20 9:58 ` [PATCH mptcp-next v14 09/14] selftests: mptcp: dump userspace addrs list Geliang Tang
@ 2024-02-20 9:58 ` Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 11/14] mptcp: implement mptcp_userspace_pm_get_addr Geliang Tang
` (5 subsequent siblings)
15 siblings, 0 replies; 37+ messages in thread
From: Geliang Tang @ 2024-02-20 9:58 UTC (permalink / raw)
To: mptcp; +Cc: Geliang Tang
From: Geliang Tang <tanggeliang@kylinos.cn>
Corresponding __lookup_addr_by_id() helper in the in-kernel netlink PM,
this patch adds a new helper mptcp_userspace_pm_lookup_addr_by_id() to
lookup the address entry with the given id on the userspace pm local
address list.
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
---
net/mptcp/pm_userspace.c | 31 ++++++++++++++++---------------
1 file changed, 16 insertions(+), 15 deletions(-)
diff --git a/net/mptcp/pm_userspace.c b/net/mptcp/pm_userspace.c
index 3bd13e94b568..20cbcb62cd8c 100644
--- a/net/mptcp/pm_userspace.c
+++ b/net/mptcp/pm_userspace.c
@@ -106,19 +106,26 @@ static int mptcp_userspace_pm_delete_local_addr(struct mptcp_sock *msk,
return -EINVAL;
}
+static struct mptcp_pm_addr_entry *
+mptcp_userspace_pm_lookup_addr_by_id(struct mptcp_sock *msk, unsigned int id)
+{
+ struct mptcp_pm_addr_entry *entry;
+
+ list_for_each_entry(entry, &msk->pm.userspace_pm_local_addr_list, list) {
+ if (entry->addr.id == id)
+ return entry;
+ }
+ return NULL;
+}
+
int mptcp_userspace_pm_get_flags_and_ifindex_by_id(struct mptcp_sock *msk,
unsigned int id,
u8 *flags, int *ifindex)
{
- struct mptcp_pm_addr_entry *entry, *match = NULL;
+ struct mptcp_pm_addr_entry *match;
spin_lock_bh(&msk->pm.lock);
- list_for_each_entry(entry, &msk->pm.userspace_pm_local_addr_list, list) {
- if (id == entry->addr.id) {
- match = entry;
- break;
- }
- }
+ match = mptcp_userspace_pm_lookup_addr_by_id(msk, id);
spin_unlock_bh(&msk->pm.lock);
if (match) {
*flags = match->flags;
@@ -261,7 +268,7 @@ int mptcp_pm_nl_remove_doit(struct sk_buff *skb, struct genl_info *info)
{
struct nlattr *token = info->attrs[MPTCP_PM_ATTR_TOKEN];
struct nlattr *id = info->attrs[MPTCP_PM_ATTR_LOC_ID];
- struct mptcp_pm_addr_entry *match = NULL;
+ struct mptcp_pm_addr_entry *match;
struct mptcp_pm_addr_entry *entry;
struct mptcp_sock *msk;
LIST_HEAD(free_list);
@@ -298,13 +305,7 @@ int mptcp_pm_nl_remove_doit(struct sk_buff *skb, struct genl_info *info)
lock_sock(sk);
- list_for_each_entry(entry, &msk->pm.userspace_pm_local_addr_list, list) {
- if (entry->addr.id == id_val) {
- match = entry;
- break;
- }
- }
-
+ match = mptcp_userspace_pm_lookup_addr_by_id(msk, id_val);
if (!match) {
GENL_SET_ERR_MSG(info, "address with specified id not found");
release_sock(sk);
--
2.40.1
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH mptcp-next v14 11/14] mptcp: implement mptcp_userspace_pm_get_addr
2024-02-20 9:58 [PATCH mptcp-next v14 00/14] dump for userspace pm Geliang Tang
` (9 preceding siblings ...)
2024-02-20 9:58 ` [PATCH mptcp-next v14 10/14] mptcp: add userspace_pm_lookup_addr_by_id helper Geliang Tang
@ 2024-02-20 9:58 ` Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 12/14] mptcp: get addr in userspace pm list Geliang Tang
` (4 subsequent siblings)
15 siblings, 0 replies; 37+ messages in thread
From: Geliang Tang @ 2024-02-20 9:58 UTC (permalink / raw)
To: mptcp; +Cc: Geliang Tang
From: Geliang Tang <tanggeliang@kylinos.cn>
This patch implements mptcp_userspace_pm_get_addr() to get an address
from userspace pm address list according the given 'token' and 'id'.
Use nla_get_u32() to get the u32 value of 'token', then pass it to
mptcp_token_get_sock() to get the msk. Pass 'msk' and 'id' to the helper
mptcp_userspace_pm_lookup_addr_by_id() to get the address entry. Put
this entry to userspace using mptcp_pm_nl_put_entry_info().
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
---
net/mptcp/pm_userspace.c | 74 ++++++++++++++++++++++++++++++++++++++++
net/mptcp/protocol.h | 2 ++
2 files changed, 76 insertions(+)
diff --git a/net/mptcp/pm_userspace.c b/net/mptcp/pm_userspace.c
index 20cbcb62cd8c..b9809d988693 100644
--- a/net/mptcp/pm_userspace.c
+++ b/net/mptcp/pm_userspace.c
@@ -638,3 +638,77 @@ int mptcp_userspace_pm_dump_addr(struct sk_buff *msg,
sock_put(sk);
return ret;
}
+
+int mptcp_userspace_pm_get_addr(struct sk_buff *skb,
+ struct genl_info *info)
+{
+ struct nlattr *attr = info->attrs[MPTCP_PM_ENDPOINT_ADDR];
+ struct nlattr *token = info->attrs[MPTCP_PM_ATTR_TOKEN];
+ struct mptcp_pm_addr_entry addr, *entry;
+ struct net *net = sock_net(skb->sk);
+ struct mptcp_sock *msk;
+ struct sk_buff *msg;
+ int ret = -EINVAL;
+ struct sock *sk;
+ void *reply;
+
+ msk = mptcp_token_get_sock(net, nla_get_u32(token));
+ if (!msk) {
+ NL_SET_ERR_MSG_ATTR(info->extack, token, "invalid token");
+ return ret;
+ }
+
+ sk = (struct sock *)msk;
+
+ if (!mptcp_pm_is_userspace(msk)) {
+ GENL_SET_ERR_MSG(info, "invalid request; userspace PM not selected");
+ goto out;
+ }
+
+ ret = mptcp_pm_parse_entry(attr, info, false, &addr);
+ if (ret < 0)
+ goto out;
+
+ msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
+ if (!msg) {
+ ret = -ENOMEM;
+ goto out;
+ }
+
+ reply = genlmsg_put_reply(msg, info, &mptcp_genl_family, 0,
+ info->genlhdr->cmd);
+ if (!reply) {
+ GENL_SET_ERR_MSG(info, "not enough space in Netlink message");
+ ret = -EMSGSIZE;
+ goto fail;
+ }
+
+ lock_sock(sk);
+ spin_lock_bh(&msk->pm.lock);
+ entry = mptcp_userspace_pm_lookup_addr_by_id(msk, addr.addr.id);
+ if (!entry) {
+ GENL_SET_ERR_MSG(info, "address not found");
+ ret = -EINVAL;
+ goto unlock_fail;
+ }
+
+ ret = mptcp_nl_fill_addr(msg, entry);
+ if (ret)
+ goto unlock_fail;
+
+ genlmsg_end(msg, reply);
+ ret = genlmsg_reply(msg, info);
+ spin_unlock_bh(&msk->pm.lock);
+ release_sock(sk);
+ sock_put(sk);
+ return ret;
+
+unlock_fail:
+ spin_unlock_bh(&msk->pm.lock);
+ release_sock(sk);
+fail:
+ nlmsg_free(msg);
+out:
+ sock_put(sk);
+ return ret;
+}
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
index 6501b0142794..a4fa66c14f7f 100644
--- a/net/mptcp/protocol.h
+++ b/net/mptcp/protocol.h
@@ -1076,6 +1076,8 @@ int mptcp_pm_nl_dump_addr(struct sk_buff *msg,
struct netlink_callback *cb);
int mptcp_userspace_pm_dump_addr(struct sk_buff *msg,
struct netlink_callback *cb);
+int mptcp_userspace_pm_get_addr(struct sk_buff *skb,
+ struct genl_info *info);
static inline u8 subflow_get_local_id(const struct mptcp_subflow_context *subflow)
{
--
2.40.1
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH mptcp-next v14 12/14] mptcp: get addr in userspace pm list
2024-02-20 9:58 [PATCH mptcp-next v14 00/14] dump for userspace pm Geliang Tang
` (10 preceding siblings ...)
2024-02-20 9:58 ` [PATCH mptcp-next v14 11/14] mptcp: implement mptcp_userspace_pm_get_addr Geliang Tang
@ 2024-02-20 9:58 ` Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 13/14] selftests: mptcp: add token for get_addr Geliang Tang
` (3 subsequent siblings)
15 siblings, 0 replies; 37+ messages in thread
From: Geliang Tang @ 2024-02-20 9:58 UTC (permalink / raw)
To: mptcp; +Cc: Geliang Tang
From: Geliang Tang <tanggeliang@kylinos.cn>
This patch renames mptcp_pm_nl_get_addr_doit() as a dedicated in-kernel
netlink PM get addr function mptcp_pm_nl_get_addr(). and invoke a new
wrapper mptcp_pm_get_addr() in mptcp_pm_nl_get_addr_doit.
If a token is gotten in the wrapper, that means a userspace PM is used.
So invoke mptcp_userspace_pm_get_addr() to get addr in userspace PM list.
Otherwise, invoke mptcp_pm_nl_get_addr().
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
---
net/mptcp/pm.c | 7 +++++++
net/mptcp/pm_netlink.c | 7 ++++++-
net/mptcp/protocol.h | 2 ++
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/net/mptcp/pm.c b/net/mptcp/pm.c
index 193198cec74a..b4bdd92a5648 100644
--- a/net/mptcp/pm.c
+++ b/net/mptcp/pm.c
@@ -441,6 +441,13 @@ int mptcp_pm_get_flags_and_ifindex_by_id(struct mptcp_sock *msk, unsigned int id
return mptcp_pm_nl_get_flags_and_ifindex_by_id(msk, id, flags, ifindex);
}
+int mptcp_pm_get_addr(struct sk_buff *skb, struct genl_info *info)
+{
+ if (info->attrs[MPTCP_PM_ATTR_TOKEN])
+ return mptcp_userspace_pm_get_addr(skb, info);
+ return mptcp_pm_nl_get_addr(skb, info);
+}
+
int mptcp_pm_dump_addr(struct sk_buff *msg, struct netlink_callback *cb)
{
const struct genl_info *info = genl_info_dump(cb);
diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
index 7b15bb4f12c1..f04e354b0c64 100644
--- a/net/mptcp/pm_netlink.c
+++ b/net/mptcp/pm_netlink.c
@@ -1672,7 +1672,7 @@ int mptcp_nl_fill_addr(struct sk_buff *skb,
return -EMSGSIZE;
}
-int mptcp_pm_nl_get_addr_doit(struct sk_buff *skb, struct genl_info *info)
+int mptcp_pm_nl_get_addr(struct sk_buff *skb, struct genl_info *info)
{
struct nlattr *attr = info->attrs[MPTCP_PM_ENDPOINT_ADDR];
struct pm_nl_pernet *pernet = genl_info_pm_nl(info);
@@ -1722,6 +1722,11 @@ int mptcp_pm_nl_get_addr_doit(struct sk_buff *skb, struct genl_info *info)
return ret;
}
+int mptcp_pm_nl_get_addr_doit(struct sk_buff *skb, struct genl_info *info)
+{
+ return mptcp_pm_get_addr(skb, info);
+}
+
int mptcp_pm_nl_dump_addr(struct sk_buff *msg,
struct netlink_callback *cb)
{
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
index a4fa66c14f7f..d611968ae6a4 100644
--- a/net/mptcp/protocol.h
+++ b/net/mptcp/protocol.h
@@ -1076,6 +1076,8 @@ int mptcp_pm_nl_dump_addr(struct sk_buff *msg,
struct netlink_callback *cb);
int mptcp_userspace_pm_dump_addr(struct sk_buff *msg,
struct netlink_callback *cb);
+int mptcp_pm_get_addr(struct sk_buff *skb, struct genl_info *info);
+int mptcp_pm_nl_get_addr(struct sk_buff *skb, struct genl_info *info);
int mptcp_userspace_pm_get_addr(struct sk_buff *skb,
struct genl_info *info);
--
2.40.1
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH mptcp-next v14 13/14] selftests: mptcp: add token for get_addr
2024-02-20 9:58 [PATCH mptcp-next v14 00/14] dump for userspace pm Geliang Tang
` (11 preceding siblings ...)
2024-02-20 9:58 ` [PATCH mptcp-next v14 12/14] mptcp: get addr in userspace pm list Geliang Tang
@ 2024-02-20 9:58 ` Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 14/14] selftests: mptcp: userspace pm get addr tests Geliang Tang
` (2 subsequent siblings)
15 siblings, 0 replies; 37+ messages in thread
From: Geliang Tang @ 2024-02-20 9:58 UTC (permalink / raw)
To: mptcp; +Cc: Geliang Tang
From: Geliang Tang <tanggeliang@kylinos.cn>
The command get_addr() of pm_nl_ctl can be used like this in in-kernel PM:
pm_nl_ctl get $id
This patch adds token argument for it to support userspace PM:
pm_nl_ctl get $id token $token
If 'token $token' is passed to get_addr(), copy it into the kernel netlink.
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
---
tools/testing/selftests/net/mptcp/pm_nl_ctl.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/net/mptcp/pm_nl_ctl.c b/tools/testing/selftests/net/mptcp/pm_nl_ctl.c
index 8d7d1b4ed28e..7426a2cbd4a0 100644
--- a/tools/testing/selftests/net/mptcp/pm_nl_ctl.c
+++ b/tools/testing/selftests/net/mptcp/pm_nl_ctl.c
@@ -1087,6 +1087,7 @@ int get_addr(int fd, int pm_family, int argc, char *argv[])
1024];
struct rtattr *rta, *nest;
struct nlmsghdr *nh;
+ u_int32_t token = 0;
int nest_start;
u_int8_t id;
int off = 0;
@@ -1097,10 +1098,12 @@ int get_addr(int fd, int pm_family, int argc, char *argv[])
MPTCP_PM_VER);
/* the only argument is the address id */
- if (argc != 3)
+ if (argc != 3 && argc != 5)
syntax(argv);
id = atoi(argv[2]);
+ if (argc == 5 && !strcmp(argv[3], "token"))
+ token = strtoul(argv[4], NULL, 10);
nest_start = off;
nest = (void *)(data + off);
@@ -1116,6 +1119,15 @@ int get_addr(int fd, int pm_family, int argc, char *argv[])
off += NLMSG_ALIGN(rta->rta_len);
nest->rta_len = off - nest_start;
+ /* token */
+ if (token) {
+ rta = (void *)(data + off);
+ rta->rta_type = MPTCP_PM_ATTR_TOKEN;
+ rta->rta_len = RTA_LENGTH(4);
+ memcpy(RTA_DATA(rta), &token, 4);
+ off += NLMSG_ALIGN(rta->rta_len);
+ }
+
print_addrs(nh, pm_family, do_nl_req(fd, nh, off, sizeof(data)));
return 0;
}
--
2.40.1
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH mptcp-next v14 14/14] selftests: mptcp: userspace pm get addr tests
2024-02-20 9:58 [PATCH mptcp-next v14 00/14] dump for userspace pm Geliang Tang
` (12 preceding siblings ...)
2024-02-20 9:58 ` [PATCH mptcp-next v14 13/14] selftests: mptcp: add token for get_addr Geliang Tang
@ 2024-02-20 9:58 ` Geliang Tang
2024-02-20 10:51 ` selftests: mptcp: userspace pm get addr tests: Tests Results MPTCP CI
` (2 more replies)
2024-02-20 11:50 ` [PATCH mptcp-next v14 00/14] dump for userspace pm Matthieu Baerts
2024-02-21 11:46 ` Matthieu Baerts
15 siblings, 3 replies; 37+ messages in thread
From: Geliang Tang @ 2024-02-20 9:58 UTC (permalink / raw)
To: mptcp; +Cc: Geliang Tang
From: Geliang Tang <tanggeliang@kylinos.cn>
This patch adds a new helper userspace_pm_get_addr() in mptcp_join.sh.
In it, parse the token value from the output of 'pm_nl_ctl events', then
pass it to pm_nl_ctl get_addr command. Use this helper in userspace pm
dump tests.
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
---
.../testing/selftests/net/mptcp/mptcp_join.sh | 30 +++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
index 9bdf2b535e87..aedc5698f26a 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
@@ -3362,6 +3362,18 @@ userspace_pm_dump()
ip netns exec $1 ./pm_nl_ctl dump token $tk
}
+# $1: ns ; $2: id
+userspace_pm_get_addr()
+{
+ local evts=$evts_ns1
+ local tk
+
+ [ "$1" == "$ns2" ] && evts=$evts_ns2
+ tk=$(mptcp_lib_evts_get_info token "$evts")
+
+ ip netns exec $1 ./pm_nl_ctl get $2 token $tk
+}
+
userspace_pm_chk_dump_addr()
{
local ns="${1}"
@@ -3377,6 +3389,21 @@ userspace_pm_chk_dump_addr()
fi
}
+userspace_pm_chk_get_addr()
+{
+ local ns="${1}"
+ local id="${2}"
+ local exp="${3}"
+
+ print_check "get id ${id} addr"
+
+ if mptcp_lib_kallsyms_has "mptcp_userspace_pm_get_addr$"; then
+ check_output "userspace_pm_get_addr ${ns} ${id}" "${exp}"
+ else
+ print_skip
+ fi
+}
+
userspace_tests()
{
# userspace pm type prevents add_addr
@@ -3471,6 +3498,8 @@ userspace_tests()
userspace_pm_chk_dump_addr "${ns1}" \
$'id 10 flags signal 10.0.2.1\nid 20 flags signal 10.0.3.1' \
"signal"
+ userspace_pm_chk_get_addr "${ns1}" "10" "id 10 flags signal 10.0.2.1"
+ userspace_pm_chk_get_addr "${ns1}" "20" "id 20 flags signal 10.0.3.1"
userspace_pm_rm_addr $ns1 10
userspace_pm_rm_sf $ns1 "::ffff:10.0.2.1" $SUB_ESTABLISHED
userspace_pm_chk_dump_addr "${ns1}" \
@@ -3501,6 +3530,7 @@ userspace_tests()
userspace_pm_chk_dump_addr "${ns2}" \
"id 20 flags subflow 10.0.3.2" \
"subflow"
+ userspace_pm_chk_get_addr "${ns2}" "20" "id 20 flags subflow 10.0.3.2"
userspace_pm_rm_addr $ns2 20
userspace_pm_rm_sf $ns2 10.0.3.2 $SUB_ESTABLISHED
userspace_pm_chk_dump_addr "${ns2}" \
--
2.40.1
^ permalink raw reply related [flat|nested] 37+ messages in thread
* Re: selftests: mptcp: userspace pm get addr tests: Tests Results
2024-02-20 9:58 ` [PATCH mptcp-next v14 14/14] selftests: mptcp: userspace pm get addr tests Geliang Tang
@ 2024-02-20 10:51 ` MPTCP CI
2024-02-20 18:27 ` MPTCP CI
2024-02-20 18:46 ` MPTCP CI
2 siblings, 0 replies; 37+ messages in thread
From: MPTCP CI @ 2024-02-20 10:51 UTC (permalink / raw)
To: Geliang Tang; +Cc: mptcp
Hi Geliang,
Thank you for your modifications, that's great!
Our CI (GitHub Action) did some validations and here is its report:
- KVM Validation: normal:
- Success! ✅:
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/7971809022
Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/31704c65829c
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-normal
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 (NGI0 Core)
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH mptcp-next v14 00/14] dump for userspace pm
2024-02-20 9:58 [PATCH mptcp-next v14 00/14] dump for userspace pm Geliang Tang
` (13 preceding siblings ...)
2024-02-20 9:58 ` [PATCH mptcp-next v14 14/14] selftests: mptcp: userspace pm get addr tests Geliang Tang
@ 2024-02-20 11:50 ` Matthieu Baerts
2024-02-20 17:37 ` Matthieu Baerts
2024-02-21 1:06 ` Geliang Tang
2024-02-21 11:46 ` Matthieu Baerts
15 siblings, 2 replies; 37+ messages in thread
From: Matthieu Baerts @ 2024-02-20 11:50 UTC (permalink / raw)
To: Geliang Tang, mptcp; +Cc: Geliang Tang
[-- Attachment #1: Type: text/plain, Size: 905 bytes --]
Hi Geliang,
On 20/02/2024 10:58, Geliang Tang wrote:
> From: Geliang Tang <tanggeliang@kylinos.cn>
>
> v14:
> - address Matt's comments in v13.
Thank you for the new version!
I didn't look at it yet, but:
> - I have to use these lines in patch #8:
>
> local cmd_ret=0
> local out=$(${cmd} 2>${err}) || cmd_ret=${?}
>
> The following expected code breaks pm_netlink.sh, I don't know why:
>
> local out cmd_ret=0
> out=$(${cmd} 2>${err}) || cmd_ret=${?}
>
> If this is still a problem, I'll send a squash-to patch to fix it.
Yes, we should either fix warnings or explicitly mark the false positive
ones as ignored.
Can you try with the attached patch please? It is not clear to me why
the second block doesn't do the same as the first one.
I can squash it when applying the series if there are no other comments.
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
[-- Attachment #2: mptcp_lib_shellcheck.patch --]
[-- Type: text/x-patch, Size: 1065 bytes --]
diff --git a/tools/testing/selftests/net/mptcp/mptcp_lib.sh b/tools/testing/selftests/net/mptcp/mptcp_lib.sh
index aca35376006b..556a7d9784d7 100644
--- a/tools/testing/selftests/net/mptcp/mptcp_lib.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_lib.sh
@@ -352,20 +352,24 @@ mptcp_lib_check_tools() {
}
mptcp_lib_check_output() {
- local err="$1"
- local cmd="$2"
- local expected="$3"
+ local err="${1}"
+ local cmd="${2}"
+ local expected="${3}"
local cmd_ret=0
- local out=$(${cmd} 2>${err}) || cmd_ret=${?}
+ local out
- if [ $cmd_ret -ne 0 ]; then
- mptcp_lib_print_err "[FAIL] command execution '$cmd' stderr"
+ if ! out=$(${cmd} 2>"${err}"); then
+ cmd_ret=${?}
+ fi
+
+ if [ ${cmd_ret} -ne 0 ]; then
+ mptcp_lib_print_err "[FAIL] command execution '${cmd}' stderr"
cat "${err}"
return 2
- elif [ "$out" = "$expected" ]; then
+ elif [ "${out}" = "${expected}" ]; then
return 0
else
- mptcp_lib_print_err "[FAIL] expected '$expected' got '$out'"
+ mptcp_lib_print_err "[FAIL] expected '${expected}' got '${out}'"
return 1
fi
}
^ permalink raw reply related [flat|nested] 37+ messages in thread
* Re: [PATCH mptcp-next v14 00/14] dump for userspace pm
2024-02-20 11:50 ` [PATCH mptcp-next v14 00/14] dump for userspace pm Matthieu Baerts
@ 2024-02-20 17:37 ` Matthieu Baerts
2024-02-20 17:48 ` Mat Martineau
2024-02-21 1:06 ` Geliang Tang
1 sibling, 1 reply; 37+ messages in thread
From: Matthieu Baerts @ 2024-02-20 17:37 UTC (permalink / raw)
To: Geliang Tang, Mat Martineau; +Cc: Geliang Tang, mptcp
Hi Geliang, Mat,
On 20/02/2024 12:50 pm, Matthieu Baerts wrote:
> Hi Geliang,
>
> On 20/02/2024 10:58, Geliang Tang wrote:
>> From: Geliang Tang <tanggeliang@kylinos.cn>
>>
>> v14:
>> - address Matt's comments in v13.
>
> Thank you for the new version!
>
> I didn't look at it yet, but:
>
>> - I have to use these lines in patch #8:
>>
>> local cmd_ret=0
>> local out=$(${cmd} 2>${err}) || cmd_ret=${?}
>>
>> The following expected code breaks pm_netlink.sh, I don't know why:
>>
>> local out cmd_ret=0
>> out=$(${cmd} 2>${err}) || cmd_ret=${?}
>>
>> If this is still a problem, I'll send a squash-to patch to fix it.
>
> Yes, we should either fix warnings or explicitly mark the false positive
> ones as ignored.
>
> Can you try with the attached patch please? It is not clear to me why
> the second block doesn't do the same as the first one.
>
> I can squash it when applying the series if there are no other comments.
There are no other comments from me, thanks for the v14.
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
@Geliang: OK for you if I squash the suggested patch?
@Mat: still OK for you with this v14? There are only modifications in
the selftests (patches 8, 9 and 14) except a small change in patch 5.
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH mptcp-next v14 00/14] dump for userspace pm
2024-02-20 17:37 ` Matthieu Baerts
@ 2024-02-20 17:48 ` Mat Martineau
0 siblings, 0 replies; 37+ messages in thread
From: Mat Martineau @ 2024-02-20 17:48 UTC (permalink / raw)
To: Matthieu Baerts; +Cc: Geliang Tang, Geliang Tang, mptcp
On Tue, 20 Feb 2024, Matthieu Baerts wrote:
> Hi Geliang, Mat,
>
> On 20/02/2024 12:50 pm, Matthieu Baerts wrote:
>> Hi Geliang,
>>
>> On 20/02/2024 10:58, Geliang Tang wrote:
>>> From: Geliang Tang <tanggeliang@kylinos.cn>
>>>
>>> v14:
>>> - address Matt's comments in v13.
>>
>> Thank you for the new version!
>>
>> I didn't look at it yet, but:
>>
>>> - I have to use these lines in patch #8:
>>>
>>> local cmd_ret=0
>>> local out=$(${cmd} 2>${err}) || cmd_ret=${?}
>>>
>>> The following expected code breaks pm_netlink.sh, I don't know why:
>>>
>>> local out cmd_ret=0
>>> out=$(${cmd} 2>${err}) || cmd_ret=${?}
>>>
>>> If this is still a problem, I'll send a squash-to patch to fix it.
>>
>> Yes, we should either fix warnings or explicitly mark the false positive
>> ones as ignored.
>>
>> Can you try with the attached patch please? It is not clear to me why
>> the second block doesn't do the same as the first one.
>>
>> I can squash it when applying the series if there are no other comments.
>
> There are no other comments from me, thanks for the v14.
>
> Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
>
> @Geliang: OK for you if I squash the suggested patch?
>
> @Mat: still OK for you with this v14? There are only modifications in
> the selftests (patches 8, 9 and 14) except a small change in patch 5.
>
Yes, v14 looks good, my tag still applies:
Reviewed-by: Mat Martineau <martineau@kernel.org>
Thanks for your review Matthieu!
- Mat
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: selftests: mptcp: userspace pm get addr tests: Tests Results
2024-02-20 9:58 ` [PATCH mptcp-next v14 14/14] selftests: mptcp: userspace pm get addr tests Geliang Tang
2024-02-20 10:51 ` selftests: mptcp: userspace pm get addr tests: Tests Results MPTCP CI
@ 2024-02-20 18:27 ` MPTCP CI
2024-02-20 18:46 ` MPTCP CI
2 siblings, 0 replies; 37+ messages in thread
From: MPTCP CI @ 2024-02-20 18:27 UTC (permalink / raw)
To: Geliang Tang; +Cc: mptcp
Hi Geliang,
Thank you for your modifications, that's great!
Our CI (GitHub Action) did some validations and here is its report:
- KVM Validation: normal:
- Success! ✅:
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/7977793179
Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/0bb7f79304bf
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-normal
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 (NGI0 Core)
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: selftests: mptcp: userspace pm get addr tests: Tests Results
2024-02-20 9:58 ` [PATCH mptcp-next v14 14/14] selftests: mptcp: userspace pm get addr tests Geliang Tang
2024-02-20 10:51 ` selftests: mptcp: userspace pm get addr tests: Tests Results MPTCP CI
2024-02-20 18:27 ` MPTCP CI
@ 2024-02-20 18:46 ` MPTCP CI
2 siblings, 0 replies; 37+ messages in thread
From: MPTCP CI @ 2024-02-20 18:46 UTC (permalink / raw)
To: Geliang Tang; +Cc: mptcp
Hi Geliang,
Thank you for your modifications, that's great!
Our CI (GitHub Action) did some validations and here is its report:
- KVM Validation: normal:
- Success! ✅:
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/7977999805
Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/2ca83db7b919
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-normal
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 (NGI0 Core)
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH mptcp-next v14 00/14] dump for userspace pm
2024-02-20 11:50 ` [PATCH mptcp-next v14 00/14] dump for userspace pm Matthieu Baerts
2024-02-20 17:37 ` Matthieu Baerts
@ 2024-02-21 1:06 ` Geliang Tang
1 sibling, 0 replies; 37+ messages in thread
From: Geliang Tang @ 2024-02-21 1:06 UTC (permalink / raw)
To: Matthieu Baerts; +Cc: mptcp
On Tue, Feb 20, 2024 at 12:50:49PM +0100, Matthieu Baerts wrote:
> Hi Geliang,
>
> On 20/02/2024 10:58, Geliang Tang wrote:
> > From: Geliang Tang <tanggeliang@kylinos.cn>
> >
> > v14:
> > - address Matt's comments in v13.
>
> Thank you for the new version!
>
> I didn't look at it yet, but:
>
> > - I have to use these lines in patch #8:
> >
> > local cmd_ret=0
> > local out=$(${cmd} 2>${err}) || cmd_ret=${?}
> >
> > The following expected code breaks pm_netlink.sh, I don't know why:
> >
> > local out cmd_ret=0
> > out=$(${cmd} 2>${err}) || cmd_ret=${?}
> >
> > If this is still a problem, I'll send a squash-to patch to fix it.
>
> Yes, we should either fix warnings or explicitly mark the false positive
> ones as ignored.
>
> Can you try with the attached patch please? It is not clear to me why
> the second block doesn't do the same as the first one.
Thanks Matt, the attached patch works well. It fixes the issue I
mentioned perfectly.
>
> I can squash it when applying the series if there are no other comments.
Great, thanks.
-Geliang
>
> Cheers,
> Matt
> --
> Sponsored by the NGI0 Core fund.
> diff --git a/tools/testing/selftests/net/mptcp/mptcp_lib.sh b/tools/testing/selftests/net/mptcp/mptcp_lib.sh
> index aca35376006b..556a7d9784d7 100644
> --- a/tools/testing/selftests/net/mptcp/mptcp_lib.sh
> +++ b/tools/testing/selftests/net/mptcp/mptcp_lib.sh
> @@ -352,20 +352,24 @@ mptcp_lib_check_tools() {
> }
>
> mptcp_lib_check_output() {
> - local err="$1"
> - local cmd="$2"
> - local expected="$3"
> + local err="${1}"
> + local cmd="${2}"
> + local expected="${3}"
> local cmd_ret=0
> - local out=$(${cmd} 2>${err}) || cmd_ret=${?}
> + local out
>
> - if [ $cmd_ret -ne 0 ]; then
> - mptcp_lib_print_err "[FAIL] command execution '$cmd' stderr"
> + if ! out=$(${cmd} 2>"${err}"); then
> + cmd_ret=${?}
> + fi
> +
> + if [ ${cmd_ret} -ne 0 ]; then
> + mptcp_lib_print_err "[FAIL] command execution '${cmd}' stderr"
> cat "${err}"
> return 2
> - elif [ "$out" = "$expected" ]; then
> + elif [ "${out}" = "${expected}" ]; then
> return 0
> else
> - mptcp_lib_print_err "[FAIL] expected '$expected' got '$out'"
> + mptcp_lib_print_err "[FAIL] expected '${expected}' got '${out}'"
> return 1
> fi
> }
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH mptcp-next v14 00/14] dump for userspace pm
2024-02-20 9:58 [PATCH mptcp-next v14 00/14] dump for userspace pm Geliang Tang
` (14 preceding siblings ...)
2024-02-20 11:50 ` [PATCH mptcp-next v14 00/14] dump for userspace pm Matthieu Baerts
@ 2024-02-21 11:46 ` Matthieu Baerts
15 siblings, 0 replies; 37+ messages in thread
From: Matthieu Baerts @ 2024-02-21 11:46 UTC (permalink / raw)
To: Geliang Tang, mptcp; +Cc: Geliang Tang
Hi Geliang, Mat,
On 20/02/2024 10:58 am, Geliang Tang wrote:
> From: Geliang Tang <tanggeliang@kylinos.cn>
>
> v14:
> - address Matt's comments in v13.
> - I have to use these lines in patch #8:
>
> local cmd_ret=0
> local out=$(${cmd} 2>${err}) || cmd_ret=${?}
>
> The following expected code breaks pm_netlink.sh, I don't know why:
>
> local out cmd_ret=0
> out=$(${cmd} 2>${err}) || cmd_ret=${?}
>
> If this is still a problem, I'll send a squash-to patch to fix it.
>
> Geliang Tang (14):
> mptcp: export mptcp_genl_family & mptcp_nl_fill_addr
> mptcp: implement mptcp_userspace_pm_dump_addr
> mptcp: add token for get-addr in yaml
> mptcp: dump addrs in userspace pm list
> mptcp: check userspace pm flags
> selftests: mptcp: add userspace pm subflow flag
> selftests: mptcp: add token for dump_addr
> selftests: mptcp: add mptcp_lib_check_output helper
> selftests: mptcp: dump userspace addrs list
> mptcp: add userspace_pm_lookup_addr_by_id helper
> mptcp: implement mptcp_userspace_pm_get_addr
> mptcp: get addr in userspace pm list
> selftests: mptcp: add token for get_addr
> selftests: mptcp: userspace pm get addr tests
Thank you for the new version and the reviews!
Now in our tree (feat. for next):
New patches for t/upstream:
- 7d868c62af9f: mptcp: export mptcp_genl_family & mptcp_nl_fill_addr
- 67cb691f1093: mptcp: implement mptcp_userspace_pm_dump_addr
- 60ef9f34e3d3: mptcp: add token for get-addr in yaml
- ffb2fe640112: mptcp: dump addrs in userspace pm list
- 76eac7d3c80c: mptcp: check userspace pm flags
- 409cea20942c: selftests: mptcp: add userspace pm subflow flag
- 6353432774ce: selftests: mptcp: add token for dump_addr
- d09f50cf57ae: selftests: mptcp: add mptcp_lib_check_output helper
- c6ad331dc5ab: selftests: mptcp: dump userspace addrs list
- 47038dcd3675: mptcp: add userspace_pm_lookup_addr_by_id helper
- 2a5b3503d500: mptcp: implement mptcp_userspace_pm_get_addr
- bbfcefc51c19: mptcp: get addr in userspace pm list
- 1cda2a037f12: selftests: mptcp: add token for get_addr
- d0c5cd880322: selftests: mptcp: userspace pm get addr tests
- Results: 23f1f4962d2e..bf8465c7dc96 (export)
- ae4144118862: "squashed" in "selftests: mptcp: add
mptcp_lib_check_output helper"
- Results: bf8465c7dc96..55a829ff16aa (export)
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
^ permalink raw reply [flat|nested] 37+ messages in thread
end of thread, other threads:[~2024-02-21 11:46 UTC | newest]
Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-20 9:58 [PATCH mptcp-next v14 00/14] dump for userspace pm Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 01/14] mptcp: export mptcp_genl_family & mptcp_nl_fill_addr Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 02/14] mptcp: implement mptcp_userspace_pm_dump_addr Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 03/14] mptcp: add token for get-addr in yaml Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 04/14] mptcp: dump addrs in userspace pm list Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 05/14] mptcp: check userspace pm flags Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 06/14] selftests: mptcp: add userspace pm subflow flag Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 07/14] selftests: mptcp: add token for dump_addr Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 08/14] selftests: mptcp: add mptcp_lib_check_output helper Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 09/14] selftests: mptcp: dump userspace addrs list Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 10/14] mptcp: add userspace_pm_lookup_addr_by_id helper Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 11/14] mptcp: implement mptcp_userspace_pm_get_addr Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 12/14] mptcp: get addr in userspace pm list Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 13/14] selftests: mptcp: add token for get_addr Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 14/14] selftests: mptcp: userspace pm get addr tests Geliang Tang
2024-02-20 10:51 ` selftests: mptcp: userspace pm get addr tests: Tests Results MPTCP CI
2024-02-20 18:27 ` MPTCP CI
2024-02-20 18:46 ` MPTCP CI
2024-02-20 11:50 ` [PATCH mptcp-next v14 00/14] dump for userspace pm Matthieu Baerts
2024-02-20 17:37 ` Matthieu Baerts
2024-02-20 17:48 ` Mat Martineau
2024-02-21 1:06 ` Geliang Tang
2024-02-21 11:46 ` Matthieu Baerts
-- strict thread matches above, loose matches on Subject: below --
2024-02-16 7:42 [PATCH mptcp-next v13 14/14] selftests: mptcp: userspace pm get addr tests Geliang Tang
2024-02-16 8:34 ` selftests: mptcp: userspace pm get addr tests: Tests Results MPTCP CI
2024-02-16 9:55 ` MPTCP CI
2024-02-16 10:14 ` MPTCP CI
2024-02-16 10:24 ` Matthieu Baerts
2024-02-16 11:08 ` MPTCP CI
2024-02-16 11:31 ` MPTCP CI
2024-02-16 20:33 ` MPTCP CI
2024-02-14 11:40 [PATCH mptcp-next v12 15/15] selftests: mptcp: userspace pm get addr tests Geliang Tang
2024-02-14 12:37 ` selftests: mptcp: userspace pm get addr tests: Tests Results MPTCP CI
2024-02-14 12:48 ` MPTCP CI
2023-12-19 8:19 [PATCH mptcp-next v3 14/14] selftests: mptcp: userspace pm get addr tests Geliang Tang
2023-12-19 8:36 ` selftests: mptcp: userspace pm get addr tests: Tests Results MPTCP CI
2023-12-19 10:55 ` MPTCP CI
2023-12-19 12:19 ` Matthieu Baerts
2023-12-18 9:23 [PATCH mptcp-next v2 15/15] selftests: mptcp: userspace pm get addr tests Geliang Tang
2023-12-18 10:58 ` selftests: mptcp: userspace pm get addr tests: Tests Results MPTCP CI
2023-12-11 8:15 [PATCH mptcp-next 12/12] selftests: mptcp: userspace pm get addr tests Geliang Tang
2023-12-11 11:24 ` selftests: mptcp: userspace pm get addr tests: Tests Results MPTCP CI
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox