[PATCH mptcp-next 01/14] mptcp: more accurate NL event generation.

Paolo Abeni posted 14 patches 2 years, 7 months ago
Maintainers: "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, David Ahern <dsahern@kernel.org>, Matthieu Baerts <matthieu.baerts@tessares.net>, Mat Martineau <martineau@kernel.org>, Geliang Tang <geliang.tang@suse.com>
There is a newer version of this series
[PATCH mptcp-next 01/14] mptcp: more accurate NL event generation.
Posted by Paolo Abeni 2 years, 7 months ago
Currently the mptcp code generate a "new listener" event even
if the actual listen() syscall fails. Address the issue moving
the event generation call under the successful branch.

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
this could possibly go via -net, but is used by later patches and
is not really critical IMHO.
Eventually the additional tag would be:
Fixes: f8c9dfbd875b ("mptcp: add pm listener events")
---
 net/mptcp/protocol.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 497bc17b5223..8b5c78f582f7 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -3762,10 +3762,9 @@ static int mptcp_listen(struct socket *sock, int backlog)
 	if (!err) {
 		sock_prot_inuse_add(sock_net(sk), sk->sk_prot, 1);
 		mptcp_copy_inaddrs(sk, ssock->sk);
+		mptcp_event_pm_listener(ssock->sk, MPTCP_EVENT_LISTENER_CREATED);
 	}
 
-	mptcp_event_pm_listener(ssock->sk, MPTCP_EVENT_LISTENER_CREATED);
-
 unlock:
 	release_sock(sk);
 	return err;
-- 
2.41.0
Re: [PATCH mptcp-next 01/14] mptcp: more accurate NL event generation.
Posted by Mat Martineau 2 years, 7 months ago
On Mon, 10 Jul 2023, Paolo Abeni wrote:

> Currently the mptcp code generate a "new listener" event even
> if the actual listen() syscall fails. Address the issue moving
> the event generation call under the successful branch.
>
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>

> ---
> this could possibly go via -net, but is used by later patches and
> is not really critical IMHO.
> Eventually the additional tag would be:
> Fixes: f8c9dfbd875b ("mptcp: add pm listener events")

I replied deeper in the thread about applying this patch to -net, but I 
need to tag it too:

Reviewed-by: Mat Martineau <martineau@kernel.org>

> ---
> net/mptcp/protocol.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> index 497bc17b5223..8b5c78f582f7 100644
> --- a/net/mptcp/protocol.c
> +++ b/net/mptcp/protocol.c
> @@ -3762,10 +3762,9 @@ static int mptcp_listen(struct socket *sock, int backlog)
> 	if (!err) {
> 		sock_prot_inuse_add(sock_net(sk), sk->sk_prot, 1);
> 		mptcp_copy_inaddrs(sk, ssock->sk);
> +		mptcp_event_pm_listener(ssock->sk, MPTCP_EVENT_LISTENER_CREATED);
> 	}
>
> -	mptcp_event_pm_listener(ssock->sk, MPTCP_EVENT_LISTENER_CREATED);
> -
> unlock:
> 	release_sock(sk);
> 	return err;
> -- 
> 2.41.0
>
>
>
Re: [PATCH mptcp-next 01/14] mptcp: more accurate NL event generation.
Posted by Matthieu Baerts 2 years, 6 months ago
Hi Paolo, Mat,

On 13/07/2023 18:45, Mat Martineau wrote:
> On Mon, 10 Jul 2023, Paolo Abeni wrote:
> 
>> Currently the mptcp code generate a "new listener" event even
>> if the actual listen() syscall fails. Address the issue moving
>> the event generation call under the successful branch.
>>
>> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> 
>> ---
>> this could possibly go via -net, but is used by later patches and
>> is not really critical IMHO.
>> Eventually the additional tag would be:
>> Fixes: f8c9dfbd875b ("mptcp: add pm listener events")
> 
> I replied deeper in the thread about applying this patch to -net, but I
> need to tag it too:
> 
> Reviewed-by: Mat Martineau <martineau@kernel.org>

Thank you for the patch and the review!

Now in our tree (fixes for -net), only patch 1/14, with the Fixes tag:

New patches for t/upstream-net and t/upstream:
- 3e47bbe23f1c: mptcp: more accurate NL event generation
- Results: a99957c74d24..2f898c1f1eda (export-net)
- Results: 3ee02a7d38ae..14584832110b (export)

Tests are now in progress:

https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export-net/20230713T191154
https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export/20230713T191154

Cheers,
Matt
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net
Re: [PATCH mptcp-next 01/14] mptcp: more accurate NL event generation.
Posted by Matthieu Baerts 2 years, 7 months ago
Hi Paolo, Mat,

On 10/07/2023 14:54, Paolo Abeni wrote:
> Currently the mptcp code generate a "new listener" event even
> if the actual listen() syscall fails. Address the issue moving
> the event generation call under the successful branch.

Good catch!

> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> ---
> this could possibly go via -net, but is used by later patches and
> is not really critical IMHO.
> Eventually the additional tag would be:
> Fixes: f8c9dfbd875b ("mptcp: add pm listener events")

I think it makes sense to send this to -net. If it is OK for Mat, I can
already apply this patch.

Cheers,
Matt
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net
Re: [PATCH mptcp-next 01/14] mptcp: more accurate NL event generation.
Posted by Mat Martineau 2 years, 7 months ago
On Thu, 13 Jul 2023, Matthieu Baerts wrote:

> Hi Paolo, Mat,
>
> On 10/07/2023 14:54, Paolo Abeni wrote:
>> Currently the mptcp code generate a "new listener" event even
>> if the actual listen() syscall fails. Address the issue moving
>> the event generation call under the successful branch.
>
> Good catch!
>
>> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
>> ---
>> this could possibly go via -net, but is used by later patches and
>> is not really critical IMHO.
>> Eventually the additional tag would be:
>> Fixes: f8c9dfbd875b ("mptcp: add pm listener events")
>
> I think it makes sense to send this to -net. If it is OK for Mat, I can
> already apply this patch.

Sure, fine to apply this one.


- Mat