It's not entirely clear why someone would want to delete the flows associated with only one bridge and not be fine with simply using ovs-dpctl del-flows to get all of them. Additionally, this will be hard to implement cleanly in the future, so this patch removes it.
Signed-off-by: Ethan Jackson <et...@nicira.com> --- ofproto/ofproto-dpif.c | 22 ---------------------- tests/ofproto-dpif.at | 30 ------------------------------ 2 files changed, 52 deletions(-) diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 0c95cfa..9dd745b 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -5769,26 +5769,6 @@ ofproto_unixctl_dpif_dump_flows(struct unixctl_conn *conn, } static void -ofproto_unixctl_dpif_del_flows(struct unixctl_conn *conn, - int argc OVS_UNUSED, const char *argv[], - void *aux OVS_UNUSED) -{ - struct ds ds = DS_EMPTY_INITIALIZER; - struct ofproto_dpif *ofproto; - - ofproto = ofproto_dpif_lookup(argv[1]); - if (!ofproto) { - unixctl_command_reply_error(conn, "no such bridge"); - return; - } - - flush(&ofproto->up); - - unixctl_command_reply(conn, ds_cstr(&ds)); - ds_destroy(&ds); -} - -static void ofproto_dpif_unixctl_init(void) { static bool registered; @@ -5817,8 +5797,6 @@ ofproto_dpif_unixctl_init(void) NULL); unixctl_command_register("dpif/dump-flows", "bridge", 1, 1, ofproto_unixctl_dpif_dump_flows, NULL); - unixctl_command_register("dpif/del-flows", "bridge", 1, 1, - ofproto_unixctl_dpif_del_flows, NULL); unixctl_command_register("dpif/dump-megaflows", "bridge", 1, 1, ofproto_unixctl_dpif_dump_megaflows, NULL); unixctl_command_register("dpif/disable-megaflows", "", 0, 0, diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at index a1d8466..f114506 100644 --- a/tests/ofproto-dpif.at +++ b/tests/ofproto-dpif.at @@ -2381,36 +2381,6 @@ skb_priority(0),in_port(3),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0 OVS_VSWITCHD_STOP AT_CLEANUP -AT_SETUP([ofproto-dpif - ovs-appctl dpif/del-flows]) -OVS_VSWITCHD_START([add-br br1 -- \ - set bridge br1 datapath-type=dummy fail-mode=secure]) -ADD_OF_PORTS([br0], [1], [2]) -ADD_OF_PORTS([br1], [3]) - -AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)']) -AT_CHECK([ovs-appctl netdev-dummy/receive p2 'in_port(2),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:05),eth_type(0x0800),ipv4(src=192.168.0.2,dst=192.168.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=0,code=0)']) -AT_CHECK([ovs-appctl netdev-dummy/receive p3 'in_port(3),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)']) - -AT_CHECK([ovs-appctl dpif/dump-flows br0 | sort | STRIP_USED], [0], [dnl -skb_priority(0),in_port(1),eth_type(0x0800),ipv4(src=192.168.0.1/0.0.0.0,dst=192.168.0.2/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff), packets:0, bytes:0, used:0.0s, actions:userspace(pid=0,slow_path(controller)) -skb_priority(0),in_port(2),eth_type(0x0800),ipv4(src=192.168.0.2/0.0.0.0,dst=192.168.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff), packets:0, bytes:0, used:0.0s, actions:userspace(pid=0,slow_path(controller)) -]) - -AT_CHECK([ovs-appctl dpif/dump-flows br1 | sort | STRIP_USED], [0], [dnl -skb_priority(0),in_port(3),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff), packets:0, bytes:0, used:0.0s, actions:userspace(pid=0,slow_path(controller)) -]) - -AT_CHECK([ovs-appctl dpif/del-flows br0]) -AT_CHECK([ovs-appctl dpif/dump-flows br0 | sort | STRIP_USED], [0], [dnl -]) - -AT_CHECK([ovs-appctl dpif/dump-flows br1 | sort | STRIP_USED], [0], [dnl -skb_priority(0),in_port(3),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff), packets:0, bytes:0, used:0.0s, actions:userspace(pid=0,slow_path(controller)) -]) - -OVS_VSWITCHD_STOP -AT_CLEANUP - AT_SETUP([ofproto-dpif - patch ports]) OVS_VSWITCHD_START([add-br br1 \ -- set bridge br1 datapath-type=dummy fail-mode=secure \ -- 1.8.1.2 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev