* [PATCH mptcp-next] mptcp: add mptcp_for_each_subflow_safe helper
@ 2022-07-12 16:02 Matthieu Baerts
2022-07-12 17:25 ` Mat Martineau
2022-07-12 17:44 ` mptcp: add mptcp_for_each_subflow_safe helper: Tests Results MPTCP CI
0 siblings, 2 replies; 4+ messages in thread
From: Matthieu Baerts @ 2022-07-12 16:02 UTC (permalink / raw)
To: mptcp; +Cc: Matthieu Baerts
Similar to mptcp_for_each_subflow(): this is clearer now that the _safe
version is used in multiple places.
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
---
net/mptcp/pm_netlink.c | 2 +-
net/mptcp/protocol.c | 6 +++---
net/mptcp/protocol.h | 2 ++
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
index 291b5da42fdb..62471aaedb6d 100644
--- a/net/mptcp/pm_netlink.c
+++ b/net/mptcp/pm_netlink.c
@@ -796,7 +796,7 @@ static void mptcp_pm_nl_rm_addr_or_subflow(struct mptcp_sock *msk,
u8 rm_id = rm_list->ids[i];
bool removed = false;
- list_for_each_entry_safe(subflow, tmp, &msk->conn_list, node) {
+ mptcp_for_each_subflow_safe(msk, subflow, tmp) {
struct sock *ssk = mptcp_subflow_tcp_sock(subflow);
int how = RCV_SHUTDOWN | SEND_SHUTDOWN;
u8 id = subflow->local_id;
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index c92f91cb2c8d..48fdef304309 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -2338,7 +2338,7 @@ static void __mptcp_close_subflow(struct mptcp_sock *msk)
might_sleep();
- list_for_each_entry_safe(subflow, tmp, &msk->conn_list, node) {
+ mptcp_for_each_subflow_safe(msk, subflow, tmp) {
struct sock *ssk = mptcp_subflow_tcp_sock(subflow);
if (inet_sk_state_load(ssk) != TCP_CLOSE)
@@ -2381,7 +2381,7 @@ static void mptcp_check_fastclose(struct mptcp_sock *msk)
mptcp_token_destroy(msk);
- list_for_each_entry_safe(subflow, tmp, &msk->conn_list, node) {
+ mptcp_for_each_subflow_safe(msk, subflow, tmp) {
struct sock *tcp_sk = mptcp_subflow_tcp_sock(subflow);
bool slow;
@@ -2886,7 +2886,7 @@ static int mptcp_disconnect(struct sock *sk, int flags)
inet_sk_state_store(sk, TCP_CLOSE);
- list_for_each_entry_safe(subflow, tmp, &msk->conn_list, node) {
+ mptcp_for_each_subflow_safe(msk, subflow, tmp) {
struct sock *ssk = mptcp_subflow_tcp_sock(subflow);
__mptcp_close_ssk(sk, ssk, subflow, MPTCP_CF_FASTCLOSE);
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
index b9333e7f380a..13b76f86f749 100644
--- a/net/mptcp/protocol.h
+++ b/net/mptcp/protocol.h
@@ -315,6 +315,8 @@ struct mptcp_sock {
#define mptcp_for_each_subflow(__msk, __subflow) \
list_for_each_entry(__subflow, &((__msk)->conn_list), node)
+#define mptcp_for_each_subflow_safe(__msk, __subflow, __tmp) \
+ list_for_each_entry_safe(__subflow, __tmp, &((__msk)->conn_list), node)
static inline void msk_owned_by_me(const struct mptcp_sock *msk)
{
--
2.36.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH mptcp-next] mptcp: add mptcp_for_each_subflow_safe helper
2022-07-12 16:02 [PATCH mptcp-next] mptcp: add mptcp_for_each_subflow_safe helper Matthieu Baerts
@ 2022-07-12 17:25 ` Mat Martineau
2022-07-13 8:46 ` Matthieu Baerts
2022-07-12 17:44 ` mptcp: add mptcp_for_each_subflow_safe helper: Tests Results MPTCP CI
1 sibling, 1 reply; 4+ messages in thread
From: Mat Martineau @ 2022-07-12 17:25 UTC (permalink / raw)
To: Matthieu Baerts; +Cc: mptcp
On Tue, 12 Jul 2022, Matthieu Baerts wrote:
> Similar to mptcp_for_each_subflow(): this is clearer now that the _safe
> version is used in multiple places.
>
> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Looks good to me, thanks Matthieu
Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
> ---
> net/mptcp/pm_netlink.c | 2 +-
> net/mptcp/protocol.c | 6 +++---
> net/mptcp/protocol.h | 2 ++
> 3 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
> index 291b5da42fdb..62471aaedb6d 100644
> --- a/net/mptcp/pm_netlink.c
> +++ b/net/mptcp/pm_netlink.c
> @@ -796,7 +796,7 @@ static void mptcp_pm_nl_rm_addr_or_subflow(struct mptcp_sock *msk,
> u8 rm_id = rm_list->ids[i];
> bool removed = false;
>
> - list_for_each_entry_safe(subflow, tmp, &msk->conn_list, node) {
> + mptcp_for_each_subflow_safe(msk, subflow, tmp) {
> struct sock *ssk = mptcp_subflow_tcp_sock(subflow);
> int how = RCV_SHUTDOWN | SEND_SHUTDOWN;
> u8 id = subflow->local_id;
> diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> index c92f91cb2c8d..48fdef304309 100644
> --- a/net/mptcp/protocol.c
> +++ b/net/mptcp/protocol.c
> @@ -2338,7 +2338,7 @@ static void __mptcp_close_subflow(struct mptcp_sock *msk)
>
> might_sleep();
>
> - list_for_each_entry_safe(subflow, tmp, &msk->conn_list, node) {
> + mptcp_for_each_subflow_safe(msk, subflow, tmp) {
> struct sock *ssk = mptcp_subflow_tcp_sock(subflow);
>
> if (inet_sk_state_load(ssk) != TCP_CLOSE)
> @@ -2381,7 +2381,7 @@ static void mptcp_check_fastclose(struct mptcp_sock *msk)
>
> mptcp_token_destroy(msk);
>
> - list_for_each_entry_safe(subflow, tmp, &msk->conn_list, node) {
> + mptcp_for_each_subflow_safe(msk, subflow, tmp) {
> struct sock *tcp_sk = mptcp_subflow_tcp_sock(subflow);
> bool slow;
>
> @@ -2886,7 +2886,7 @@ static int mptcp_disconnect(struct sock *sk, int flags)
>
> inet_sk_state_store(sk, TCP_CLOSE);
>
> - list_for_each_entry_safe(subflow, tmp, &msk->conn_list, node) {
> + mptcp_for_each_subflow_safe(msk, subflow, tmp) {
> struct sock *ssk = mptcp_subflow_tcp_sock(subflow);
>
> __mptcp_close_ssk(sk, ssk, subflow, MPTCP_CF_FASTCLOSE);
> diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
> index b9333e7f380a..13b76f86f749 100644
> --- a/net/mptcp/protocol.h
> +++ b/net/mptcp/protocol.h
> @@ -315,6 +315,8 @@ struct mptcp_sock {
>
> #define mptcp_for_each_subflow(__msk, __subflow) \
> list_for_each_entry(__subflow, &((__msk)->conn_list), node)
> +#define mptcp_for_each_subflow_safe(__msk, __subflow, __tmp) \
> + list_for_each_entry_safe(__subflow, __tmp, &((__msk)->conn_list), node)
>
> static inline void msk_owned_by_me(const struct mptcp_sock *msk)
> {
> --
> 2.36.1
>
>
>
--
Mat Martineau
Intel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: mptcp: add mptcp_for_each_subflow_safe helper: Tests Results
2022-07-12 16:02 [PATCH mptcp-next] mptcp: add mptcp_for_each_subflow_safe helper Matthieu Baerts
2022-07-12 17:25 ` Mat Martineau
@ 2022-07-12 17:44 ` MPTCP CI
1 sibling, 0 replies; 4+ messages in thread
From: MPTCP CI @ 2022-07-12 17:44 UTC (permalink / raw)
To: Matthieu Baerts; +Cc: mptcp
Hi Matthieu,
Thank you for your modifications, that's great!
Our CI did some validations and here is its report:
- KVM Validation: normal:
- Unstable: 2 failed test(s): selftest_mptcp_join selftest_simult_flows 🔴:
- Task: https://cirrus-ci.com/task/4969640886534144
- Summary: https://api.cirrus-ci.com/v1/artifact/task/4969640886534144/summary/summary.txt
- KVM Validation: debug:
- Success! ✅:
- Task: https://cirrus-ci.com/task/6095540793376768
- Summary: https://api.cirrus-ci.com/v1/artifact/task/6095540793376768/summary/summary.txt
Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/a95c064741f6
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] 4+ messages in thread
* Re: [PATCH mptcp-next] mptcp: add mptcp_for_each_subflow_safe helper
2022-07-12 17:25 ` Mat Martineau
@ 2022-07-13 8:46 ` Matthieu Baerts
0 siblings, 0 replies; 4+ messages in thread
From: Matthieu Baerts @ 2022-07-13 8:46 UTC (permalink / raw)
To: Mat Martineau; +Cc: mptcp
Hi Mat,
On 12/07/2022 19:25, Mat Martineau wrote:
> On Tue, 12 Jul 2022, Matthieu Baerts wrote:
>
>> Similar to mptcp_for_each_subflow(): this is clearer now that the _safe
>> version is used in multiple places.
>>
>> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
>
> Looks good to me, thanks Matthieu
>
> Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Thank you for the review!
Now in our tree (feat. for net-next):
New patches for t/upstream:
- 9b920d84b10d: mptcp: add mptcp_for_each_subflow_safe helper
- Results: bd3c22dfa097..ca68291a7562 (export)
Tests are now in progress:
https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export-net/20220713T084449
Cheers,
Matt
--
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-07-13 8:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-12 16:02 [PATCH mptcp-next] mptcp: add mptcp_for_each_subflow_safe helper Matthieu Baerts
2022-07-12 17:25 ` Mat Martineau
2022-07-13 8:46 ` Matthieu Baerts
2022-07-12 17:44 ` mptcp: add mptcp_for_each_subflow_safe helper: 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;
as well as URLs for NNTP newsgroup(s).