How can I monitor real-time traffic (like tcpdump) while running DOCA eth_l2_fwd?

Hi

I’m testing DOCA eth_l2_fwd on my BlueField-2 DPU (DOCA 3.1) and I’d like to know how I can see the traffic in real time — something similar to what tcpdump does.

I’m running the sample like this:

sudo ./doca_eth_l2_fwd -d mlx5_1,mlx5_0 -o 1

The application starts forwarding packets fine, and I can see the RX/TX statistics in the log, for example:

RX-packets: 2304
TX-packets: 0
RX-pps: 22
TX-pps: 0

But I’d like to actually see the packets going through — the headers, MAC addresses, or payloads — to confirm what’s being forwarded.

Is there any recommended way to do that while eth_l2_fwd is running?
Can I use tcpdump on one of the representor interfaces (like pf0hpf, etc.) on the DPU?
Or does DOCA or DPDK have any tool or option to capture packets for debugging?

Any advice or example would be really helpful. Thanks!


Hi Tuanama,

Thank you for posting your query on NVIDIA Community Forum.

The usage of tcpdump depends on whether tcpdump is doing kernel or hardware sniffing.

In software sniffing, packets forwarded to the dpdk/doca app will not be forwarded to the kernel, which is how “tcpdump -i <i/F>” (kernel sniffing) gets the packets. Unfortunately, you cannot use tcpdump kernel sniffing to get packet info if eth_l2_fwd is getting the packets.

However, using hardware sniffing you can still get packets even if they are forwarded to the dpdk/doca app. You will have to use a version of tcpdump that supports hardware sniffing. This typically means building your own tcpdump and then use “tcpdump -i mlx5_0” to sniff the packets, for example.

Thanks,

NVEX Networking Technical Support Team.