[dpdk-users] pktgen: sending / capturing more packets than configured?

Wiles, Keith keith.wiles at intel.com
Thu Feb 2 17:59:13 CET 2017


> On Feb 2, 2017, at 12:22 AM, Peter Keereweer <peterkeereweer at hotmail.com> wrote:
> 
> Hi!
> 
> I'am still running some tests with the Load Balancer Sample Application by sending packets with pktgen. I have a setup of 2 servers (Machine A and B in the example below) with each server containing a Intel 10Gbe 82599 NIC (connected to each other). The Load Balancer application has been configured to use 1 core for RX, 1 worker core and 1 TX core. The TX core sends all packets back to the pktgen application. The packets, send back to pktgen by the Load Balancer application, will be captured (by pktgen) and written to a pcap-file.
> 
> So I'm using 2 servers in my test:
> 
> Machine A: pktgen
> Machine B: load_balancer
> 
> This is how I started the pktgen application on Machine A and all commands that I executed:
> 
> A:
> 
>> sudo ./pktgen -c 0x1f -n 3 -- -P -T -m "[2:4].0"
> 
> Pktgen> user.pattern 0 "TIC"
> Pktgen> proto udp 0
> Pktgen> set 0 count 1024
> Pktgen> capture 0 on
> Pktgen> start 0
> Pktgen> user.pattern 0 "TOC"
> Pktgen> start 0
> Pktgen> capture 0 off

Part of the problem could be the TOC packets are on the TX done queue and get reused, but the latest code 3.1.1 should be rewriting the packets before each start. I need to look at user.pattern as it needs to update all of the TX packets when the command is issued. The pattern is a fixed size so I can  see that you may have zero in front, but again I will have to check.

> 
> In pktgen I get all packets (2 x 1024 = 2048 packets) that I have send to the Load Balancer application. These packets are captured and written to disk. I expect to see 1024 'TIC' packets and 1024 'TOC' packets in the pcapfile. But during exploring the pcap file with wireshark, I encountered some weird behavior. This are all packets that I can see in the pcap file (captured by pktgen):
> 
> - [1-1024]    TIC upd packets (1024)
> - [1025-1088] TOC udp packets (64)
> - [1089-1504] TIC udp packets (416) !! (why?)
> - [1505-1568] TOC udp packets (64)
> - [1569-1984] TIC udp packets (416) !! (why?)
> - [1985-2048] TOC udp packets (64)
> -------------------------------------------
> Total: (2048)
> 
> How is it possible that I send 1024 'TIC' packets with pktgen, but if I count all 'TIC' packets in the pcap-file I can see more than 1024 'TIC' packets (and a way less then 1024 'TOC' packets)?
> 
> To give you as much details as possible, this is how I started the Load Balancer application on Machine B:
> 
> B:
> 
>> sudo build/app/load_balancer -c 0xfff -n 4 -- --rx "(0,0,0)" --tx "(0,2)" --w "4" --bsz "(32,32),(64,64),(32,32)"
> 
> Another thing that strikes me is that the data, send in the UDP packets above (containing the message 'TIC' or 'TOC'), is padded with zeros (6 bytes) at the beginning of the message. Are all packets, with user defined messages, padded with zeros?
> 
> I hope someone can help me with this questions!  
> 
> Peter

Regards,
Keith



More information about the users mailing list