[mptcp-next v2 0/7] Add 'dump_subflow' test in selftests

Gang Yan posted 7 patches 8 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/cover.1744793332.git.yangang@kylinos.cn
There is a newer version of this series
tools/testing/selftests/net/mptcp/diag.sh     |  55 +++++
.../testing/selftests/net/mptcp/mptcp_diag.c  | 223 +++++++++++++++---
2 files changed, 248 insertions(+), 30 deletions(-)
[mptcp-next v2 0/7] Add 'dump_subflow' test in selftests
Posted by Gang Yan 8 months ago
The 'subflow_get_info_size' is called only in 'inet_sk_attr_size', and
the only calltrace is that 'tcp_diag_dump_one'->'inet_diag_dump_one_icsk'
->'inet_sk_attr_size'.

So It's necessary to add 'get_subflow_info' in mptcp_diag.c to cover this
function. Given a specific TCP connection, it is possible to judge if
it is a MPTCP subflow by 'INET_ULP_INFO_MPTCP' and print 'subflow_info'.

Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/524

------
Changelog
  v2:
    - Fix the CI compiling error.


Gang Yan (7):
  selftests: mptcp: add struct params in mptcp_diag
  selftests: mptcp: refactor send_query parameters for code clarity
  selftests: mptcp: refine the 'iovlen' handling logic
  selftests: mptcp: refactor NLMSG handling with 'proto'
  selftests: mptcp: add a helper to get subflow_info
  selftests: mptcp: add a helper to print subflow_info
  selftests: mptcp: add chk_sublfow in diag.sh

 tools/testing/selftests/net/mptcp/diag.sh     |  55 +++++
 .../testing/selftests/net/mptcp/mptcp_diag.c  | 223 +++++++++++++++---
 2 files changed, 248 insertions(+), 30 deletions(-)

-- 
2.25.1
Re: [mptcp-next v2 0/7] Add 'dump_subflow' test in selftests
Posted by Matthieu Baerts 8 months ago
Hi Gang,

On 16/04/2025 10:59, Gang Yan wrote:
> The 'subflow_get_info_size' is called only in 'inet_sk_attr_size', and
> the only calltrace is that 'tcp_diag_dump_one'->'inet_diag_dump_one_icsk'
> ->'inet_sk_attr_size'.
> 
> So It's necessary to add 'get_subflow_info' in mptcp_diag.c to cover this
> function. Given a specific TCP connection, it is possible to judge if
> it is a MPTCP subflow by 'INET_ULP_INFO_MPTCP' and print 'subflow_info'.

Thank you for looking at this. I have few minor comments, please check
my other replies.

> Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/524

Can you add this line in the last patch as well please? So the ticket
will be automatically closed when the patches will be applied.


Something else: can you make sure to keep the "PATCH" prefix from the
subjects? I guess you used:

  git send-email --subject-prefix mptcp-next

instead of:

  git send-email --subject-prefix "PATCH mptcp-next"

Do not hesitate to use b4 [1] to send patches, it is helpful not to
forget things when sending patches by email. (Just don't use 'b4 prep
--auto-to-cc' when submitting patches for MPTCP)

[1] https://b4.docs.kernel.org

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.
Re: [mptcp-next v2 0/7] Add 'dump_subflow' test in selftests
Posted by MPTCP CI 8 months ago
Hi Gang,

Thank you for your modifications, that's great!

Our CI did some validations and here is its report:

- KVM Validation: normal: Success! ✅
- KVM Validation: debug: Success! ✅
- KVM Validation: btf-normal (only bpftest_all): Success! ✅
- KVM Validation: btf-debug (only bpftest_all): Success! ✅
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/14489098858

Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/1fd8c63c0c7f
Patchwork: https://patchwork.kernel.org/project/mptcp/list/?series=953894


If there are some issues, you can reproduce them using the same environment as
the one used by the CI thanks to a docker image, e.g.:

    $ cd [kernel source code]
    $ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
        --pull always mptcp/mptcp-upstream-virtme-docker:latest \
        auto-normal

For more details:

    https://github.com/multipath-tcp/mptcp-upstream-virtme-docker


Please note that despite all the efforts that have been already done to have a
stable tests suite when executed on a public CI like here, it is possible some
reported issues are not due to your modifications. Still, do not hesitate to
help us improve that ;-)

Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)