On Mon, Nov 11, 2013 at 09:40:01PM +0800, chen zhang wrote:
> I'm trying to implement qos on mininet with 1.11.0 ovs through openflow13,i
> suceed to configure qos && queue(id=1) on eth1(id=1), and the flow_mod with
> "out_put:1"&&"set_queue:1" actions is passed from the controller to the
> switch.But it doesn't work for specified pkts...using "ovs-ofctl -O
> OpenFlow13 queue-stats",i find the queue 1 on eth1 configured,but the rx &&
> tx packets is 0,while queue 0 on eth1 recieve many pkts.(the queue 0 on any
> port is the default queue with no limits,right?)
> Why that?Does ovs supports "set_queue" action?Must "set_queue" be
> companied with "out_put" action?
OVS does support set_queue.
How did you configure queues?
Did you read the FAQ?
Q: How do I configure Quality of Service (QoS)?
A: Suppose that you want to set up bridge br0 connected to physical
Ethernet port eth0 (a 1 Gbps device) and virtual machine interfaces
vif1.0 and vif2.0, and that you want to limit traffic from vif1.0
to eth0 to 10 Mbps and from vif2.0 to eth0 to 20 Mbps. Then, you
could configure the bridge this way:
ovs-vsctl -- \
add-br br0 -- \
add-port br0 eth0 -- \
add-port br0 vif1.0 -- set interface vif1.0 ofport_request=5 -- \
add-port br0 vif2.0 -- set interface vif2.0 ofport_request=6 -- \
set port eth0 qos=@newqos -- \
--id=@newqos create qos type=linux-htb \
other-config:max-rate=1000000000 \
queues:123=@vif10queue \
queues:234=@vif20queue -- \
--id=@vif10queue create queue other-config:max-rate=10000000 -- \
--id=@vif20queue create queue other-config:max-rate=20000000
At this point, bridge br0 is configured with the ports and eth0 is
configured with the queues that you need for QoS, but nothing is
actually directing packets from vif1.0 or vif2.0 to the queues that
we have set up for them. That means that all of the packets to
eth0 are going to the "default queue", which is not what we want.
We use OpenFlow to direct packets from vif1.0 and vif2.0 to the
queues reserved for them:
ovs-ofctl add-flow br0 in_port=5,actions=set_queue:123,normal
ovs-ofctl add-flow br0 in_port=6,actions=set_queue:234,normal
Each of the above flows matches on the input port, sets up the
appropriate queue (123 for vif1.0, 234 for vif2.0), and then
executes the "normal" action, which performs the same switching
that Open vSwitch would have done without any OpenFlow flows being
present. (We know that vif1.0 and vif2.0 have OpenFlow port
numbers 5 and 6, respectively, because we set their ofport_request
columns above. If we had not done that, then we would have needed
to find out their port numbers before setting up these flows.)
Now traffic going from vif1.0 or vif2.0 to eth0 should be
rate-limited.
By the way, if you delete the bridge created by the above commands,
with:
ovs-vsctl del-br br0
then that will leave one unreferenced QoS record and two
unreferenced Queue records in the Open vSwich database. One way to
clear them out, assuming you don't have other QoS or Queue records
that you want to keep, is:
ovs-vsctl -- --all destroy QoS -- --all destroy Queue
If you do want to keep some QoS or Queue records, or the Open
vSwitch you are using is older than version 1.8 (which added the
--all option), then you will have to destroy QoS and Queue records
individually.
_______________________________________________
discuss mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/discuss