[ovs-dev] same wildcard entries exist
Tetsuo NAKAGAWA
nakagawa at mxc.nes.nec.co.jp
Fri Mar 19 11:45:07 UTC 2010
Hi.
I'm using Open vSwitch with master and openflow-1.0 branch
on XenServer 5.5.0.
When same wildcard entries are added continuously twice,
a same wildcard entry is overwritten, so just same wildcard
entries are not left as follows.
# ovs-ofctl add-flow xenbr0 "in_port=1 idle_timeout=0 udp nw_src=192.168.1.1 tp_src=5555 actions=output:1"
# ovs-ofctl add-flow xenbr0 "in_port=1 idle_timeout=0 udp nw_src=192.168.1.1 tp_src=5555 actions=output:1"
# ovs-ofctl dump-flows xenbr0
stats_reply (xid=0x5c06a071): flags=none type=1(flow)
cookie=0, duration_sec=117s, duration_nsec=556000000ns, table_id=1, priority=0, n_packets=967, n_bytes=118165, actions=NORMAL
cookie=0, duration_sec=3s, duration_nsec=672000000ns, table_id=1, priority=32768, n_packets=0, n_bytes=0, udp,in_port=1,nw_src=192.168.1.1,tp_src=5555,actions=output:1
But when a same wildcard entry is added after added a
wildcard entry which has same hash value, 2 of same
wildcard entries are left as follows.
# ovs-ofctl add-flow xenbr0 "in_port=1 idle_timeout=0 udp nw_src=192.168.1.2 tp_src=5555 actions=output:1"
# ovs-ofctl add-flow xenbr0 "in_port=1 idle_timeout=0 udp nw_src=192.168.1.1 tp_src=5555 actions=output:1"
# ovs-ofctl dump-flows xenbr0
stats_reply (xid=0xfcc12a62): flags=none type=1(flow)
cookie=0, duration_sec=249s, duration_nsec=461000000ns, table_id=1, priority=0, n_packets=1221, n_bytes=147372, actions=NORMAL
cookie=0, duration_sec=2s, duration_nsec=79000000ns, table_id=1, priority=32768, n_packets=0, n_bytes=0, udp,in_port=1,nw_src=192.168.1.1,tp_src=5555,actions=output:1
cookie=0, duration_sec=4s, duration_nsec=815000000ns, table_id=1, priority=32768, n_packets=0, n_bytes=0, udp,in_port=1,nw_src=192.168.1.2,tp_src=5555,actions=output:1
cookie=0, duration_sec=135s, duration_nsec=577000000ns, table_id=1, priority=32768, n_packets=0, n_bytes=0, udp,in_port=1,nw_src=192.168.1.1,tp_src=5555,actions=output:1
Same wildcard entries shouldn't exist at all.
I think following patch is need.
diff -ru ./openvswitch-master-20100318.org/lib/classifier.c ./openvswitch-master-20100318/lib/classifier.c
--- ./openvswitch-master-20100318.org/lib/classifier.c 2010-03-18 06:35:56.000000000 +0900
+++ ./openvswitch-master-20100318/lib/classifier.c 2010-03-19 13:46:07.000000000 +0900
@@ -648,7 +648,6 @@
list_replace(&rule->node.list, &pos->node.list);
return pos;
}
- break;
}
}
list_insert(&pos->node.list, &rule->node.list);
There is also same defect in openflow-1.0 branch.
Best regards,
--- Tetsuo NAKAGAWA
More information about the dev
mailing list