From: Martin KaFai Lau <martin.lau@linux.dev>
To: Kui-Feng Lee <sinquersw@gmail.com>, Stanislav Fomichev <sdf@fomichev.me>
Cc: Kui-Feng Lee <thinker.li@gmail.com>,
bpf@vger.kernel.org, ast@kernel.org, song@kernel.org,
kernel-team@meta.com, andrii@kernel.org, kuifeng@meta.com
Subject: Re: [PATCH bpf-next 0/4] monitor network traffic for flaky test cases
Date: Mon, 15 Jul 2024 16:56:15 -0700 [thread overview]
Message-ID: <940fff33-ed2b-41e0-bac6-d388deda9446@linux.dev> (raw)
In-Reply-To: <4c658385-dc3c-46ff-a868-0159edf84dc1@gmail.com>
On 7/15/24 3:07 PM, Kui-Feng Lee wrote:
>
>
> On 7/15/24 14:33, Stanislav Fomichev wrote:
>> On 07/12, Kui-Feng Lee wrote:
>>> Run tcpdump in the background for flaky test cases related to network
>>> features.
>>
>> Have you considered linking against libpcap instead of shelling out
>> to tcpdump? As long as we have this lib installed on the runners
>> (likely?) that should be a bit cleaner than doing tcpdump.. WDYT?
>
> I just checked the script building the root image for vmtest. [1]
> It doesn't install libpcap.
>
> If our approach is to capture the packets in a file, and let developers
> download the file, it would be a simple and straight forward solution.
> If we want a log in text, it would be more complicated to parse
> packets.
>
> Martin & Stanislay,
>
> WDYT about capture packets in a file and using libpcap directly?
> Developers can download the file and parse it with tcpdump locally.
thinking out loud...
Re: libpcap (instead of tcpdump) part. I am not very experienced in libpcap. I
don't have a strong preference. I do hope patch 1 could be more straight forward
that no need to use loops and artificial udp packets to ensure the tcpdump is
fully ready to capture. I assume using libpcap can make this sync part
easier/cleaner (pthread_cond?) and not too much code is needed to use libpcap?
Re: dump to file and download by developer. If I read patch 1 correctly, it only
dumps everything at the end of the test (by calling traffic_monitor_report).
imo, it lost the chronological ordering with other ASSERT_* logs and does not
make a big difference (vs downloading as a file).
The developer needs to go through another exercise to figure out (e.g.) a
captured packet may be related to a ASSERT_* failure by connecting the timestamp
between the ASSERT_* log and the captured packet (afaik, there is a timestamp in
the CI raw log). Ideally, the packet can be logged to stderr/out as soon as it
is captured such that the developer can still sort of relate the packet with the
other ASSERT_*() log around it.
next prev parent reply other threads:[~2024-07-15 23:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-13 5:55 [PATCH bpf-next 0/4] monitor network traffic for flaky test cases Kui-Feng Lee
2024-07-13 5:55 ` [PATCH bpf-next 1/4] selftests/bpf: Add traffic monitor functions Kui-Feng Lee
2024-07-14 0:18 ` Kui-Feng Lee
2024-07-14 15:27 ` kernel test robot
2024-07-13 5:55 ` [PATCH bpf-next 2/4] selftests/bpf: Monitor traffic for tc_redirect/tc_redirect_dtime Kui-Feng Lee
2024-07-13 5:55 ` [PATCH bpf-next 3/4] selftests/bpf: Monitor traffic for sockmap_listen Kui-Feng Lee
2024-07-13 5:55 ` [PATCH bpf-next 4/4] selftests/bpf: Monitor traffic for select_reuseport Kui-Feng Lee
2024-07-13 19:29 ` [PATCH bpf-next 0/4] monitor network traffic for flaky test cases Kui-Feng Lee
2024-07-15 21:33 ` Stanislav Fomichev
2024-07-15 22:07 ` Kui-Feng Lee
2024-07-15 23:56 ` Martin KaFai Lau [this message]
2024-07-16 0:57 ` Kui-Feng Lee
2024-07-16 3:25 ` Stanislav Fomichev
2024-07-16 6:46 ` Kui-Feng Lee
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=940fff33-ed2b-41e0-bac6-d388deda9446@linux.dev \
--to=martin.lau@linux.dev \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=kernel-team@meta.com \
--cc=kuifeng@meta.com \
--cc=sdf@fomichev.me \
--cc=sinquersw@gmail.com \
--cc=song@kernel.org \
--cc=thinker.li@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.