All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH mptcp-net/next v5 00/12] mptcp: add support for mixed v4/v6
@ 2023-01-04 17:15 Matthieu Baerts
  2023-01-04 17:15 ` [PATCH mptcp-net v5 01/12] mptcp: explicitly specify sock family at subflow creation time Matthieu Baerts
                   ` (12 more replies)
  0 siblings, 13 replies; 23+ messages in thread
From: Matthieu Baerts @ 2023-01-04 17:15 UTC (permalink / raw)
  To: mptcp; +Cc: Matthieu Baerts

This is a v5 of Paolo's series with the same name but with some
modifications and additional patches.

ChangeLog:
  - v3 -> v4:
    - Fix a compilation error without CONFIG_MPTCP_IPV6 in patch 4/12.
    - Add a title for the cleanup part in patch 9/12
    - Add the patch 12/12 to avoid "read" errors
  - v4 -> v5:
    - Fix typo in patch 2/12 (Mat)
    - More details in the commit message of patch 2/12 (Mat)
    - Rebased on top of the latest export branch

This series can be split in 2 parts: the 3 first patches are for -net
while the rest is for net-next. Patches for net-next depends on patches
for -net, that's why everything is being sent together.

Patch 1 lets the userspace PM selects the proper family to avoid
creating subflows with wrong source and/or destination addresses because
the family is not the expected one.

Patch 2 makes sure the userspace PM doesn't allow the userspace to
create subflows for a family that is not allowed.

The core MPTCP implementation is just a few bits of properly supporting
a mix of v4 and v6 subflows, we just need to allow specifying the
subflow family explicitly (patch 1) and remove artificial constraints in
the in-kernel PM currently enforcing no mixed subflow in place (patch
4).

Patch 5 makes sure the sk_ipv6only attribute is also propagated to
subflows, just in case the PM doesn't respect it.

Some selftests have also been added for the userspace PM (patch 3) and
the in-kernel PM (patch 6).

Patches 7 and 8 are just some cleanups in the userspace PM, not related
to the rest but I saw them when modifying the file.

Patches 9 to 12 improve the messages printed by the userspace PM,
especially in case of error during the validation.

Matthieu Baerts (9):
  mptcp: netlink: respect v4/v6-only sockets
  selftests: mptcp: userspace: validate v4-v6 subflows mix
  mptcp: propagate sk_ipv6only to subflows
  mptcp: remove assigned but unused value
  mptcp: userspace pm: use a single point of exit
  selftests: mptcp: userspace: print titles
  selftests: mptcp: userspace: refactor asserts
  selftests: mptcp: userspace: print error details if any
  selftests: mptcp: userspace: avoid read errors

Paolo Abeni (3):
  mptcp: explicitly specify sock family at subflow creation time
  mptcp: let the in-kernel PM use mixed IPv4 and IPv6 addresses
  selftests: mptcp: add test-cases for mixed v4/v6 subflows

 net/mptcp/pm.c                                |  25 +++
 net/mptcp/pm_netlink.c                        |  58 ++---
 net/mptcp/pm_userspace.c                      |  14 +-
 net/mptcp/protocol.c                          |   2 +-
 net/mptcp/protocol.h                          |   6 +-
 net/mptcp/sockopt.c                           |   1 +
 net/mptcp/subflow.c                           |   9 +-
 .../testing/selftests/net/mptcp/mptcp_join.sh |  53 ++++-
 .../selftests/net/mptcp/userspace_pm.sh       | 200 ++++++++++++------
 9 files changed, 262 insertions(+), 106 deletions(-)


base-commit: 0e6e165b9b9b5ea418067cfac1e861892ee7e12c
-- 
2.37.2


^ permalink raw reply	[flat|nested] 23+ messages in thread
* [PATCH mptcp-next v4 12/12] selftests: mptcp: userspace: avoid read errors
@ 2022-12-28 10:17 Matthieu Baerts
  2022-12-28 16:13 ` selftests: mptcp: userspace: avoid read errors: Tests Results MPTCP CI
  0 siblings, 1 reply; 23+ messages in thread
From: Matthieu Baerts @ 2022-12-28 10:17 UTC (permalink / raw)
  To: mptcp; +Cc: Matthieu Baerts

During the cleanup phase, the server pids were killed with a SIGTERM
directly, not using a SIGUSR1 first to quit safely. As a result, this
test was often ending with two error messages:

  read: Connection reset by peer

While at it, use a for-loop to terminal all the PIDs the same way.

Also the different files are now removed after having killed the PIDs
using them. It makes more sense to do that in this order.

Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
---
 .../selftests/net/mptcp/userspace_pm.sh       | 32 +++++++------------
 1 file changed, 12 insertions(+), 20 deletions(-)

diff --git a/tools/testing/selftests/net/mptcp/userspace_pm.sh b/tools/testing/selftests/net/mptcp/userspace_pm.sh
index 0bd35768c1aa..8b4f130800b9 100755
--- a/tools/testing/selftests/net/mptcp/userspace_pm.sh
+++ b/tools/testing/selftests/net/mptcp/userspace_pm.sh
@@ -50,6 +50,9 @@ print_title()
 
 kill_wait()
 {
+	[ $1 -eq 0 ] && return 0
+
+	kill -SIGUSR1 $1 > /dev/null 2>&1
 	kill $1 > /dev/null 2>&1
 	wait $1 2>/dev/null
 }
@@ -58,32 +61,21 @@ cleanup()
 {
 	print_title "Cleanup"
 
-	rm -rf $file $client_evts $server_evts
-
 	# Terminate the MPTCP connection and related processes
-	if [ $client4_pid -ne 0 ]; then
-		kill -SIGUSR1 $client4_pid > /dev/null 2>&1
-	fi
-	if [ $server4_pid -ne 0 ]; then
-		kill_wait $server4_pid
-	fi
-	if [ $client6_pid -ne 0 ]; then
-		kill -SIGUSR1 $client6_pid > /dev/null 2>&1
-	fi
-	if [ $server6_pid -ne 0 ]; then
-		kill_wait $server6_pid
-	fi
-	if [ $server_evts_pid -ne 0 ]; then
-		kill_wait $server_evts_pid
-	fi
-	if [ $client_evts_pid -ne 0 ]; then
-		kill_wait $client_evts_pid
-	fi
+	local pid
+	for pid in $client4_pid $server4_pid $client6_pid $server6_pid\
+		   $server_evts_pid $client_evts_pid
+	do
+		kill_wait $pid
+	done
+
 	local netns
 	for netns in "$ns1" "$ns2" ;do
 		ip netns del "$netns"
 	done
 
+	rm -rf $file $client_evts $server_evts
+
 	stdbuf -o0 -e0 printf "Done\n"
 }
 
-- 
2.37.2


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

end of thread, other threads:[~2023-01-10  9:20 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-04 17:15 [PATCH mptcp-net/next v5 00/12] mptcp: add support for mixed v4/v6 Matthieu Baerts
2023-01-04 17:15 ` [PATCH mptcp-net v5 01/12] mptcp: explicitly specify sock family at subflow creation time Matthieu Baerts
2023-01-04 17:15 ` [PATCH mptcp-net v5 02/12] mptcp: netlink: respect v4/v6-only sockets Matthieu Baerts
2023-01-04 17:15 ` [PATCH mptcp-net v5 03/12] selftests: mptcp: userspace: validate v4-v6 subflows mix Matthieu Baerts
2023-01-04 17:15 ` [PATCH mptcp-next v5 04/12] mptcp: let the in-kernel PM use mixed IPv4 and IPv6 addresses Matthieu Baerts
2023-01-04 17:15 ` [PATCH mptcp-next v5 05/12] mptcp: propagate sk_ipv6only to subflows Matthieu Baerts
2023-01-04 17:15 ` [PATCH mptcp-next v5 06/12] selftests: mptcp: add test-cases for mixed v4/v6 subflows Matthieu Baerts
2023-01-04 17:15 ` [PATCH mptcp-next v5 07/12] mptcp: remove assigned but unused value Matthieu Baerts
2023-01-10  9:20   ` Matthieu Baerts
2023-01-04 17:15 ` [PATCH mptcp-next v5 08/12] mptcp: userspace pm: use a single point of exit Matthieu Baerts
2023-01-04 17:15 ` [PATCH mptcp-next v5 09/12] selftests: mptcp: userspace: print titles Matthieu Baerts
2023-01-06  1:19   ` Mat Martineau
2023-01-06  6:34     ` Matthieu Baerts
2023-01-06 16:34       ` Mat Martineau
2023-01-04 17:15 ` [PATCH mptcp-next v5 10/12] selftests: mptcp: userspace: refactor asserts Matthieu Baerts
2023-01-04 17:15 ` [PATCH mptcp-next v5 11/12] selftests: mptcp: userspace: print error details if any Matthieu Baerts
2023-01-04 17:15 ` [PATCH mptcp-next v5 12/12] selftests: mptcp: userspace: avoid read errors Matthieu Baerts
2023-01-05  8:32   ` selftests: mptcp: userspace: avoid read errors: Tests Results MPTCP CI
2023-01-06  2:39   ` MPTCP CI
2023-01-06 17:39   ` MPTCP CI
2023-01-06  1:15 ` [PATCH mptcp-net/next v5 00/12] mptcp: add support for mixed v4/v6 Mat Martineau
2023-01-09 17:04   ` Matthieu Baerts
  -- strict thread matches above, loose matches on Subject: below --
2022-12-28 10:17 [PATCH mptcp-next v4 12/12] selftests: mptcp: userspace: avoid read errors Matthieu Baerts
2022-12-28 16:13 ` selftests: mptcp: userspace: avoid read errors: Tests Results MPTCP CI

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.