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

Problem about Meter Table #308

Open
ls760008979 opened this issue Aug 16, 2020 · 6 comments
Open

Problem about Meter Table #308

ls760008979 opened this issue Aug 16, 2020 · 6 comments

Comments

@ls760008979
Copy link

When i do the "Example of the operation of QoS by using Meter Table" in this book https://ryu-sdn.org/resources.html, i found that it can ping well between each switch, but when i use iperf to send udp flow, it doesn't connect well, i want to know why this happen? is it for i have not uninstall the Open vSwitch?

@ederlf
Copy link
Collaborator

ederlf commented Aug 17, 2020

It might a problem with TCP offloading.
Try to turn it off in the hosts that generate traffic:

ethtool -K <interface> tx off

@ls760008979
Copy link
Author

It might a problem with TCP offloading.
Try to turn it off in the hosts that generate traffic:

ethtool -K <interface> tx off

It works, but does not show as that book described

@ederlf
Copy link
Collaborator

ederlf commented Aug 17, 2020

What it does not show? Please provide more information.

@ls760008979
Copy link
Author

What it does not show? Please provide more information.

The topo of this example is s1 connect with s2,s3, each with one host,

  1. i set meter in s2
    curl -X POST -d '{"meter_id": "1", "flags": "KBPS", "bands":[{"type":"drop", "rate": "400"}]}' http://localhost:8080/qos/meter/0000000000000002
    curl -X POST -d '{"match": {"ip_dscp": "10"}, "actions":{"meter": "1"}}' http://localhost:8080/qos/rules/0000000000000002
    and use iperf to send udp flow from h2 to h1
    iperf -c 10.0.0.1 -p 5002 -u -b 800K --tos 0x28
    but the bandwidth doesn't limited within 400Kbps

  2. set meter in s2 and s3
    curl -X POST -d '{"match": {"ip_dscp": "10"}, "actions":{"meter": "1"}}' http://localhost:8080/qos/rules/0000000000000003
    curl -X POST -d '{"meter_id": "1", "flags": "KBPS", "bands":[{"type":"DSCP_REMARK", "rate": "400", "prec_level": "1"}]}' http://localhost:8080/qos/meter/0000000000000003
    curl -X POST -d '{"match": {"ip_dscp": "26"}, "actions":{"meter": "2"}}' http://localhost:8080/qos/rules/0000000000000002
    curl -X POST -d '{"meter_id": "2", "flags": "KBPS", "bands":[{"type":"DSCP_REMARK", "rate": "400", "prec_level": "1"}]}' http://localhost:8080/qos/meter/0000000000000002
    and send udp flow to h1
    h3: iperf -c 10.0.0.1 -p 5002 -u -b 600K --tos 0x28
    h2: iperf -c 10.0.0.1 -p 5001 -u -b 600K --tos 0x68
    but these excess traffic are not droped in the same rate
    h2
    h3

@ederlf
Copy link
Collaborator

ederlf commented Aug 18, 2020

I think the issue is related to the refilling rate of the token bucket that enforces the rate.
Give me some time to try a patch I have in mind and test it.

@ederlf
Copy link
Collaborator

ederlf commented Aug 18, 2020

The refill actually seems fine the way it is.
I have tried to reproduce your cases, and the rate is correctly limited under 400Kbps.

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

2 participants