mptcp: use msk_owned_by_me helper
Subsystems (2)
PATCH 1/1 mptcp: use msk_owned_by_me helper
The helper msk_owned_by_me() is defined in protocol.h, so use it instead of sock_owned_by_me().
--- net/mptcp/protocol.c | 9 ++++----- net/mptcp/sockopt.c | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-)
net/mptcp/protocol.c +4 -5
@@ -923,9 +923,8 @@ static void mptcp_check_for_eof(struct mptcp_sock *msk)static struct sock *mptcp_subflow_recv_lookup (const struct mptcp_sock *msk) {struct mptcp_subflow_context *subflow; -struct sock *sk = (struct sock *)msk; -sock_owned_by_me (sk); +msk_owned_by_me (msk);mptcp_for_each_subflow (msk, subflow) {if (READ_ONCE (subflow->data_avail))
@@ -1408,7 +1407,7 @@ static struct sock *mptcp_subflow_get_send(struct mptcp_sock *msk)u64 linger_time;long tout =0 ; -sock_owned_by_me (sk); +msk_owned_by_me (msk);if (__mptcp_check_fallback (msk)) {if (!msk->first)
@@ -1896,7 +1895,7 @@ static void mptcp_rcv_space_adjust(struct mptcp_sock *msk, int copied)u32 time, advmss =1 ;u64 rtt_us, mstamp; -sock_owned_by_me (sk); +msk_owned_by_me (msk);if (copied <=0 )return ;
@@ -2223,7 +2222,7 @@ static struct sock *mptcp_subflow_get_retrans(struct mptcp_sock *msk)struct mptcp_subflow_context *subflow;int min_stale_count =INT_MAX ; -sock_owned_by_me ((const struct sock *)msk); +msk_owned_by_me (msk);if (__mptcp_check_fallback (msk))return NULL ;
net/mptcp/sockopt.c +1 -1
@@ -18,7 +18,7 @@static struct sock *__mptcp_tcp_fallback (struct mptcp_sock *msk) { -sock_owned_by_me ((const struct sock *)msk); +msk_owned_by_me (msk);if (likely (!__mptcp_check_fallback (msk)))return NULL ;
Signature · 1 line
2.35.3
Re: mptcp: use msk_owned_by_me helper: Tests Results
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/5565945023299584
- Summary: https://api.cirrus-ci.com/v1/artifact/task/5565945023299584/summary/summary.txt
- KVM Validation: normal (only selftest_mptcp_join):
- Unstable: 1 failed test(s): selftest_mptcp_join 🔴:
- Task: https://cirrus-ci.com/task/6691844930142208
- Summary: https://api.cirrus-ci.com/v1/artifact/task/6691844930142208/summary/summary.txt
- KVM Validation: debug (only selftest_mptcp_join):
- Success! ✅:
- Task: https://cirrus-ci.com/task/5671498139566080
- Summary: https://api.cirrus-ci.com/v1/artifact/task/5671498139566080/summary/summary.txt
- KVM Validation: debug (except selftest_mptcp_join):
- Success! ✅:
- Task: https://cirrus-ci.com/task/4545598232723456
- Summary: https://api.cirrus-ci.com/v1/artifact/task/4545598232723456/summary/summary.txt
Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/6584c376da35
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-debugFor 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)
Quoted 4 lines · Geliang Tang
The helper
msk_owned_by_me()is defined inprotocol.h, so use it instead ofsock_owned_by_me().Signed-off-by Geliang Tang <[email protected]>
Thanks Geliang, looks good:
Quoted 65 lines
---
net/mptcp/protocol.c| 9 ++++-----net/mptcp/sockopt.c| 2 +-2 files changed, 5 insertions(+), 6 deletions(-)net/mptcp/protocol.c +4
-5@@ -923,9 +923,8 @@ static void mptcp_check_for_eof(struct mptcp_sock *msk)static struct sock *mptcp_subflow_recv_lookup (const struct mptcp_sock *msk) {struct mptcp_subflow_context *subflow; -struct sock *sk = (struct sock *)msk; -sock_owned_by_me (sk); +msk_owned_by_me (msk);mptcp_for_each_subflow (msk, subflow) {if (READ_ONCE (subflow->data_avail))@@ -1408,7 +1407,7 @@ static struct sock *mptcp_subflow_get_send(struct mptcp_sock *msk)u64 linger_time;long tout =0 ; -sock_owned_by_me (sk); +msk_owned_by_me (msk);if (__mptcp_check_fallback (msk)) {if (!msk->first)@@ -1896,7 +1895,7 @@ static void mptcp_rcv_space_adjust(struct mptcp_sock *msk, int copied)u32 time, advmss =1 ;u64 rtt_us, mstamp; -sock_owned_by_me (sk); +msk_owned_by_me (msk);if (copied <=0 )return ;@@ -2223,7 +2222,7 @@ static struct sock *mptcp_subflow_get_retrans(struct mptcp_sock *msk)struct mptcp_subflow_context *subflow;int min_stale_count =INT_MAX ; -sock_owned_by_me ((const struct sock *)msk); +msk_owned_by_me (msk);if (__mptcp_check_fallback (msk))return NULL ;net/mptcp/sockopt.c +1
-1@@ -18,7 +18,7 @@static struct sock *__mptcp_tcp_fallback (struct mptcp_sock *msk) { -sock_owned_by_me ((const struct sock *)msk); +msk_owned_by_me (msk);if (likely (!__mptcp_check_fallback (msk)))return NULL ;Signature · 1 line
2.35.3
--
Mat Martineau
Intel
Re: mptcp: use msk_owned_by_me helper: Tests Results
In reply to Geliang TangHi Geliang,
Thank you for your modifications, that's great!
Our CI did some validations and here is its report:
- KVM Validation: Script error! ❓:
- :
- Task: https://cirrus-ci.com/task/5326783529091072
- Summary: https://api.cirrus-ci.com/v1/artifact/task/5326783529091072/summary/summary.txt
- KVM Validation: Script error! ❓:
- :
- Task: https://cirrus-ci.com/task/6452683435933696
- Summary: https://api.cirrus-ci.com/v1/artifact/task/6452683435933696/summary/summary.txt
- KVM Validation: Script error! ❓:
- :
- Task: https://cirrus-ci.com/task/5045308552380416
- Summary: https://api.cirrus-ci.com/v1/artifact/task/5045308552380416/summary/summary.txt
- KVM Validation: Script error! ❓:
- :
- Task: https://cirrus-ci.com/task/6171208459223040
- Summary: https://api.cirrus-ci.com/v1/artifact/task/6171208459223040/summary/summary.txt
Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/37ca12499f3b
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-debugFor 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)
Hi Geliang, Mat,
Quoted 2 lines · Geliang Tang
The helper
msk_owned_by_me()is defined inprotocol.h, so use it instead ofsock_owned_by_me().
Thank you for the patch and the review!
Now in our tree (feat. for net-next) with Mat's RvB tag:
New patches for t/upstream:
- 27e993d2b4f0: mptcp: use msk_owned_by_me helper
- Results: 8ef79d8e4dfb..3f302724c1a3 (export)
Tests are now in progress:
https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export/20221214T173523
Cheers,
Matt
Signature · 2 lines
Tessares | Belgium | Hybrid Access Solutions www.tessares.net