SDN

set_queue动作与设置的queue速率不匹配


在mininet上设置好queue速率如下
ovs-vsctl set port s2-eth2 qos=@defaultqos -- --id=@defaultqos create qos type=linux-htb other-config:max-rate=20000000 queues=0=@q0,1=@q1 -- --id=@q0 create queue other-config:min-rate=5000000 other-config:max-rate=5000000 -- --id=@q1 create queue other-config:min-rate=10000000 other-config:max-rate=10000000

第一个queue(id=0)速率5M,第二个queue(id=1)10M。使用floodlight下发流表,在mininet上查看到流表项如下:
cookie=0x0, duration=22.663s, table=0, n_packets=0, n_bytes=0, idle_age=22, priority=0,udp,in_port=1,dl_src=06:bb:08:a9:9a:c1,dl_dst=f2:2f:df:7e:fd:c7,nw_src=10.0.0.4,nw_dst=10.0.0.1,tp_src=42966,tp_dst=5001 actions=set_queue:1,output:2
cookie=0x0, duration=41.394s, table=0, n_packets=0, n_bytes=0, idle_age=41, priority=0,tcp,in_port=1,dl_src=06:bb:08:a9:9a:c1,dl_dst=f2:2f:df:7e:fd:c7,nw_src=10.0.0.4,nw_dst=10.0.0.1,tp_src=46016,tp_dst=5001,tcp_flags=syn actions=set_queue:0,output:2
cookie=0x0, duration=35.456s, table=0, n_packets=0, n_bytes=0, idle_age=35, priority=0,tcp,in_port=1,dl_src=06:bb:08:a9:9a:c1,dl_dst=f2:2f:df:7e:fd:c7,nw_src=10.0.0.4,nw_dst=10.0.0.1,tp_src=46018,tp_dst=5001,tcp_flags=fin|psh|ack actions=set_queue:0,output:2

对UDP,set_queue1,对于TCP,set_queue0。用iperf和iperfudp分别测试tcp和udp速率,结果如下:
mininet> iperf server h1
*** Iperf: testing TCP bandwidth between server and h1
*** Results: ['4.78 Mbits/sec', '5.65 Mbits/sec']

mininet> iperfudp 20m server h1
*** Iperf: testing UDP bandwidth between server and h1
*** Results: ['20m', '4.86 Mbits/sec', '4.86 Mbits/sec']

显示tcp和udp都是5m。但是我设置的udp set_queue 1,对应的应该是10m才对。这是什么原因导致的?跪谢大佬分析一下!=
已邀请:

manml6918

赞同来自:


我可以先给你提供下思路,你先分别查看一下tcp和udp数据流到底走没走队列,走的哪条队列,先把这个确认一下,命令:ovs-ofctl queue-stats。

赞同来自:


今天终于发现了原因,由于forwording模块下发的流表项的priority设置为1,而我没有设置下发流表项的priority导致默认为0,也就是说我设置的set_queue动作得优先级低于forwording模块的优先级,导致始终不会匹配到我的流表项,设置priority=2,就可以解决问题。

柿子 - Zebra Decoder 姿势社区欢乐多

赞同来自:


(o゚v゚)ノ

要回复问题请先登录注册