rochafelippe / ostinato

Automatically exported from code.google.com/p/ostinato
GNU General Public License v3.0
0 stars 0 forks source link

Bug: The Pcap transmitter thread sends too many packets. #116

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The Pcap transmitter thread sends too many packets. This happens when a stream 
is composed by a Packet Set that spans multiple `PacketSequence`s and the 
number of packets to be transmitted is equal or greater than two-times the 
Packet Set cardinality.

This is because the transmitter thread loops on the Packet Set, then it moves 
to the next PacketSequence (that has been already transmitted) instead of the 
next Packet Set.

What steps will reproduce the problem?
1. Use the stream attached

What is the expected output? What do you see instead?

Expected: 25500 packets sent
Actual: 37429 packets sent

37429 = 2*(821*15+435) + 821*14 + 435

What version and revision of the product are you using (available in the
About dialog)? On what operating system?
v0.5.1 OS X 10.8.5

Please provide any additional information below.

*** APPLY ***
frameVariableCount = 12750
n = 2, x = 12750, y = 0, burstSize = 12750
ibg  = 0
ibg1 = 0
nb1  = 0
ibg2 = 0
nb2  = 0

ipg  = 2e+06
ipg1 = 2000000
npx1 = 0
npy1 = 0
ipg2 = 2000000
npx2 = 12750
npy2 = 0

*** TRANSMIT ***
packetSequenceList_.size = 16
sendQ[0]: rptCnt = 2, rptSz = 16, usecDelay = 0
sendQ[0]: pkts = 821, usecDuration = 1640000
sendQ[1]: rptCnt = 1, rptSz = 1, usecDelay = 2000
sendQ[1]: pkts = 821, usecDuration = 1640000
sendQ[2]: rptCnt = 1, rptSz = 1, usecDelay = 2000
sendQ[2]: pkts = 821, usecDuration = 1640000
sendQ[3]: rptCnt = 1, rptSz = 1, usecDelay = 2000
sendQ[3]: pkts = 821, usecDuration = 1640000
sendQ[4]: rptCnt = 1, rptSz = 1, usecDelay = 2000
sendQ[4]: pkts = 821, usecDuration = 1640000
sendQ[5]: rptCnt = 1, rptSz = 1, usecDelay = 2000
sendQ[5]: pkts = 821, usecDuration = 1640000
sendQ[6]: rptCnt = 1, rptSz = 1, usecDelay = 2000
sendQ[6]: pkts = 821, usecDuration = 1640000
sendQ[7]: rptCnt = 1, rptSz = 1, usecDelay = 2000
sendQ[7]: pkts = 821, usecDuration = 1640000
sendQ[8]: rptCnt = 1, rptSz = 1, usecDelay = 2000
sendQ[8]: pkts = 821, usecDuration = 1640000
sendQ[9]: rptCnt = 1, rptSz = 1, usecDelay = 2000
sendQ[9]: pkts = 821, usecDuration = 1640000
sendQ[10]: rptCnt = 1, rptSz = 1, usecDelay = 2000
sendQ[10]: pkts = 821, usecDuration = 1640000
sendQ[11]: rptCnt = 1, rptSz = 1, usecDelay = 2000
sendQ[11]: pkts = 821, usecDuration = 1640000
sendQ[12]: rptCnt = 1, rptSz = 1, usecDelay = 2000
sendQ[12]: pkts = 821, usecDuration = 1640000
sendQ[13]: rptCnt = 1, rptSz = 1, usecDelay = 2000
sendQ[13]: pkts = 821, usecDuration = 1640000
sendQ[14]: rptCnt = 1, rptSz = 1, usecDelay = 2000
sendQ[14]: pkts = 821, usecDuration = 1640000
sendQ[15]: rptCnt = 1, rptSz = 1, usecDelay = 2000
sendQ[15]: pkts = 435, usecDuration = 868000
**************************************************
***** run: pcap_sendpacket() has been stubbed
*** Waiting before transmission has been disabled
*** Run stats
*** elapsed: 0.4764 secs
*** pkts: 37429 pps: 7856633
*** Bytes: 37279284 Bps: 7825206549
**************************************************

Original issue reported on code.google.com by buffagio...@gmail.com on 16 Nov 2013 at 7:48

Attachments:

GoogleCodeExporter commented 9 years ago
The patch for the bug:
https://groups.google.com/d/msg/ostinato/PmGedR2HFEY/VY-7vdUeLQgJ

Original comment by buffagio...@gmail.com on 21 Nov 2013 at 12:12

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 447df2c45924.

Original comment by pstav...@gmail.com on 22 Nov 2013 at 1:39