Skip to content

Add 'dump_subflow' test in selftests

Gang Yan mptcp 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest5 patches 6 repliesIn review
  2. v27 patches 7 repliesSuperseded
  3. v17 patches 2 repliesSuperseded

Changes in v3 from the cover letter

- Set idaig_ext when 'r' is declared.
- Declare iovlen to 0, and adjust the increment logic.
- Squash patch 3 into patch 4.
- Rename 'subflow_addr' to 'subflow_addrs'
- Remove the comment and declare [ad]ddr on the same line.
- Set id.idiag_cookie[0/1] when r is declared.
- Remove the 'id.idiag_if = 0' because the default value is 0.
- Squash patch 6 into patch 5.
- Add the example of output in commit message.
- Adjust the input of 'mptcp_diag -s' to "saddr:sport daddr:dport" to save a few lines in diag.sh
- In diag.sh, use "mptcp_diag -s '$subflow_line'" instead of the old version, and call 'ss' only once to ensure the safety.
- Fix some error/check/warning problems in CI.
- Put the link of issue into the commit message of patch 5.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5selftests: mptcp: add struct params in mptcp_diagtools/testing/selftests/net/mptcp/mptcp_diag.c+11 -50 replies
2/5selftests: mptcp: refactor send_query parameters for code claritytools/testing/selftests/net/mptcp/mptcp_diag.c+10 -91 reply
3/5selftests: mptcp: refactor NLMSG handling with 'proto'tools/testing/selftests/net/mptcp/mptcp_diag.c+20 -180 replies
4/5selftests: mptcp: add helpers to get subflow_infotools/testing/selftests/net/mptcp/mptcp_diag.c+157 -21 reply
5/5selftests: mptcp: add chk_sublfow in diag.shtools/testing/selftests/net/mptcp/diag.sh+33 -01 reply

Reviews trailers per patch

None of the 5 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchMatthieu Baerts (NGI0)
SeriesR-b
1/5
2/5
3/5
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH mptcp-next v3 0/5] Add 'dump_subflow' test in selftests

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

------
Changelog
v2:
- Fix the CI compiling error.
v3:
- Set idaig_ext when 'r' is declared.
- Declare iovlen to 0, and adjust the increment logic.
- Squash patch 3 into patch 4.
- Rename 'subflow_addr' to 'subflow_addrs'
- Remove the comment and declare [ad]ddr on the same line.
- Set id.idiag_cookie[0/1] when r is declared.
- Remove the 'id.idiag_if = 0' because the default value is 0.
- Squash patch 6 into patch 5.
- Add the example of output in commit message.
- Adjust the input of 'mptcp_diag -s' to "saddr:sport daddr:dport" to save a few lines in diag.sh
- In diag.sh, use "mptcp_diag -s '$subflow_line'" instead of the old version, and call 'ss' only once to ensure the safety.
- Fix some error/check/warning problems in CI.
- Put the link of issue into the commit message of patch 5.

Gang Yan (5):
selftests: mptcp: add struct params in mptcp_diag
selftests: mptcp: refactor send_query parameters for code clarity
selftests: mptcp: refactor NLMSG handling with 'proto'
selftests: mptcp: add helpers to get subflow_info
selftests: mptcp: add chk_sublfow in diag.sh

 tools/testing/selftests/net/mptcp/diag.sh     |  33 +++
 .../testing/selftests/net/mptcp/mptcp_diag.c  | 228 +++++++++++++++---
 2 files changed, 229 insertions(+), 32 deletions(-)
Signature · 1 line
2.43.0