From patchwork Fri Jul 21 22:46:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Zhou X-Patchwork-Id: 792361 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xDmFD2ffwz9s72 for ; Sat, 22 Jul 2017 08:50:24 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id A585CBE4; Fri, 21 Jul 2017 22:47:32 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 2C3FFBC0 for ; Fri, 21 Jul 2017 22:47:28 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pg0-f68.google.com (mail-pg0-f68.google.com [74.125.83.68]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id D571317E for ; Fri, 21 Jul 2017 22:47:27 +0000 (UTC) Received: by mail-pg0-f68.google.com with SMTP id g14so1656893pgu.4 for ; Fri, 21 Jul 2017 15:47:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:content-transfer-encoding; bh=2FKkcmEMxuWD6OtK4TNpdsQEZbtIybbsLTqLcw6VsLE=; b=l/OOe+JY1CLcN00feWdLsCMHEFgeuoPDLYcxmyB4ziDiZKmIFsOS7pkvlAnc+O61/D OQ2UxndJJIKbeE8LxfWP5Vte8cPqzyYMBwtHuGGqdPfDJcWl34YhjSwhgWGRZr+96tx/ iM0te2UhwrntrjCLjZNliSEPIpt9JJbhQaJoxk07xOOVUwT99f8ehUIuQu/H4LnDvZm6 TdS+aggpg4itD59MDfQSmD2jnHFqvjv3tDta+tks7zOhpCmH20gTpOMsnYSfLTBjJasQ 6dUoQeWPpRmUJJS17AP/hM5rJQXXXV9dfs8ATXskdBYOqWqWesM4MnW75z1zkeod8VTq oeHw== X-Gm-Message-State: AIVw112SA3k+tE5u9z7rKMvb8iTAiQa5i1Xu/g4MsRNrAtHzL6kCzhMO 4VqrVqjcL7RQb/8v X-Received: by 10.98.52.134 with SMTP id b128mr9000058pfa.49.1500677247441; Fri, 21 Jul 2017 15:47:27 -0700 (PDT) Received: from centos.eng.vmware.com ([208.91.1.34]) by smtp.gmail.com with ESMTPSA id q3sm10019886pgf.69.2017.07.21.15.47.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Jul 2017 15:47:26 -0700 (PDT) From: Andy Zhou To: dev@openvswitch.org Date: Fri, 21 Jul 2017 15:46:31 -0700 Message-Id: <1500677193-28512-6-git-send-email-azhou@ovn.org> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1500677193-28512-1-git-send-email-azhou@ovn.org> References: <1500677193-28512-1-git-send-email-azhou@ovn.org> X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [clone optmization v2 5/7] ofproto-dpif: Remove ofprto/tnl-push-pop command. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org Use dpif/set-dp-features command instead. Signed-off-by: Andy Zhou --- ofproto/ofproto-dpif.c | 34 ---------------------------------- tests/ofproto-macros.at | 5 ++--- 2 files changed, 2 insertions(+), 37 deletions(-) diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 59212dd3cf8e..6ea6837b4360 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -5478,37 +5478,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) @@ -5582,9 +5551,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...]) #