Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot reset pcap with ratelimiter #240

Closed
Gavindeed opened this issue Apr 3, 2019 · 1 comment
Closed

Cannot reset pcap with ratelimiter #240

Gavindeed opened this issue Apr 3, 2019 · 1 comment

Comments

@Gavindeed
Copy link

Hi,

Currently I try to replay pcap traces using MoonGen. I came across an issue that, if I set rate limiter with the loop option (e.g., using -l -r 10), MoonGen will not reset the pcap trace. If I do not set the rate limiter, everything works well. Here are the detailed outputs:

$ sudo ./build/MoonGen ./examples/pcap/replay-pcap.lua 0 trace/caida16.pcap -r 10 -l
[INFO] 1 device is up.
[Device: id=0] TX: 5.29 Mpps, 2884 Mbit/s (3729 Mbit/s with framing)
[Device: id=0] TX: 4.88 Mpps, 2663 Mbit/s (3443 Mbit/s with framing)
[Device: id=0] TX: 5.48 Mpps, 2993 Mbit/s (3869 Mbit/s with framing)
[Device: id=0] TX: 5.46 Mpps, 2978 Mbit/s (3852 Mbit/s with framing)
[Device: id=0] TX: 5.37 Mpps, 2932 Mbit/s (3792 Mbit/s with framing)
[Device: id=0] TX: 3.60 Mpps, 1964 Mbit/s (2540 Mbit/s with framing)
[Device: id=0] TX: 0.00 Mpps, 0 Mbit/s (0 Mbit/s with framing)
[Device: id=0] TX: 0.00 Mpps, 0 Mbit/s (0 Mbit/s with framing)
[Device: id=0] TX: 0.00 Mpps, 0 Mbit/s (0 Mbit/s with framing)
[Device: id=0] TX: 0.00 Mpps, 0 Mbit/s (0 Mbit/s with framing)
[Device: id=0] TX: 0.00 Mpps, 0 Mbit/s (0 Mbit/s with framing)

$ sudo ./build/MoonGen ./examples/pcap/replay-pcap.lua 0 trace/caida16.pcap -l
[INFO] 1 device is up.
[Device: id=0] TX: 12.83 Mpps, 7004 Mbit/s (9056 Mbit/s with framing)
[Device: id=0] TX: 13.56 Mpps, 7400 Mbit/s (9569 Mbit/s with framing)
[Device: id=0] TX: 14.16 Mpps, 7729 Mbit/s (9994 Mbit/s with framing)
[Device: id=0] TX: 14.16 Mpps, 7730 Mbit/s (9995 Mbit/s with framing)
[Device: id=0] TX: 14.16 Mpps, 7728 Mbit/s (9995 Mbit/s with framing)
[Device: id=0] TX: 14.15 Mpps, 7730 Mbit/s (9995 Mbit/s with framing)
[Device: id=0] TX: 14.16 Mpps, 7728 Mbit/s (9995 Mbit/s with framing)
[Device: id=0] TX: 14.15 Mpps, 7730 Mbit/s (9994 Mbit/s with framing)
[Device: id=0] TX: 14.16 Mpps, 7726 Mbit/s (9992 Mbit/s with framing)
[Device: id=0] TX: 14.15 Mpps, 7730 Mbit/s (9994 Mbit/s with framing)
[Device: id=0] TX: 14.17 Mpps, 7728 Mbit/s (9995 Mbit/s with framing)
[Device: id=0] TX: 14.15 Mpps, 7730 Mbit/s (9994 Mbit/s with framing)
[Device: id=0] TX: 14.16 Mpps, 7728 Mbit/s (9995 Mbit/s with framing)
[Device: id=0] TX: 14.15 Mpps, 7730 Mbit/s (9995 Mbit/s with framing)

I am using the CAIDA16 trace. I also tried other traces, and I got the same result.

Thanks,
Junzhi

@Gavindeed
Copy link
Author

Fix that.
Change line 65 from "if rateLimiter then" to "if rateLimiter and n > 0 then".

Junzhi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant