All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net 0/2] mptcp: More fixes for 6.5
@ 2023-07-25 18:34 Mat Martineau
  2023-07-25 18:34 ` [PATCH net 1/2] selftests: mptcp: join: only check for ip6tables if needed Mat Martineau
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Mat Martineau @ 2023-07-25 18:34 UTC (permalink / raw)
  To: Matthieu Baerts, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Geliang Tang
  Cc: netdev, mptcp, stable, Mat Martineau

Patch 1: Better detection of ip6tables vs ip6tables-legacy tools for 
self tests. Fix for 6.4 and newer.

Patch 2: Only generate "new listener" event if listen operation 
succeeds. Fix for 6.2 and newer.

Signed-off-by: Mat Martineau <martineau@kernel.org>
---
Matthieu Baerts (1):
      selftests: mptcp: join: only check for ip6tables if needed

Paolo Abeni (1):
      mptcp: more accurate NL event generation

 net/mptcp/protocol.c                            | 3 +--
 tools/testing/selftests/net/mptcp/mptcp_join.sh | 4 +---
 2 files changed, 2 insertions(+), 5 deletions(-)
---
base-commit: 284779dbf4e98753458708783af8c35630674a21
change-id: 20230725-send-net-20230725-579ecd4326e8

Best regards,
-- 
Mat Martineau <martineau@kernel.org>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH net 1/2] selftests: mptcp: join: only check for ip6tables if needed
  2023-07-25 18:34 [PATCH net 0/2] mptcp: More fixes for 6.5 Mat Martineau
@ 2023-07-25 18:34 ` Mat Martineau
  2023-07-25 18:36   ` kernel test robot
  2023-07-25 18:39   ` Greg KH
  2023-07-25 18:34 ` [PATCH net 2/2] mptcp: more accurate NL event generation Mat Martineau
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 9+ messages in thread
From: Mat Martineau @ 2023-07-25 18:34 UTC (permalink / raw)
  To: Matthieu Baerts, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Geliang Tang
  Cc: netdev, mptcp, stable, Mat Martineau

From: Matthieu Baerts <matthieu.baerts@tessares.net>

If 'iptables-legacy' is available, 'ip6tables-legacy' command will be
used instead of 'ip6tables'. So no need to look if 'ip6tables' is
available in this case.

Fixes: 0c4cd3f86a40 ("selftests: mptcp: join: use 'iptables-legacy' if available")
Acked-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Mat Martineau <martineau@kernel.org>
---
 tools/testing/selftests/net/mptcp/mptcp_join.sh | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
index e6c9d5451c5b..3c2096ac97ef 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
@@ -162,9 +162,7 @@ check_tools()
 	elif ! iptables -V &> /dev/null; then
 		echo "SKIP: Could not run all tests without iptables tool"
 		exit $ksft_skip
-	fi
-
-	if ! ip6tables -V &> /dev/null; then
+	elif ! ip6tables -V &> /dev/null; then
 		echo "SKIP: Could not run all tests without ip6tables tool"
 		exit $ksft_skip
 	fi

-- 
2.41.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH net 2/2] mptcp: more accurate NL event generation
  2023-07-25 18:34 [PATCH net 0/2] mptcp: More fixes for 6.5 Mat Martineau
  2023-07-25 18:34 ` [PATCH net 1/2] selftests: mptcp: join: only check for ip6tables if needed Mat Martineau
@ 2023-07-25 18:34 ` Mat Martineau
  2023-07-25 18:39   ` Greg KH
  2023-07-25 22:27 ` [PATCH net 0/2] mptcp: More fixes for 6.5 Jakub Kicinski
  2023-07-27  1:50 ` patchwork-bot+netdevbpf
  3 siblings, 1 reply; 9+ messages in thread
From: Mat Martineau @ 2023-07-25 18:34 UTC (permalink / raw)
  To: Matthieu Baerts, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Geliang Tang
  Cc: netdev, mptcp, stable, Mat Martineau

From: Paolo Abeni <pabeni@redhat.com>

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.

Fixes: f8c9dfbd875b ("mptcp: add pm listener events")
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-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 3613489eb6e3..3317d1cca156 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -3723,10 +3723,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


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH net 1/2] selftests: mptcp: join: only check for ip6tables if needed
  2023-07-25 18:34 ` [PATCH net 1/2] selftests: mptcp: join: only check for ip6tables if needed Mat Martineau
@ 2023-07-25 18:36   ` kernel test robot
  2023-07-25 18:39   ` Greg KH
  1 sibling, 0 replies; 9+ messages in thread
From: kernel test robot @ 2023-07-25 18:36 UTC (permalink / raw)
  To: Mat Martineau; +Cc: stable, oe-kbuild-all

Hi,

Thanks for your patch.

FYI: kernel test robot notices the stable kernel rule is not satisfied.

Rule: 'Cc: stable@vger.kernel.org' or 'commit <sha1> upstream.'
Subject: [PATCH net 1/2] selftests: mptcp: join: only check for ip6tables if needed
Link: https://lore.kernel.org/stable/20230725-send-net-20230725-v1-1-6f60fe7137a9%40kernel.org

The check is based on https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH net 2/2] mptcp: more accurate NL event generation
  2023-07-25 18:34 ` [PATCH net 2/2] mptcp: more accurate NL event generation Mat Martineau
@ 2023-07-25 18:39   ` Greg KH
  0 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2023-07-25 18:39 UTC (permalink / raw)
  To: Mat Martineau
  Cc: Matthieu Baerts, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Geliang Tang, netdev, mptcp, stable

On Tue, Jul 25, 2023 at 11:34:56AM -0700, Mat Martineau wrote:
> From: Paolo Abeni <pabeni@redhat.com>
> 
> 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.
> 
> Fixes: f8c9dfbd875b ("mptcp: add pm listener events")
> Reviewed-by: Mat Martineau <martineau@kernel.org>
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> Signed-off-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 3613489eb6e3..3317d1cca156 100644
> --- a/net/mptcp/protocol.c
> +++ b/net/mptcp/protocol.c
> @@ -3723,10 +3723,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
> 

<formletter>

This is not the correct way to submit patches for inclusion in the
stable kernel tree.  Please read:
    https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

</formletter>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH net 1/2] selftests: mptcp: join: only check for ip6tables if needed
  2023-07-25 18:34 ` [PATCH net 1/2] selftests: mptcp: join: only check for ip6tables if needed Mat Martineau
  2023-07-25 18:36   ` kernel test robot
@ 2023-07-25 18:39   ` Greg KH
  2023-07-25 21:08     ` Mat Martineau
  1 sibling, 1 reply; 9+ messages in thread
From: Greg KH @ 2023-07-25 18:39 UTC (permalink / raw)
  To: Mat Martineau
  Cc: Matthieu Baerts, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Geliang Tang, netdev, mptcp, stable

On Tue, Jul 25, 2023 at 11:34:55AM -0700, Mat Martineau wrote:
> From: Matthieu Baerts <matthieu.baerts@tessares.net>
> 
> If 'iptables-legacy' is available, 'ip6tables-legacy' command will be
> used instead of 'ip6tables'. So no need to look if 'ip6tables' is
> available in this case.
> 
> Fixes: 0c4cd3f86a40 ("selftests: mptcp: join: use 'iptables-legacy' if available")
> Acked-by: Paolo Abeni <pabeni@redhat.com>
> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
> Signed-off-by: Mat Martineau <martineau@kernel.org>
> ---
>  tools/testing/selftests/net/mptcp/mptcp_join.sh | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> index e6c9d5451c5b..3c2096ac97ef 100755
> --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
> +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> @@ -162,9 +162,7 @@ check_tools()
>  	elif ! iptables -V &> /dev/null; then
>  		echo "SKIP: Could not run all tests without iptables tool"
>  		exit $ksft_skip
> -	fi
> -
> -	if ! ip6tables -V &> /dev/null; then
> +	elif ! ip6tables -V &> /dev/null; then
>  		echo "SKIP: Could not run all tests without ip6tables tool"
>  		exit $ksft_skip
>  	fi
> 
> -- 
> 2.41.0
> 

<formletter>

This is not the correct way to submit patches for inclusion in the
stable kernel tree.  Please read:
    https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

</formletter>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH net 1/2] selftests: mptcp: join: only check for ip6tables if needed
  2023-07-25 18:39   ` Greg KH
@ 2023-07-25 21:08     ` Mat Martineau
  0 siblings, 0 replies; 9+ messages in thread
From: Mat Martineau @ 2023-07-25 21:08 UTC (permalink / raw)
  To: Jakub Kicinski, Paolo Abeni
  Cc: Greg KH, Matthieu Baerts, David S. Miller, Eric Dumazet,
	Geliang Tang, netdev, mptcp, stable

On Tue, 25 Jul 2023, Greg KH wrote:

> On Tue, Jul 25, 2023 at 11:34:55AM -0700, Mat Martineau wrote:
>> From: Matthieu Baerts <matthieu.baerts@tessares.net>
>>
>> If 'iptables-legacy' is available, 'ip6tables-legacy' command will be
>> used instead of 'ip6tables'. So no need to look if 'ip6tables' is
>> available in this case.
>>
>> Fixes: 0c4cd3f86a40 ("selftests: mptcp: join: use 'iptables-legacy' if available")
>> Acked-by: Paolo Abeni <pabeni@redhat.com>
>> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
>> Signed-off-by: Mat Martineau <martineau@kernel.org>
>> ---
>>  tools/testing/selftests/net/mptcp/mptcp_join.sh | 4 +---
>>  1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
>> index e6c9d5451c5b..3c2096ac97ef 100755
>> --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
>> +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
>> @@ -162,9 +162,7 @@ check_tools()
>>  	elif ! iptables -V &> /dev/null; then
>>  		echo "SKIP: Could not run all tests without iptables tool"
>>  		exit $ksft_skip
>> -	fi
>> -
>> -	if ! ip6tables -V &> /dev/null; then
>> +	elif ! ip6tables -V &> /dev/null; then
>>  		echo "SKIP: Could not run all tests without ip6tables tool"
>>  		exit $ksft_skip
>>  	fi
>>
>> --
>> 2.41.0
>>
>
> <formletter>
>
> This is not the correct way to submit patches for inclusion in the
> stable kernel tree.  Please read:
>    https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
> for how to do this properly.
>
> </formletter>

Ugh, I did forget to add the "Cc: stable@vger.kernel.org" tag in the 
commit messages for this series and only added in the email cc field.

Jakub/Paolo, if you apply the series as-is I can make sure these end up in 
stable (as they likely will even without the cc tag). If you prefer I send 
a v2 just let me know.


- Mat

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH net 0/2] mptcp: More fixes for 6.5
  2023-07-25 18:34 [PATCH net 0/2] mptcp: More fixes for 6.5 Mat Martineau
  2023-07-25 18:34 ` [PATCH net 1/2] selftests: mptcp: join: only check for ip6tables if needed Mat Martineau
  2023-07-25 18:34 ` [PATCH net 2/2] mptcp: more accurate NL event generation Mat Martineau
@ 2023-07-25 22:27 ` Jakub Kicinski
  2023-07-27  1:50 ` patchwork-bot+netdevbpf
  3 siblings, 0 replies; 9+ messages in thread
From: Jakub Kicinski @ 2023-07-25 22:27 UTC (permalink / raw)
  To: Mat Martineau
  Cc: Matthieu Baerts, David S. Miller, Eric Dumazet, Paolo Abeni,
	Geliang Tang, netdev, mptcp

On Tue, 25 Jul 2023 11:34:54 -0700 Mat Martineau wrote:
> Patch 1: Better detection of ip6tables vs ip6tables-legacy tools for 
> self tests. Fix for 6.4 and newer.
> 
> Patch 2: Only generate "new listener" event if listen operation 
> succeeds. Fix for 6.2 and newer.

I hacked up propagating Cc: stable from replies in our maintainer
tooling.  Good opportunity to test that:

Cc: stable@vger.kernel.org

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH net 0/2] mptcp: More fixes for 6.5
  2023-07-25 18:34 [PATCH net 0/2] mptcp: More fixes for 6.5 Mat Martineau
                   ` (2 preceding siblings ...)
  2023-07-25 22:27 ` [PATCH net 0/2] mptcp: More fixes for 6.5 Jakub Kicinski
@ 2023-07-27  1:50 ` patchwork-bot+netdevbpf
  3 siblings, 0 replies; 9+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-07-27  1:50 UTC (permalink / raw)
  To: Mat Martineau
  Cc: matthieu.baerts, davem, edumazet, kuba, pabeni, geliang.tang,
	netdev, mptcp, stable

Hello:

This series was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Tue, 25 Jul 2023 11:34:54 -0700 you wrote:
> Patch 1: Better detection of ip6tables vs ip6tables-legacy tools for
> self tests. Fix for 6.4 and newer.
> 
> Patch 2: Only generate "new listener" event if listen operation
> succeeds. Fix for 6.2 and newer.
> 
> Signed-off-by: Mat Martineau <martineau@kernel.org>
> 
> [...]

Here is the summary with links:
  - [net,1/2] selftests: mptcp: join: only check for ip6tables if needed
    https://git.kernel.org/netdev/net/c/016e7ba47f33
  - [net,2/2] mptcp: more accurate NL event generation
    https://git.kernel.org/netdev/net/c/21d9b73a7d52

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-07-27  1:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-25 18:34 [PATCH net 0/2] mptcp: More fixes for 6.5 Mat Martineau
2023-07-25 18:34 ` [PATCH net 1/2] selftests: mptcp: join: only check for ip6tables if needed Mat Martineau
2023-07-25 18:36   ` kernel test robot
2023-07-25 18:39   ` Greg KH
2023-07-25 21:08     ` Mat Martineau
2023-07-25 18:34 ` [PATCH net 2/2] mptcp: more accurate NL event generation Mat Martineau
2023-07-25 18:39   ` Greg KH
2023-07-25 22:27 ` [PATCH net 0/2] mptcp: More fixes for 6.5 Jakub Kicinski
2023-07-27  1:50 ` patchwork-bot+netdevbpf

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.