diff mbox

[ovs-dev,clone,optmization,5/7] ofproto-dpif: Remove ofprto/tnl-push-pop command.

Message ID 1500590443-11562-6-git-send-email-azhou@ovn.org
State Superseded
Headers show

Commit Message

Andy Zhou July 20, 2017, 10:40 p.m. UTC
Use dpif/set-dp-features command instead.

Signed-off-by: Andy Zhou <azhou@ovn.org>
---
 ofproto/ofproto-dpif.c  | 34 ----------------------------------
 tests/ofproto-macros.at |  5 ++---
 2 files changed, 2 insertions(+), 37 deletions(-)
diff mbox

Patch

diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
index c4f97edc7ce1..b52a7ea4ca9f 100644
--- a/ofproto/ofproto-dpif.c
+++ b/ofproto/ofproto-dpif.c
@@ -5477,37 +5477,6 @@  ofproto_unixctl_dpif_dump_flows(struct unixctl_conn *conn,
 }
 
 static void
-ofproto_revalidate_all_backers(void)
-{
-    const struct shash_node **backers;
-    int i;
-
-    backers = shash_sort(&all_dpif_backers);
-    for (i = 0; i < shash_count(&all_dpif_backers); i++) {
-        struct dpif_backer *backer = backers[i]->data;
-        backer->need_revalidate = REV_RECONFIGURE;
-    }
-    free(backers);
-}
-
-static void
-disable_tnl_push_pop(struct unixctl_conn *conn OVS_UNUSED, int argc OVS_UNUSED,
-                     const char *argv[], void *aux OVS_UNUSED)
-{
-    if (!strcasecmp(argv[1], "off")) {
-        ofproto_use_tnl_push_pop = false;
-        unixctl_command_reply(conn, "Tunnel push-pop off");
-        ofproto_revalidate_all_backers();
-    } else if (!strcasecmp(argv[1], "on")) {
-        ofproto_use_tnl_push_pop = true;
-        unixctl_command_reply(conn, "Tunnel push-pop on");
-        ofproto_revalidate_all_backers();
-    } else {
-        unixctl_command_reply_error(conn, "Invalid argument");
-    }
-}
-
-static void
 ofproto_unixctl_dpif_show_dp_features(struct unixctl_conn *conn,
                                       int argc, const char *argv[],
                                       void *aux OVS_UNUSED)
@@ -5581,9 +5550,6 @@  ofproto_unixctl_init(void)
                              ofproto_unixctl_dpif_dump_flows, NULL);
     unixctl_command_register("dpif/set-dp-features", "bridge", 1, 3 ,
                              ofproto_unixctl_dpif_set_dp_features, NULL);
-
-    unixctl_command_register("ofproto/tnl-push-pop", "[on]|[off]", 1, 1,
-                             disable_tnl_push_pop, NULL);
 }
 
 static odp_port_t
diff --git a/tests/ofproto-macros.at b/tests/ofproto-macros.at
index 23b032158f50..bbb1c3bee2a3 100644
--- a/tests/ofproto-macros.at
+++ b/tests/ofproto-macros.at
@@ -457,9 +457,8 @@  m4_define([OVS_VSWITCHD_STOP],
    OVS_APP_EXIT_AND_WAIT([ovsdb-server])])
 
 m4_define([OVS_VSWITCHD_DISABLE_TUNNEL_PUSH_POP],
-  [AT_CHECK([ovs-appctl ofproto/tnl-push-pop off], [0], [dnl
-Tunnel push-pop off
-])])
+  [AT_CHECK([ovs-appctl dpif/set-dp-features br0 tnl_push_pop false], [0])
+])
 
 # WAIT_FOR_DUMMY_PORTS(NETDEV_DUMMY_PORT[, NETDEV_DUMMY_PORT...])
 #