Live capture of packets

296 views
Skip to first unread message

aparna.s

unread,
Oct 3, 2016, 12:20:45 PM10/3/16
to TRex Traffic Generator
Hi,

I want to capture packets as and when they're generated. I'm guessing Wireshark live capture will not work since the interfaces are bound to DPDK. Is there any other way of doing this?

Thanks and Regards,
Aparna

steve poston

unread,
Oct 5, 2016, 1:26:47 PM10/5/16
to TRex Traffic Generator, aparn...@gmail.com
Hi Aparma,

The trick I have done is to mirror the packets on another port of my DUT, and then capture them with another linux netdev.

I've only done this to validate that the packets I want t-rex to send are correct, before I disable the mirroring.

Regards,

Steve  

aparna.s

unread,
Oct 5, 2016, 2:30:52 PM10/5/16
to TRex Traffic Generator, aparn...@gmail.com
Hi,

Thanks for the reply. I want to capture the packets that come from the DUT on to TRex, as well as before they're sent to the DUT. Basically, I want all the TRex interfaces to be able to capture packets and I want to do it live, as and when traffic is being generated / processed. With port mirroring, is it possible to mirror a DPDK bound port, and then use Linux utilities like tcpdump on them? Or will the mirrored port also be bound to DPDK? I need the captures to be done at high rates like 10Gbps, so will this be able to cater to it?

And if anyone has any other suggestions / solutions. please let me know.

Thanks and Regards,
Aparna

Itay Marom

unread,
Oct 5, 2016, 4:11:40 PM10/5/16
to aparna.s, TRex Traffic Generator
Hi,

We are currently working on a feature to capture packets at live (RX and prehaps also TX).

However,
we do not plan to support this at high rate.

The current design discussed is that you can define a queue with a limited size, and a policy (cycling buffer, bounded buffer)
and be able to fetch the packets to our Python API.

We are also considering adding the TX as well, but we cannot capture the packets after the hardware, only before.
(no CRC, checksum in hardware and etc. will be present in the capture).

The reason for low rate is that we are forced to direct all packets to a software queue and also fetch it.
(either Python API or HDD dump)
We cannot support this at high rate.

Thanks,
Itay

--
You received this message because you are subscribed to the Google Groups "TRex Traffic Generator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+unsubscribe@googlegroups.com.
To post to this group, send email to trex...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/655256bf-1628-409c-a31e-e53d7dfd2e4c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Itay Marom

Itay Marom

unread,
Oct 5, 2016, 4:17:01 PM10/5/16
to aparna.s, steve poston, TRex Traffic Generator
Hi Steve,

Regarding your comment:
"I've only done this to validate that the packets I want t-rex to send are correct, before I disable the mirroring."

Not sure if you are aware, but we have a simulator mode where you can capture the packets.

try:
./stl-sim -f <profile.py> -c <core_count> -o <out_file.pcap>

this is used for logical validation, and might help with validating TX packets (such as checksum, VM and etc.)

Thanks,
Itay
--
Itay Marom

ido barnea

unread,
Oct 6, 2016, 3:54:05 AM10/6/16
to Itay Marom, aparna.s, TRex Traffic Generator
Hi Aparna,
Just to clarify on what Itay said, because I understand from your question that you missed the point.
The idea is to do the mirror on the DUT (If it is capable of doing that). This is not related to DPDK (or to TRex).
You will still need to connect another port of your DUT to some device which is able to capture at 10G.
There are dedicated commercial tools capable of that. Traffic generator is different product (even commercial ones can not capture at this rate). 

Ido

To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+u...@googlegroups.com.

To post to this group, send email to trex...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages