From patchwork Fri Sep 16 23:10:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarno Rajahalme X-Patchwork-Id: 671186 X-Patchwork-Delegate: blp@nicira.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (archives.nicira.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 3sbWHt6RRtz9s2Q for ; Sat, 17 Sep 2016 09:11:38 +1000 (AEST) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 2F574109D0; Fri, 16 Sep 2016 16:11:32 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx1e4.cudamail.com (mx1.cudamail.com [69.90.118.67]) by archives.nicira.com (Postfix) with ESMTPS id E50E4109C7 for ; Fri, 16 Sep 2016 16:11:29 -0700 (PDT) Received: from bar5.cudamail.com (unknown [192.168.21.12]) by mx1e4.cudamail.com (Postfix) with ESMTPS id 3B2371E0334 for ; Fri, 16 Sep 2016 17:11:29 -0600 (MDT) X-ASG-Debug-ID: 1474067488-09eadd353034f160001-byXFYA Received: from mx1-pf1.cudamail.com ([192.168.24.1]) by bar5.cudamail.com with ESMTP id IZtCRSkl53EQbsWT (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Fri, 16 Sep 2016 17:11:28 -0600 (MDT) X-Barracuda-Envelope-From: jarno@ovn.org X-Barracuda-RBL-Trusted-Forwarder: 192.168.24.1 Received: from unknown (HELO relay6-d.mail.gandi.net) (217.70.183.198) by mx1-pf1.cudamail.com with ESMTPS (DHE-RSA-AES256-SHA encrypted); 16 Sep 2016 23:11:28 -0000 Received-SPF: pass (mx1-pf1.cudamail.com: SPF record at ovn.org designates 217.70.183.198 as permitted sender) X-Barracuda-Apparent-Source-IP: 217.70.183.198 X-Barracuda-RBL-IP: 217.70.183.198 Received: from mfilter25-d.gandi.net (mfilter25-d.gandi.net [217.70.178.153]) by relay6-d.mail.gandi.net (Postfix) with ESMTP id B14F3FB8AC; Sat, 17 Sep 2016 01:11:26 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter25-d.gandi.net Received: from relay6-d.mail.gandi.net ([IPv6:::ffff:217.70.183.198]) by mfilter25-d.gandi.net (mfilter25-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id a6HZVfLWEfbV; Sat, 17 Sep 2016 01:11:25 +0200 (CEST) X-Originating-IP: 208.91.1.34 Received: from sc9-mailhost3.vmware.com (unknown [208.91.1.34]) (Authenticated sender: jarno@ovn.org) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 78AFDFB886; Sat, 17 Sep 2016 01:11:24 +0200 (CEST) X-CudaMail-Envelope-Sender: jarno@ovn.org From: Jarno Rajahalme To: dev@openvswitch.org X-CudaMail-Whitelist-To: dev@openvswitch.org X-CudaMail-MID: CM-E1-915068407 X-CudaMail-DTE: 091616 X-CudaMail-Originating-IP: 217.70.183.198 Date: Fri, 16 Sep 2016 16:10:49 -0700 X-ASG-Orig-Subj: [##CM-E1-915068407##][PATCH 1/3] ofproto: Do not signal revalidation for group mods twice. Message-Id: <1474067451-78603-2-git-send-email-jarno@ovn.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1474067451-78603-1-git-send-email-jarno@ovn.org> References: <1474067451-78603-1-git-send-email-jarno@ovn.org> X-Barracuda-Connect: UNKNOWN[192.168.24.1] X-Barracuda-Start-Time: 1474067488 X-Barracuda-Encrypted: ECDHE-RSA-AES256-GCM-SHA384 X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-ASG-Whitelist: Header =?UTF-8?B?eFwtY3VkYW1haWxcLXdoaXRlbGlzdFwtdG8=?= X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 Subject: [ovs-dev] [PATCH 1/3] ofproto: Do not signal revalidation for group mods twice. X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" The new group mod implementation signals revalidation through '->set_tables_version()', so the separate '->group_modify()' is no longer needed. The ofproto-provider API is changed to allow 'group_modify' to be NULL. Fixes: 5d08a275cd ("ofproto: Make groups versioned.") Signed-off-by: Jarno Rajahalme Acked-by: Ben Pfaff --- ofproto/ofproto-dpif.c | 10 +--------- ofproto/ofproto.c | 3 ++- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 0cffca1..63a84a8 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -4549,14 +4549,6 @@ group_destruct(struct ofgroup *group_) ovs_mutex_destroy(&group->stats_mutex); } -static void -group_modify(struct ofgroup *group_) -{ - struct ofproto_dpif *ofproto = ofproto_dpif_cast(group_->ofproto); - - ofproto->backer->need_revalidate = REV_FLOW_TABLE; -} - static enum ofperr group_get_stats(const struct ofgroup *group_, struct ofputil_group_stats *ogs) { @@ -5899,7 +5891,7 @@ const struct ofproto_class ofproto_dpif_class = { group_construct, /* group_construct */ group_destruct, /* group_destruct */ group_dealloc, /* group_dealloc */ - group_modify, /* group_modify */ + NULL, /* group_modify */ group_get_stats, /* group_get_stats */ get_datapath_version, /* get_datapath_version */ }; diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index f89f0ef..e87def7 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -7091,7 +7091,8 @@ ofproto_group_mod_finish(struct ofproto *ofproto, struct ofgroup *new_group = ogm->new_group; struct ofgroup *old_group; - if (new_group && group_collection_n(&ogm->old_groups)) { + if (new_group && group_collection_n(&ogm->old_groups) && + ofproto->ofproto_class->group_modify) { /* Modify a group. */ ovs_assert(group_collection_n(&ogm->old_groups) == 1);