[Ryu-devel] Debug Group Table - Round Robin for Select Group Type
Brought to you by:
nz_gizmoguy
|
From: Clément R. <rau...@gm...> - 2015-03-12 16:17:55
|
Hi,
Is there a way to see if a group entry has been used (i.e. if a packet
has been sent to this entry) and which bucket action has been
selected?
Because I'm experiencing something weird with a group.
Packets towards 11.0.0.2 (with vlan tag to 1) arrive at switch 6 and I
wrote a group entry to match them.
curl -X POST -d '{
"dpid": 6,
"type": "SELECT",
"group_id": 1,
"buckets": [
{
"weight": 1,
"watch_port": 1,
"actions": [
{
"type": "OUTPUT",
"port": 1
}
]
},
{
"weight": 1,
"watch_port": 2,
"actions": [
{
"type": "OUTPUT",
"port": 2
}
]
},
{
"weight": 1,
"watch_port": 3,
"actions": [
{
"type": "OUTPUT",
"port": 3
}
]
},
{
"weight": 1,
"watch_port": 4,
"actions": [
{
"type": "OUTPUT",
"port": 4
}
]
}
]
}' http://localhost:8080/stats/groupentry/add
curl -X POST -d '{
"dpid": 6,
"cookie": 1,
"cookie_mask": 1,
"table_id": 0,
"idle_timeout": 0,
"hard_timeout": 0,
"priority": 11112,
"flags": 1,
"match":{
"nw_dst": "11.0.0.2",
"eth_type": 2048,
"vlan_vid": 1
},
"actions":[
{
"type":"GROUP",
"group_id": 1
}
]
}' http://localhost:8080/stats/flowentry/add
But when I inspect with wireshark the packets are not sent to any
outport and I don't understand why.
I wrote a flow entry to see if I was matching correctly on them:
curl -X POST -d '{
"dpid": 6,
"cookie": 1,
"cookie_mask": 1,
"table_id": 0,
"idle_timeout": 0,
"hard_timeout": 0,
"priority": 11113,
"flags": 1,
"match":{
"nw_dst": "11.0.0.2",
"eth_type": 2048,
"vlan_vid": 1
},
"actions":[
{
"type":"OUTPUT",
"port": 4
}
]
}' http://localhost:8080/stats/flowentry/add
And it worked, after adding this entry all packets were sent to outport 4.
So I guess there is a problem with the group that I wrote but I don't
know what...
What is the standard behaviour for a select group type?
>From the documentation I understood that it's a round robin mechanism
but when I investigate it it looks like all the packets are always
taking the first bucket (live).
How can I achieve a round robin behaviour then? I thought that I just
need to put the same weight to each action bucket.
Best,
Clément
|