[PATCH mptcp-next v10 00/14] mptcp: APIs and self-tests for userspace path management

Kishen Maloor posted 14 patches 2 years ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/20220414211920.1987961-1-kishen.maloor@intel.com
Maintainers: Jakub Kicinski <kuba@kernel.org>, Matthieu Baerts <matthieu.baerts@tessares.net>, "David S. Miller" <davem@davemloft.net>, Paolo Abeni <pabeni@redhat.com>, Mat Martineau <mathew.j.martineau@linux.intel.com>, Shuah Khan <shuah@kernel.org>
include/uapi/linux/mptcp.h                    |   7 +
net/mptcp/Makefile                            |   2 +-
net/mptcp/pm.c                                |   1 +
net/mptcp/pm_netlink.c                        | 169 ++--
net/mptcp/pm_userspace.c                      | 415 ++++++++++
net/mptcp/protocol.c                          |   1 +
net/mptcp/protocol.h                          |  39 +-
net/mptcp/subflow.c                           |   2 +-
tools/testing/selftests/net/mptcp/pm_nl_ctl.c | 645 ++++++++++++++-
.../selftests/net/mptcp/userspace_pm.sh       | 779 ++++++++++++++++++
10 files changed, 1997 insertions(+), 63 deletions(-)
create mode 100644 net/mptcp/pm_userspace.c
create mode 100755 tools/testing/selftests/net/mptcp/userspace_pm.sh
[PATCH mptcp-next v10 00/14] mptcp: APIs and self-tests for userspace path management
Posted by Kishen Maloor 2 years ago
This patch series brings together the base functionality
and new netlink APIs for flexible path management from userspace.
Further it extends the MPTCP self-testing framework to support the new
netlink APIs along with the ability to capture MPTCP netlink events
to aid in functional/behavioral validations. Lastly, it adds a
self-testing script with a suite of test cases covering the entire
range of the new userspace path management capabilities.

Note: This series depends on the prior patchset "mptcp: fixes and
enhancements related to path management".

v5:
-Primary change over v4 is the reliance on userspace
managed listener sockets for receiving MPJ requests.
-Addressed CI reported issues.

v6:
-Put all distinct userspace PM related code into a separate compilation
unit: pm_userspace.c.
-Made a few internal helpers non-static (now declared in protocol.h) to
facilitate the above change.
-Use the pm spinlock instead of mptcp_data_lock() to synchronize
access to the per-msk local_addr_list.

v7:
-Move userspace PM specific handling from pm_netlink
into mptcp_userspace_pm_get_local_id()
and mptcp_userspace_pm_get_flags_and_ifindex_by_id() in pm_userspace.

v8:
-Add copyright notice to pm_userspace.c.

v9:
-userspace_pm.sh: Mitigate possible buffering issues with CI.

v10:
-userspace_pm.sh: Increased sleep time between steps to counter
any timing issues with capturing events for verifying the tested
behavior. Might resolve test failures in the CI debug build.

Florian Westphal (2):
  mptcp: netlink: split mptcp_pm_parse_addr into two functions
  mptcp: netlink: allow userspace-driven subflow establishment

Kishen Maloor (12):
  mptcp: allow ADD_ADDR reissuance by userspace PMs
  mptcp: handle local addrs announced by userspace PMs
  mptcp: read attributes of addr entries managed by userspace PMs
  mptcp: netlink: Add MPTCP_PM_CMD_ANNOUNCE
  selftests: mptcp: support MPTCP_PM_CMD_ANNOUNCE
  mptcp: netlink: Add MPTCP_PM_CMD_REMOVE
  selftests: mptcp: support MPTCP_PM_CMD_REMOVE
  selftests: mptcp: support MPTCP_PM_CMD_SUBFLOW_CREATE
  selftests: mptcp: support MPTCP_PM_CMD_SUBFLOW_DESTROY
  selftests: mptcp: capture netlink events
  selftests: mptcp: create listeners to receive MPJs
  selftests: mptcp: functional tests for the userspace PM type

 include/uapi/linux/mptcp.h                    |   7 +
 net/mptcp/Makefile                            |   2 +-
 net/mptcp/pm.c                                |   1 +
 net/mptcp/pm_netlink.c                        | 169 ++--
 net/mptcp/pm_userspace.c                      | 415 ++++++++++
 net/mptcp/protocol.c                          |   1 +
 net/mptcp/protocol.h                          |  39 +-
 net/mptcp/subflow.c                           |   2 +-
 tools/testing/selftests/net/mptcp/pm_nl_ctl.c | 645 ++++++++++++++-
 .../selftests/net/mptcp/userspace_pm.sh       | 779 ++++++++++++++++++
 10 files changed, 1997 insertions(+), 63 deletions(-)
 create mode 100644 net/mptcp/pm_userspace.c
 create mode 100755 tools/testing/selftests/net/mptcp/userspace_pm.sh


base-commit: 812de90f114c9234a4ebc80058e71250e552ce5f
--
2.31.1

Re: [PATCH mptcp-next v10 00/14] mptcp: APIs and self-tests for userspace path management
Posted by Mat Martineau 2 years ago
On Thu, 14 Apr 2022, Kishen Maloor wrote:

> This patch series brings together the base functionality
> and new netlink APIs for flexible path management from userspace.
> Further it extends the MPTCP self-testing framework to support the new
> netlink APIs along with the ability to capture MPTCP netlink events
> to aid in functional/behavioral validations. Lastly, it adds a
> self-testing script with a suite of test cases covering the entire
> range of the new userspace path management capabilities.
>
> Note: This series depends on the prior patchset "mptcp: fixes and
> enhancements related to path management".
>
> v5:
> -Primary change over v4 is the reliance on userspace
> managed listener sockets for receiving MPJ requests.
> -Addressed CI reported issues.
>
> v6:
> -Put all distinct userspace PM related code into a separate compilation
> unit: pm_userspace.c.
> -Made a few internal helpers non-static (now declared in protocol.h) to
> facilitate the above change.
> -Use the pm spinlock instead of mptcp_data_lock() to synchronize
> access to the per-msk local_addr_list.
>
> v7:
> -Move userspace PM specific handling from pm_netlink
> into mptcp_userspace_pm_get_local_id()
> and mptcp_userspace_pm_get_flags_and_ifindex_by_id() in pm_userspace.
>
> v8:
> -Add copyright notice to pm_userspace.c.
>
> v9:
> -userspace_pm.sh: Mitigate possible buffering issues with CI.
>
> v10:
> -userspace_pm.sh: Increased sleep time between steps to counter
> any timing issues with capturing events for verifying the tested
> behavior. Might resolve test failures in the CI debug build.
>

Thanks, Kishen. Looks like the timeout changes helped the CI succeed when 
running userspace_pm.sh, so we're good to merge the series to the export 
branch as discussed in the meeting today.

Renewing my tag from v8:

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




> Florian Westphal (2):
>  mptcp: netlink: split mptcp_pm_parse_addr into two functions
>  mptcp: netlink: allow userspace-driven subflow establishment
>
> Kishen Maloor (12):
>  mptcp: allow ADD_ADDR reissuance by userspace PMs
>  mptcp: handle local addrs announced by userspace PMs
>  mptcp: read attributes of addr entries managed by userspace PMs
>  mptcp: netlink: Add MPTCP_PM_CMD_ANNOUNCE
>  selftests: mptcp: support MPTCP_PM_CMD_ANNOUNCE
>  mptcp: netlink: Add MPTCP_PM_CMD_REMOVE
>  selftests: mptcp: support MPTCP_PM_CMD_REMOVE
>  selftests: mptcp: support MPTCP_PM_CMD_SUBFLOW_CREATE
>  selftests: mptcp: support MPTCP_PM_CMD_SUBFLOW_DESTROY
>  selftests: mptcp: capture netlink events
>  selftests: mptcp: create listeners to receive MPJs
>  selftests: mptcp: functional tests for the userspace PM type
>
> include/uapi/linux/mptcp.h                    |   7 +
> net/mptcp/Makefile                            |   2 +-
> net/mptcp/pm.c                                |   1 +
> net/mptcp/pm_netlink.c                        | 169 ++--
> net/mptcp/pm_userspace.c                      | 415 ++++++++++
> net/mptcp/protocol.c                          |   1 +
> net/mptcp/protocol.h                          |  39 +-
> net/mptcp/subflow.c                           |   2 +-
> tools/testing/selftests/net/mptcp/pm_nl_ctl.c | 645 ++++++++++++++-
> .../selftests/net/mptcp/userspace_pm.sh       | 779 ++++++++++++++++++
> 10 files changed, 1997 insertions(+), 63 deletions(-)
> create mode 100644 net/mptcp/pm_userspace.c
> create mode 100755 tools/testing/selftests/net/mptcp/userspace_pm.sh
>
>
> base-commit: 812de90f114c9234a4ebc80058e71250e552ce5f
> --
> 2.31.1
>
>

--
Mat Martineau
Intel

Re: [PATCH mptcp-next v10 00/14] mptcp: APIs and self-tests for userspace path management
Posted by Matthieu Baerts 2 years ago
Hi Kishen, Mat, Paolo,

On 14/04/2022 23:19, Kishen Maloor wrote:
> This patch series brings together the base functionality
> and new netlink APIs for flexible path management from userspace.
> Further it extends the MPTCP self-testing framework to support the new
> netlink APIs along with the ability to capture MPTCP netlink events
> to aid in functional/behavioral validations. Lastly, it adds a
> self-testing script with a suite of test cases covering the entire
> range of the new userspace path management capabilities.

Thank you for these patches and reviews!

I just applied these patches (feat. for net-next next) with Mat's RvB
tag, Paolo's Ack:

New patches for t/upstream:

- c2dcdbadfac0: mptcp: allow ADD_ADDR reissuance by userspace PMs

- 26c71440e307: mptcp: handle local addrs announced by userspace PMs

- 5a865082c99a: mptcp: read attributes of addr entries managed by
userspace PMs

- 899ec4b7d092: mptcp: netlink: split mptcp_pm_parse_addr into two functions

- 37d4d520025a: mptcp: netlink: Add MPTCP_PM_CMD_ANNOUNCE

- 90e75a0f1e7a: selftests: mptcp: support MPTCP_PM_CMD_ANNOUNCE

- 151abf946ec6: mptcp: netlink: Add MPTCP_PM_CMD_REMOVE

- 961b8d01cd00: selftests: mptcp: support MPTCP_PM_CMD_REMOVE

- 68f10488da73: mptcp: netlink: allow userspace-driven subflow establishment

- 04de6ee0fd99: selftests: mptcp: support MPTCP_PM_CMD_SUBFLOW_CREATE

- 337354cbefde: selftests: mptcp: support MPTCP_PM_CMD_SUBFLOW_DESTROY

- feac5b7157cd: selftests: mptcp: capture netlink events

- 802a0fcee8de: selftests: mptcp: create listeners to receive MPJs

- 7a589792c590: selftests: mptcp: functional tests for the userspace PM type

- Results: dd31cb34f82b..f0428dbd45eb (export)

And an extra fix for the CI:

- 6505be1e8a40: Squash to "mptcp: handle local addrs announced by
userspace PMs"
- (no co-dev for that)
- 66af7c7950d4: mptcp: remove dup mptcp_pm_addr_entry
- c14d95c1413b: conflict in
t/mptcp-netlink-allow-userspace-driven-subflow-establishment
- Results: f0428dbd45eb..4fa4540bfc5e (export)

Builds and tests are now in progress:



https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export/20220415T105031

https://github.com/multipath-tcp/mptcp_net-next/actions/workflows/build-validation.yml?query=branch:export

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

Re: [PATCH mptcp-next v10 00/14] mptcp: APIs and self-tests for userspace path management
Posted by Kishen Maloor 2 years ago
Hi Matthieu,

Thanks so much for the merge and for taking care of the other CI fixes - appreciate it!
I had missed those.

-Kishen.

On 4/15/22 3:54 AM, Matthieu Baerts wrote:
> Hi Kishen, Mat, Paolo,
> 
> On 14/04/2022 23:19, Kishen Maloor wrote:
>> This patch series brings together the base functionality
>> and new netlink APIs for flexible path management from userspace.
>> Further it extends the MPTCP self-testing framework to support the new
>> netlink APIs along with the ability to capture MPTCP netlink events
>> to aid in functional/behavioral validations. Lastly, it adds a
>> self-testing script with a suite of test cases covering the entire
>> range of the new userspace path management capabilities.
> 
> Thank you for these patches and reviews!
> 
> I just applied these patches (feat. for net-next next) with Mat's RvB
> tag, Paolo's Ack:
> 
> New patches for t/upstream:
> 
> - c2dcdbadfac0: mptcp: allow ADD_ADDR reissuance by userspace PMs
> 
> - 26c71440e307: mptcp: handle local addrs announced by userspace PMs
> 
> - 5a865082c99a: mptcp: read attributes of addr entries managed by
> userspace PMs
> 
> - 899ec4b7d092: mptcp: netlink: split mptcp_pm_parse_addr into two functions
> 
> - 37d4d520025a: mptcp: netlink: Add MPTCP_PM_CMD_ANNOUNCE
> 
> - 90e75a0f1e7a: selftests: mptcp: support MPTCP_PM_CMD_ANNOUNCE
> 
> - 151abf946ec6: mptcp: netlink: Add MPTCP_PM_CMD_REMOVE
> 
> - 961b8d01cd00: selftests: mptcp: support MPTCP_PM_CMD_REMOVE
> 
> - 68f10488da73: mptcp: netlink: allow userspace-driven subflow establishment
> 
> - 04de6ee0fd99: selftests: mptcp: support MPTCP_PM_CMD_SUBFLOW_CREATE
> 
> - 337354cbefde: selftests: mptcp: support MPTCP_PM_CMD_SUBFLOW_DESTROY
> 
> - feac5b7157cd: selftests: mptcp: capture netlink events
> 
> - 802a0fcee8de: selftests: mptcp: create listeners to receive MPJs
> 
> - 7a589792c590: selftests: mptcp: functional tests for the userspace PM type
> 
> - Results: dd31cb34f82b..f0428dbd45eb (export)
> 
> And an extra fix for the CI:
> 
> - 6505be1e8a40: Squash to "mptcp: handle local addrs announced by
> userspace PMs"
> - (no co-dev for that)
> - 66af7c7950d4: mptcp: remove dup mptcp_pm_addr_entry
> - c14d95c1413b: conflict in
> t/mptcp-netlink-allow-userspace-driven-subflow-establishment
> - Results: f0428dbd45eb..4fa4540bfc5e (export)
> 
> Builds and tests are now in progress:
> 
> 
> 
> https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export/20220415T105031
> 
> https://github.com/multipath-tcp/mptcp_net-next/actions/workflows/build-validation.yml?query=branch:export
> 
> Cheers,
> Matt