* [PATCH mptcp-next 0/2] two small cleanups
@ 2022-12-09 8:57 Geliang Tang
2022-12-09 8:57 ` [PATCH mptcp-next 1/2] mptcp: use net instead of sock_net Geliang Tang
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Geliang Tang @ 2022-12-09 8:57 UTC (permalink / raw)
To: mptcp; +Cc: Geliang Tang
Two small cleanups.
Geliang Tang (2):
mptcp: use net instead of sock_net
mptcp: use local variable ssk in write_options
net/mptcp/options.c | 3 +--
net/mptcp/pm_netlink.c | 5 ++---
net/mptcp/protocol.c | 4 ++--
3 files changed, 5 insertions(+), 7 deletions(-)
--
2.35.3
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH mptcp-next 1/2] mptcp: use net instead of sock_net
2022-12-09 8:57 [PATCH mptcp-next 0/2] two small cleanups Geliang Tang
@ 2022-12-09 8:57 ` Geliang Tang
2022-12-09 8:57 ` [PATCH mptcp-next 2/2] mptcp: use local variable ssk in write_options Geliang Tang
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Geliang Tang @ 2022-12-09 8:57 UTC (permalink / raw)
To: mptcp; +Cc: Geliang Tang
Use the local variable 'net' instead of sock_net() in the functions where
the variable 'struct net *net' has been defined.
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
net/mptcp/pm_netlink.c | 5 ++---
net/mptcp/protocol.c | 4 ++--
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
index d20f1d969900..f2a43e13bacd 100644
--- a/net/mptcp/pm_netlink.c
+++ b/net/mptcp/pm_netlink.c
@@ -1140,7 +1140,7 @@ void mptcp_pm_nl_subflow_chk_stale(const struct mptcp_sock *msk, struct sock *ss
if (!tcp_rtx_and_write_queues_empty(ssk)) {
subflow->stale = 1;
__mptcp_retransmit_pending_data(sk);
- MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_SUBFLOWSTALE);
+ MPTCP_INC_STATS(net, MPTCP_MIB_SUBFLOWSTALE);
}
unlock_sock_fast(ssk, slow);
@@ -1900,8 +1900,7 @@ static int mptcp_nl_cmd_set_flags(struct sk_buff *skb, struct genl_info *info)
}
if (token)
- return mptcp_userspace_pm_set_flags(sock_net(skb->sk),
- token, &addr, &remote, bkup);
+ return mptcp_userspace_pm_set_flags(net, token, &addr, &remote, bkup);
spin_lock_bh(&pernet->lock);
entry = __lookup_addr(pernet, &addr.addr, lookup_by_id);
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 6d03bdcda33e..88c019c56369 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -2739,8 +2739,8 @@ static int mptcp_init_sock(struct sock *sk)
mptcp_ca_reset(sk);
sk_sockets_allocated_inc(sk);
- sk->sk_rcvbuf = READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_rmem[1]);
- sk->sk_sndbuf = READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_wmem[1]);
+ sk->sk_rcvbuf = READ_ONCE(net->ipv4.sysctl_tcp_rmem[1]);
+ sk->sk_sndbuf = READ_ONCE(net->ipv4.sysctl_tcp_wmem[1]);
return 0;
}
--
2.35.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH mptcp-next 2/2] mptcp: use local variable ssk in write_options
2022-12-09 8:57 [PATCH mptcp-next 0/2] two small cleanups Geliang Tang
2022-12-09 8:57 ` [PATCH mptcp-next 1/2] mptcp: use net instead of sock_net Geliang Tang
@ 2022-12-09 8:57 ` Geliang Tang
2022-12-09 10:35 ` mptcp: use local variable ssk in write_options: Tests Results MPTCP CI
2022-12-13 23:31 ` MPTCP CI
2022-12-13 23:06 ` [PATCH mptcp-next 0/2] two small cleanups Mat Martineau
2022-12-14 17:38 ` Matthieu Baerts
3 siblings, 2 replies; 7+ messages in thread
From: Geliang Tang @ 2022-12-09 8:57 UTC (permalink / raw)
To: mptcp; +Cc: Geliang Tang
The local variable 'ssk' has been defined at the beginning of the function
mptcp_write_options(), use it instead of getting 'ssk' again.
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
net/mptcp/options.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index 5ded85e2c374..b30cea2fbf3f 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -1594,8 +1594,7 @@ void mptcp_write_options(struct tcphdr *th, __be32 *ptr, struct tcp_sock *tp,
TCPOLEN_MPTCP_PRIO,
opts->backup, TCPOPT_NOP);
- MPTCP_INC_STATS(sock_net((const struct sock *)tp),
- MPTCP_MIB_MPPRIOTX);
+ MPTCP_INC_STATS(sock_net(ssk), MPTCP_MIB_MPPRIOTX);
}
mp_capable_done:
--
2.35.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: mptcp: use local variable ssk in write_options: Tests Results
2022-12-09 8:57 ` [PATCH mptcp-next 2/2] mptcp: use local variable ssk in write_options Geliang Tang
@ 2022-12-09 10:35 ` MPTCP CI
2022-12-13 23:31 ` MPTCP CI
1 sibling, 0 replies; 7+ messages in thread
From: MPTCP CI @ 2022-12-09 10:35 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/5379541095415808
- Summary: https://api.cirrus-ci.com/v1/artifact/task/5379541095415808/summary/summary.txt
- KVM Validation: normal (only selftest_mptcp_join):
- Success! ✅:
- Task: https://cirrus-ci.com/task/6505441002258432
- Summary: https://api.cirrus-ci.com/v1/artifact/task/6505441002258432/summary/summary.txt
- KVM Validation: debug (except selftest_mptcp_join):
- Success! ✅:
- Task: https://cirrus-ci.com/task/4675853653639168
- Summary: https://api.cirrus-ci.com/v1/artifact/task/4675853653639168/summary/summary.txt
- KVM Validation: debug (only selftest_mptcp_join):
- Unstable: 1 failed test(s): selftest_mptcp_join 🔴:
- Task: https://cirrus-ci.com/task/5801753560481792
- Summary: https://api.cirrus-ci.com/v1/artifact/task/5801753560481792/summary/summary.txt
Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/f35030a60281
If there are some issues, you can reproduce them using the same environment as
the one used by the CI thanks to a docker image, e.g.:
$ cd [kernel source code]
$ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
--pull always mptcp/mptcp-upstream-virtme-docker:latest \
auto-debug
For more details:
https://github.com/multipath-tcp/mptcp-upstream-virtme-docker
Please note that despite all the efforts that have been already done to have a
stable tests suite when executed on a public CI like here, it is possible some
reported issues are not due to your modifications. Still, do not hesitate to
help us improve that ;-)
Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (Tessares)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH mptcp-next 0/2] two small cleanups
2022-12-09 8:57 [PATCH mptcp-next 0/2] two small cleanups Geliang Tang
2022-12-09 8:57 ` [PATCH mptcp-next 1/2] mptcp: use net instead of sock_net Geliang Tang
2022-12-09 8:57 ` [PATCH mptcp-next 2/2] mptcp: use local variable ssk in write_options Geliang Tang
@ 2022-12-13 23:06 ` Mat Martineau
2022-12-14 17:38 ` Matthieu Baerts
3 siblings, 0 replies; 7+ messages in thread
From: Mat Martineau @ 2022-12-13 23:06 UTC (permalink / raw)
To: Geliang Tang; +Cc: mptcp
On Fri, 9 Dec 2022, Geliang Tang wrote:
> Two small cleanups.
>
> Geliang Tang (2):
> mptcp: use net instead of sock_net
> mptcp: use local variable ssk in write_options
>
> net/mptcp/options.c | 3 +--
> net/mptcp/pm_netlink.c | 5 ++---
> net/mptcp/protocol.c | 4 ++--
> 3 files changed, 5 insertions(+), 7 deletions(-)
>
Hi Geliang -
Appreciate the cleanup, changes are good to merge:
Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
--
Mat Martineau
Intel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: mptcp: use local variable ssk in write_options: Tests Results
2022-12-09 8:57 ` [PATCH mptcp-next 2/2] mptcp: use local variable ssk in write_options Geliang Tang
2022-12-09 10:35 ` mptcp: use local variable ssk in write_options: Tests Results MPTCP CI
@ 2022-12-13 23:31 ` MPTCP CI
1 sibling, 0 replies; 7+ messages in thread
From: MPTCP CI @ 2022-12-13 23:31 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: Script error! ❓:
- :
- Task: https://cirrus-ci.com/task/5564318373117952
- Summary: https://api.cirrus-ci.com/v1/artifact/task/5564318373117952/summary/summary.txt
- KVM Validation: Script error! ❓:
- :
- Task: https://cirrus-ci.com/task/5669871489384448
- Summary: https://api.cirrus-ci.com/v1/artifact/task/5669871489384448/summary/summary.txt
- KVM Validation: Script error! ❓:
- :
- Task: https://cirrus-ci.com/task/4543971582541824
- Summary: https://api.cirrus-ci.com/v1/artifact/task/4543971582541824/summary/summary.txt
- KVM Validation: Script error! ❓:
- :
- Task: https://cirrus-ci.com/task/6690218279960576
- Summary: https://api.cirrus-ci.com/v1/artifact/task/6690218279960576/summary/summary.txt
Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/ab729ffde0c0
If there are some issues, you can reproduce them using the same environment as
the one used by the CI thanks to a docker image, e.g.:
$ cd [kernel source code]
$ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
--pull always mptcp/mptcp-upstream-virtme-docker:latest \
auto-debug
For more details:
https://github.com/multipath-tcp/mptcp-upstream-virtme-docker
Please note that despite all the efforts that have been already done to have a
stable tests suite when executed on a public CI like here, it is possible some
reported issues are not due to your modifications. Still, do not hesitate to
help us improve that ;-)
Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (Tessares)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH mptcp-next 0/2] two small cleanups
2022-12-09 8:57 [PATCH mptcp-next 0/2] two small cleanups Geliang Tang
` (2 preceding siblings ...)
2022-12-13 23:06 ` [PATCH mptcp-next 0/2] two small cleanups Mat Martineau
@ 2022-12-14 17:38 ` Matthieu Baerts
3 siblings, 0 replies; 7+ messages in thread
From: Matthieu Baerts @ 2022-12-14 17:38 UTC (permalink / raw)
To: Geliang Tang, mptcp
Hi Geliang, Mat,
On 09/12/2022 09:57, Geliang Tang wrote:
> Two small cleanups.
>
> Geliang Tang (2):
> mptcp: use net instead of sock_net
> mptcp: use local variable ssk in write_options
Thank you for the patches and the reviews!
Now in our tree (feat. for net-next) with Mat's RvB tag:
New patches for t/upstream:
- 3f76289942fd: mptcp: use net instead of sock_net
- cd700ab87ddb: mptcp: use local variable ssk in write_options
- Results: 3f302724c1a3..652f1687a656 (export)
Tests are now in progress:
https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export/20221214T173738
Cheers,
Matt
--
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-12-14 17:38 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-09 8:57 [PATCH mptcp-next 0/2] two small cleanups Geliang Tang
2022-12-09 8:57 ` [PATCH mptcp-next 1/2] mptcp: use net instead of sock_net Geliang Tang
2022-12-09 8:57 ` [PATCH mptcp-next 2/2] mptcp: use local variable ssk in write_options Geliang Tang
2022-12-09 10:35 ` mptcp: use local variable ssk in write_options: Tests Results MPTCP CI
2022-12-13 23:31 ` MPTCP CI
2022-12-13 23:06 ` [PATCH mptcp-next 0/2] two small cleanups Mat Martineau
2022-12-14 17:38 ` Matthieu Baerts
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.