* [PATCH net-next] selftests: mptcp: capture pcap on both sides
@ 2020-07-06 12:44 Matthieu Baerts
2020-07-06 19:47 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Matthieu Baerts @ 2020-07-06 12:44 UTC (permalink / raw)
To: netdev
Cc: Matthieu Baerts, Christoph Paasch, Mat Martineau,
David S. Miller, Jakub Kicinski, Shuah Khan, mptcp,
linux-kselftest, linux-kernel
When investigating performance issues that involve latency / loss /
reordering it is useful to have the pcap from the sender-side as it
allows to easier infer the state of the sender's congestion-control,
loss-recovery, etc.
Allow the selftests to capture a pcap on both sender and receiver so
that this information is not lost when reproducing.
This patch also improves the file names. Instead of:
ns4-5ee79a56-X4O6gS-ns3-5ee79a56-X4O6gS-MPTCP-MPTCP-10.0.3.1.pcap
We now have something like for the same test:
5ee79a56-X4O6gS-ns3-ns4-MPTCP-MPTCP-10.0.3.1-10030-connector.pcap
5ee79a56-X4O6gS-ns3-ns4-MPTCP-MPTCP-10.0.3.1-10030-listener.pcap
It was a connection from ns3 to ns4, better to start with ns3 then. The
port is also added, easier to find the trace we want.
Co-developed-by: Christoph Paasch <cpaasch@apple.com>
Signed-off-by: Christoph Paasch <cpaasch@apple.com>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
---
tools/testing/selftests/net/mptcp/mptcp_connect.sh | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
index 8f7145c413b9..c0589e071f20 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
@@ -395,10 +395,14 @@ do_transfer()
capuser="-Z $SUDO_USER"
fi
- local capfile="${listener_ns}-${connector_ns}-${cl_proto}-${srv_proto}-${connect_addr}.pcap"
+ local capfile="${rndh}-${connector_ns:0:3}-${listener_ns:0:3}-${cl_proto}-${srv_proto}-${connect_addr}-${port}"
+ local capopt="-i any -s 65535 -B 32768 ${capuser}"
- ip netns exec ${listener_ns} tcpdump -i any -s 65535 -B 32768 $capuser -w $capfile > "$capout" 2>&1 &
- local cappid=$!
+ ip netns exec ${listener_ns} tcpdump ${capopt} -w "${capfile}-listener.pcap" >> "${capout}" 2>&1 &
+ local cappid_listener=$!
+
+ ip netns exec ${connector_ns} tcpdump ${capopt} -w "${capfile}-connector.pcap" >> "${capout}" 2>&1 &
+ local cappid_connector=$!
sleep 1
fi
@@ -423,7 +427,8 @@ do_transfer()
if $capture; then
sleep 1
- kill $cappid
+ kill ${cappid_listener}
+ kill ${cappid_connector}
fi
local duration
--
2.27.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] selftests: mptcp: capture pcap on both sides
2020-07-06 12:44 [PATCH net-next] selftests: mptcp: capture pcap on both sides Matthieu Baerts
@ 2020-07-06 19:47 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-07-06 19:47 UTC (permalink / raw)
To: matthieu.baerts
Cc: netdev, cpaasch, mathew.j.martineau, kuba, shuah, mptcp,
linux-kselftest, linux-kernel
From: Matthieu Baerts <matthieu.baerts@tessares.net>
Date: Mon, 6 Jul 2020 14:44:08 +0200
> When investigating performance issues that involve latency / loss /
> reordering it is useful to have the pcap from the sender-side as it
> allows to easier infer the state of the sender's congestion-control,
> loss-recovery, etc.
>
> Allow the selftests to capture a pcap on both sender and receiver so
> that this information is not lost when reproducing.
>
> This patch also improves the file names. Instead of:
>
> ns4-5ee79a56-X4O6gS-ns3-5ee79a56-X4O6gS-MPTCP-MPTCP-10.0.3.1.pcap
>
> We now have something like for the same test:
>
> 5ee79a56-X4O6gS-ns3-ns4-MPTCP-MPTCP-10.0.3.1-10030-connector.pcap
> 5ee79a56-X4O6gS-ns3-ns4-MPTCP-MPTCP-10.0.3.1-10030-listener.pcap
>
> It was a connection from ns3 to ns4, better to start with ns3 then. The
> port is also added, easier to find the trace we want.
>
> Co-developed-by: Christoph Paasch <cpaasch@apple.com>
> Signed-off-by: Christoph Paasch <cpaasch@apple.com>
> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Applied, thank you.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-06 19:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-06 12:44 [PATCH net-next] selftests: mptcp: capture pcap on both sides Matthieu Baerts
2020-07-06 19:47 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).