DPDK usage discussions
 help / color / mirror / Atom feed
* [dpdk-users] pktgen: sending / capturing more packets than configured?
@ 2017-02-02  6:22 Peter Keereweer
  2017-02-02 16:59 ` Wiles, Keith
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Keereweer @ 2017-02-02  6:22 UTC (permalink / raw)
  To: users

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

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

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

* Re: [dpdk-users] pktgen: sending / capturing more packets than configured?
  2017-02-02  6:22 [dpdk-users] pktgen: sending / capturing more packets than configured? Peter Keereweer
@ 2017-02-02 16:59 ` Wiles, Keith
  0 siblings, 0 replies; 2+ messages in thread
From: Wiles, Keith @ 2017-02-02 16:59 UTC (permalink / raw)
  To: Peter Keereweer; +Cc: users


> On Feb 2, 2017, at 12:22 AM, Peter Keereweer <peterkeereweer@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

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

end of thread, other threads:[~2017-02-02 16:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-02  6:22 [dpdk-users] pktgen: sending / capturing more packets than configured? Peter Keereweer
2017-02-02 16:59 ` Wiles, Keith

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).