Use 'dpif/set-dp-features' command instead. Signed-off-by: Andy Zhou <az...@ovn.org> --- ofproto/ofproto-dpif-xlate.c | 11 ----------- ofproto/ofproto-dpif-xlate.h | 1 - ofproto/ofproto-dpif.c | 24 ------------------------ tests/ofproto-dpif.at | 4 +--- 4 files changed, 1 insertion(+), 39 deletions(-)
diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c index 44074b37320c..a03c27e5b860 100644 --- a/ofproto/ofproto-dpif-xlate.c +++ b/ofproto/ofproto-dpif-xlate.c @@ -6993,17 +6993,6 @@ xlate_mac_learning_update(const struct ofproto_dpif *ofproto, } void -xlate_disable_dp_clone(const struct ofproto_dpif *ofproto) -{ - struct xlate_cfg *xcfg = ovsrcu_get(struct xlate_cfg *, &xcfgp); - struct xbridge *xbridge = xbridge_lookup(xcfg, ofproto); - - if (xbridge) { - xbridge->support.clone = false; - } -} - -void xlate_set_support(const struct ofproto_dpif *ofproto, const struct dpif_backer_support *support) { diff --git a/ofproto/ofproto-dpif-xlate.h b/ofproto/ofproto-dpif-xlate.h index 916a15c67b5b..a299d109f368 100644 --- a/ofproto/ofproto-dpif-xlate.h +++ b/ofproto/ofproto-dpif-xlate.h @@ -233,7 +233,6 @@ void xlate_mac_learning_update(const struct ofproto_dpif *ofproto, ofp_port_t in_port, struct eth_addr dl_src, int vlan, bool is_grat_arp); -void xlate_disable_dp_clone(const struct ofproto_dpif *); void xlate_set_support(const struct ofproto_dpif *, const struct dpif_backer_support *); diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index ddf0d643bf7b..134fa6d82c09 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -5527,27 +5527,6 @@ disable_datapath_truncate(struct unixctl_conn *conn OVS_UNUSED, } static void -disable_datapath_clone(struct unixctl_conn *conn OVS_UNUSED, - int argc, const char *argv[], - void *aux OVS_UNUSED) -{ - struct ds ds = DS_EMPTY_INITIALIZER; - const char *br = argv[argc -1]; - struct ofproto_dpif *ofproto; - - ofproto = ofproto_dpif_lookup(br); - if (!ofproto) { - unixctl_command_reply_error(conn, "no such bridge"); - return; - } - xlate_disable_dp_clone(ofproto); - udpif_flush(ofproto->backer->udpif); - ds_put_format(&ds, "Datapath clone action disabled for bridge %s", br); - unixctl_command_reply(conn, ds_cstr(&ds)); - ds_destroy(&ds); -} - -static void ofproto_unixctl_dpif_show_dp_features(struct unixctl_conn *conn, int argc, const char *argv[], void *aux OVS_UNUSED) @@ -5627,9 +5606,6 @@ ofproto_unixctl_init(void) unixctl_command_register("dpif/disable-truncate", "", 0, 0, disable_datapath_truncate, NULL); - - unixctl_command_register("dpif/disable-dp-clone", "bridge", 1, 1, - disable_datapath_clone, NULL); } static odp_port_t diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at index 5e1347702aaf..9a08c135b9a5 100644 --- a/tests/ofproto-dpif.at +++ b/tests/ofproto-dpif.at @@ -6784,9 +6784,7 @@ Datapath actions: clone(set(ipv4(src=10.10.10.2,dst=192.168.4.4)),2),clone(set(e ]) dnl Test flow xlate openflow clone action without using datapath clone action. -AT_CHECK([ovs-appctl dpif/disable-dp-clone br0], [0], -[Datapath clone action disabled for bridge br0 -]) +AT_CHECK([ovs-appctl dpif/set-dp-features br0 clone false], [0], [ignore]) AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.10.10.2,dst=10.10.10.1,proto=1,tos=1,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout]) -- 1.8.3.1 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev