All of lore.kernel.org
 help / color / mirror / Atom feed
* [MPTCP] Re: [PATCH mptcp-next] selftests/mptcp: Capture pcap on both sender and receiver
@ 2020-06-19 15:28 Matthieu Baerts
  0 siblings, 0 replies; 3+ messages in thread
From: Matthieu Baerts @ 2020-06-19 15:28 UTC (permalink / raw)
  To: mptcp

[-- Attachment #1: Type: text/plain, Size: 1328 bytes --]

Hi Mat, Christoph,

On 19/06/2020 05:52, Mat Martineau wrote:
> 
> On Tue, 16 Jun 2020, Matthieu Baerts wrote:
> 
>> 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,...
>>
>> Allow the selftests to capture a pcap on both sides 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:
>>
>>  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.

(...)

> 
> Nice improvement for the capture feature - looks ready to merge!

Thank you for the review and the patch!

Just added at the end of the series (before the two DO-NOT-MERGE patches)

- a4c3a82f66d9: selftests/mptcp: Capture pcap on both sender and receiver

Tests will be launched soon.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [MPTCP] Re: [PATCH mptcp-next] selftests/mptcp: Capture pcap on both sender and receiver
@ 2020-06-19  3:52 Mat Martineau
  0 siblings, 0 replies; 3+ messages in thread
From: Mat Martineau @ 2020-06-19  3:52 UTC (permalink / raw)
  To: mptcp

[-- Attachment #1: Type: text/plain, Size: 2626 bytes --]


On Tue, 16 Jun 2020, Matthieu Baerts wrote:

> 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,...
>
> Allow the selftests to capture a pcap on both sides 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:
>
>  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(a)apple.com>
> Signed-off-by: Christoph Paasch <cpaasch(a)apple.com>
> Signed-off-by: Matthieu Baerts <matthieu.baerts(a)tessares.net>
> ---
>
> Notes:
>    As discussed on IRC, here is the patch I made this morning.
>
> 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.rc0

Nice improvement for the capture feature - looks ready to merge!

Thanks,

--
Mat Martineau
Intel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [MPTCP] Re: [PATCH mptcp-next] selftests/mptcp: Capture pcap on both sender and receiver
@ 2020-06-16 16:06 Matthieu Baerts
  0 siblings, 0 replies; 3+ messages in thread
From: Matthieu Baerts @ 2020-06-16 16:06 UTC (permalink / raw)
  To: mptcp

[-- Attachment #1: Type: text/plain, Size: 3403 bytes --]

Hi Christoph,

On 16/06/2020 17:49, Christoph Paasch wrote:
> 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,...
> 
> Allow the selftests to capture a pcap on both sides so that this
> information is not lost when reproducing.

Thank you for the patch!

I was going to send the same! (because you requested to have this 
capture :) )
Below you can find the difference with what I did:

> 
> Signed-off-by: Christoph Paasch <cpaasch(a)apple.com>
> ---
>   tools/testing/selftests/net/mptcp/mptcp_connect.sh | 9 ++++++---
>   1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
> index acf02e156d20..faf636d1639f 100755
> --- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh
> +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
> @@ -386,9 +386,11 @@ do_transfer()
>   		fi
>   
>   		local capfile="${listener_ns}-${connector_ns}-${cl_proto}-${srv_proto}-${connect_addr}.pcap"
> -
>   		ip netns exec ${listener_ns} tcpdump -i any -s 65535 -B 32768 $capuser -w $capfile > "$capout" 2>&1 &
> -		local cappid=$!
> +		local cappid_listener=$!
> +		local capfile="${connector_ns}-${listener_ns}-${cl_proto}-${srv_proto}-${connect_addr}.pcap"

detail: Here you don't need "local", capfile is already declared as local.

Would it not be better to have the same name but ending with -listener 
or -connector?

In my patch, I did that:


====================== < ======================
@@ -395,10 +395,13 @@ do_transfer()
                         capuser="-Z $SUDO_USER"
                 fi

-               local 
capfile="${listener_ns}-${connector_ns}-${cl_proto}-${srv_proto}-${connect_addr}.pcap"
+               local 
capfile="${rndh}-${listener_ns:0:3}-${connector_ns:0:3}-${cl_proto}-${srv_proto}-${connect_addr}"

-               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 -i any -s 65535 -B 
32768 ${capuser} -w "${capfile}_listener.pcap"  >> "${capout}" 2>&1 &
+               local cappid_listener=$!
+
+               ip netns exec ${connector_ns} tcpdump -i any -s 65535 -B 
32768 ${capuser} -w "${capfile}_connector.pcap" >> "${capout}" 2>&1 &
+               local cappid_connector=$!

                 sleep 1
         fi
====================== < ======================

I shorted listener_ns and connector_ns to only 3 chars: "nsX"

Now that I am thinking about that it would even make more sense with 
"connector_ns" first as it is what we display in the output (the printf 
above):

capfile="${rndh}-${connector_ns0:3}-${listener_ns::0:3}-${cl_proto}-${srv_proto}-${connect_addr}"

WDYT?

> +		ip netns exec ${connector_ns} tcpdump -i any -s 65535 -B 32768 $capuser -w $capfile > "$capout" 2>&1 &

The output should append ${capout} I guess, not to override the previous 
one:

   >> "${capout}"

(but the output is somehow annoying in fact but that's another issue :) )

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-06-19 15:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-19 15:28 [MPTCP] Re: [PATCH mptcp-next] selftests/mptcp: Capture pcap on both sender and receiver Matthieu Baerts
  -- strict thread matches above, loose matches on Subject: below --
2020-06-19  3:52 Mat Martineau
2020-06-16 16:06 Matthieu Baerts

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.