Hi Sherif, Please include Ryu-devel mailing list.
On 2017年08月09日 18:17, Fahmy Sherif Alaa Salaheldin wrote: > Good Morning Iwase, > > Thanks a lot for the update I will try it asap! But I was curious could you > set queues per port and not per switch? > > In rest_QOS.py doc they say that at each POST curl the the configurations get > overridden! > > Last time when I tried something like, > > curl -X POST -d '{"port_name": "s1-eth1", "type": "linux-htb", "max_rate": > "1000000", "queues": > [{"max_rate": "500000"}, {"min_rate": "800000"}]}, {"port_name": "s1-eth2", > "type": "linux-htb", "max_rate": "2000000", "queues": > [{"max_rate": "600000"}, {"min_rate": "900000"}]}' > http://localhost:8080/qos/queue/0000000000000001 > | jq . > > then request the get $ curl -X GET > http://localhost:8080/qos/queue/0000000000000001 | jq . > > I could only see the queues configured in s1-eth2 (The last one) It seems a bug of rest_qos.py. rest_qos.py stores Queues list of only last one. (rest_qos.py clears all stores Queues list for every POST request...) But Queues on OVS seems to be configured as expected, and can be seen on ovs-vsctl command. e.g.) mininet> sh ovs-vsctl list Queue _uuid : 1724da04-278c-4cba-ba6c-cd00e4f23f67 dscp : [] external_ids : {} other_config : {max-rate="500000"} _uuid : 775211a9-51ec-434f-92e7-38b9aa58864b dscp : [] external_ids : {} other_config : {max-rate="600000"} _uuid : 1a5a5639-29df-4644-9c4e-ce1fcccb8665 dscp : [] external_ids : {} other_config : {min-rate="900000"} _uuid : cb67c45a-1776-4ceb-93b4-75f81a0ea248 dscp : [] external_ids : {} other_config : {min-rate="800000"} mininet> mininet> mininet> sh ovs-vsctl list QoS _uuid : fe6220aa-c44d-4b0b-8f52-2b3228c480c8 external_ids : {} other_config : {max-rate="1000000"} queues : {0=1724da04-278c-4cba-ba6c-cd00e4f23f67, 1=cb67c45a-1776-4ceb-93b4-75f81a0ea248} type : linux-htb _uuid : 9209f7a7-8f53-4d4f-a9b5-d0f3e03780b3 external_ids : {} other_config : {max-rate="2000000"} queues : {0=775211a9-51ec-434f-92e7-38b9aa58864b, 1=1a5a5639-29df-4644-9c4e-ce1fcccb8665} type : linux-htb Thanks, Iwase > > Best, > Sherif > > Ps. > > In the Ryu documentation this is written > > # set a queue to the switches > # POST /qos/queue/{switch-id} > # > # request body format: > # {"port_name":"<name of port>", > # "type": "<linux-htb or linux-other>", > # "max-rate": "<int>", > # "queues":[{"max_rate": "<int>", "min_rate": "<int>"},...]} > # > # Note: This operation override > # previous configurations. > # Note: Queue configurations are available for > # OpenvSwitch. > # Note: port_name is optional argument. > # If does not pass the port_name argument, > # all ports are target for configuration. > > I was wondering if this meant that we cannot configure each port separately. > > For instance if I want to have 2 queues x,y on port s1-eth1 and 2 queues a,b > on port s1-eth2, is that possible? > if yes then in the flow rule what should the "actions" be (since we can only > give "queue" and queue_id)! > > "If I don't give a port_name all ports are target for configuration" does > this mean that there will be a queue on each port? > > Best, > Sherif > > > > > ________________________________________ > De : Iwase Yusuke <iwase.yusu...@gmail.com> > Envoyé : jeudi 20 juillet 2017 08:36 > À : Fahmy Sherif Alaa Salaheldin > Cc : ryu-devel@lists.sourceforge.net > Objet : Re: [Ryu-devel] Queues not shown in get stats/queueconfig --> > Confusion about rest_QOS and rest_OFCTL > > Hi Sherif, > > On my environment (Ryu 4.15, Open vSwitch 2.6.1 and Mininet 2.3.0), I can see > queues via ofctl_rest. > > # Create Queues via rest_qos.py > $ curl -X POST -d '{"port_name": "s1-eth1", "type": "linux-htb", "max_rate": > "1000000", "queues": > [{"max_rate": "500000"}, {"min_rate": "800000"}]}' > http://localhost:8080/qos/queue/0000000000000001 > | jq . > [ > { > "switch_id": "0000000000000001", > "command_result": { > "result": "success", > "details": { > "0": { > "config": { > "max-rate": "500000" > } > }, > "1": { > "config": { > "min-rate": "800000" > } > } > } > } > } > ] > > # Confirm Queues via rest_qos.py > $ curl -X GET http://localhost:8080/qos/queue/0000000000000001 | jq . > [ > { > "switch_id": "0000000000000001", > "command_result": { > "result": "success", > "details": { > "0": { > "config": { > "max-rate": "500000" > } > }, > "1": { > "config": { > "min-rate": "800000" > } > } > } > } > } > ] > > # Confirm Queues via ofctl_rest > $ curl -X GET http://localhost:8080/stats/queueconfig/1/1 | jq . > { > "1": [ > { > "queues": [ > { > "properties": [], > "queue_id": 0, > "port": 1 > }, > { > "properties": [], > "queue_id": 1, > "port": 1 > } > ], > "port": 1 > } > ] > } > > Please note I could not see "properties" for each Queue. > OVS does not seems to send "properties" info on OFPQueueGetConfigReply > message. > > > Thanks, > Iwase > > > On 2017年07月18日 22:31, Fahmy Sherif Alaa Salaheldin wrote: >> Good Afternoon, >> >> >> Simply I followed https://osrg.github.io/ryu-book/en/html/rest_qos.html >> >> >> But then tried to verify that the Queues were added though the rest_OFCTL >> >> >> curl -X GET http://localhost:8080/stats/queueconfig/1/1 >> >> >> and it returned no queues configured. Is this normal? >> >> >> My question is when I configure queues through rest_QOS I HAVE to also >> generate flow rules with >> rest_QOS >> >> >> i.e send my flow rules to >> >> http://localhost:8080/qos/queue/0000000000000001 >> >> Correct? >> >> >> Sherif >> >> >> >> ------------------------------------------------------------------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> >> >> >> _______________________________________________ >> Ryu-devel mailing list >> Ryu-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/ryu-devel >> ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Ryu-devel mailing list Ryu-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ryu-devel