Thanks Andrew.  Sounds like you were able to resolve the issue I was
seeing.  It's late and my brain isn't fully engaged, so when I can
concentrate I'll see about applying your patch for the 3.1 release.

http://tcpreplay.synfin.net/trac/attachment/ticket/180


On 5/15/07, Andrew Edgecombe <[EMAIL PROTECTED]> wrote:
> Aaron Turner wrote:
>
> >On 5/14/07, Andrew Edgecombe <[EMAIL PROTECTED]> wrote:
> >
> >
> >>Hi all,
> >>I've come across an issue when using the -M option on tcpreplay to
> >>specify the outgoing data rate.
> >>
> >>I tend to use tcpreplay to replay pcap files that contain small numbers
> >>of packets, but replay them with -l loops.
> >>The issue that I found was that when replaying pcap files containing
> >>single packets that the -M option would replay at
> >>full speed instead of the requested rate.
> >>
> >>Attached is a (very simple!) patch file against tcpreplay-3.0.1. I've
> >>found this useful as it allows me to set rates for my
> >>single packet pcap files.
> >>
> >>
> >
> >Hi Andrew,
> >
> >I'm going to have to think about this corner case a little more.
> >Unfortunately your patch breaks the common case where people have
> >pcap's with many packets and use the loop option.
> >
> >For the record, the test I ran was:
> >
> >./src/tcpreplay -i en0 -l 3 test/test.pcap
> >
> >should take ~15sec to run (test/test.pcap is about 5 seconds long),
> >but with your patch it took about 5.5sec.
> >
> >-Aaron
> >
> >
> Hi Aaron,
> Sorry about that - I left off the "ymmv" clause :-)
>
> I've had a bit more of a solid look at it and I think that I've got
> something that should work for all cases.
>
> The attached patch is against tcpreplay-3.0.1.
> To apply the patch from within the tcpreplay-3.0.1 directory:
> patch -p1 < tcpreplay-3.0.1.patch2
>
> The results that I'm seeing now:
>
> tcpreplay -i eth0 -q -C -l3 ./test/test.pcap
> Actual: 300 packets (31887 bytes) sent in 15.16 seconds
> Rated: 2125.6 bps, 0.02 Mbps/sec, 20.00 pps
>
> Statistics for network device: eth0
>         Attempted packets:   300
>         Successful packets:  300
>         Failed packets:      0
>         Retried packets:     0
>
> tcpreplay -i eth0 -q -C -l3 -m3 ./test/test.pcap
> Actual: 300 packets (31887 bytes) sent in 5.16 seconds
> Rated: 6355.9 bps, 0.05 Mbps/sec, 59.80 pps
>
> Statistics for network device: eth0
>         Attempted packets:   300
>         Successful packets:  300
>         Failed packets:      0
>         Retried packets:     0
>
> tcpreplay -i eth0 -q -C -l1000000 -M250 singlepkt.pcap
> Actual: 1000000 packets (1024000000 bytes) sent in 31.34 seconds
> Rated: 32995528.0 bps, 251.74 Mbps/sec, 32222.20 pps
>
> Statistics for network device: eth0
>         Attempted packets:   1000000
>         Successful packets:  1000000
>         Failed packets:      0
>         Retried packets:     0
>

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Tcpreplay-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tcpreplay-users

Reply via email to