[PATCH mptcp-net/next v5 00/12] mptcp: add support for mixed v4/v6

Matthieu Baerts posted 12 patches 1 year, 3 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/20230104171526.1416746-1-matthieu.baerts@tessares.net
Maintainers: Mat Martineau <mathew.j.martineau@linux.intel.com>, Matthieu Baerts <matthieu.baerts@tessares.net>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Shuah Khan <shuah@kernel.org>, Kishen Maloor <kishen.maloor@intel.com>, Florian Westphal <fw@strlen.de>
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(-)
[PATCH mptcp-net/next v5 00/12] mptcp: add support for mixed v4/v6
Posted by Matthieu Baerts 1 year, 3 months ago
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
Re: [PATCH mptcp-net/next v5 00/12] mptcp: add support for mixed v4/v6
Posted by Mat Martineau 1 year, 3 months ago
On Wed, 4 Jan 2023, Matthieu Baerts wrote:

> 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 1-8 look good for further testing in the export (and export-net) 
branches:

Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>



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

I have a very minor formatting comment on patch 9 (separate reply)


- Mat


> 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
>
>
>

--
Mat Martineau
Intel
Re: [PATCH mptcp-net/next v5 00/12] mptcp: add support for mixed v4/v6
Posted by Matthieu Baerts 1 year, 3 months ago
Hi Mat,

On 06/01/2023 02:15, Mat Martineau wrote:
> On Wed, 4 Jan 2023, Matthieu Baerts wrote:
> 
>> 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 1-8 look good for further testing in the export (and export-net)
> branches:
> 
> Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
> 
> 
> 
>> Patches 9 to 12 improve the messages printed by the userspace PM,
>> especially in case of error during the validation.
>>
> 
> I have a very minor formatting comment on patch 9 (separate reply)

Thank you for the review!

I just applied these patches. I can of course modify them later if Paolo
is not OK with the modifications I did or to add Acked-by! (But I
understand Paolo probably has a huge email backlog to process, no hurry,
but at least here we can have more validations from the CI :-) )

New patches for t/upstream-net:
- 232e5ef7e4fb: mptcp: explicitly specify sock family at subflow
creation time
- 8215e56b14f2: mptcp: netlink: respect v4/v6-only sockets
- 13ce9dd3a3da: selftests: mptcp: userspace: validate v4-v6 subflows mix
- Results: 4d3787dfafff..e8000101a67b (export-net)

Tests are now in progress:

https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export-net/20230109T163931


New patches for t/upstream:
- d7f79d4ba386: mptcp: let the in-kernel PM use mixed IPv4 and IPv6
addresses
- 4b28be013860: mptcp: propagate sk_ipv6only to subflows
- 371aa633fcf3: selftests: mptcp: add test-cases for mixed v4/v6 subflows
- 0e67a2df934f: mptcp: remove assigned but unused value
- 082c80d3fdbd: mptcp: userspace pm: use a single point of exit
- 621e00114ef6: selftests: mptcp: userspace: print titles
- 7c48d44f2d7d: selftests: mptcp: userspace: refactor asserts
- 543addc028f6: selftests: mptcp: userspace: print error details if any
- 4d29130d0eb7: selftests: mptcp: userspace: avoid read errors
- Results: 4ae7362cc1dc..24e3778f30ac (export)

Tests are now in progress:

https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export/20230109T165807

Cheers,
Matt
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net