From patchwork Wed Sep 16 16:05:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Han Zhou X-Patchwork-Id: 1365442 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ovn.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Bs4hk10y0z9sSn for ; Thu, 17 Sep 2020 02:06:13 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 7040A86BCB; Wed, 16 Sep 2020 16:06:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bRWFZrUWheCQ; Wed, 16 Sep 2020 16:06:11 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id 963AA86AAB; Wed, 16 Sep 2020 16:06:11 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 7B142C0859; Wed, 16 Sep 2020 16:06:11 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 58FD6C0051 for ; Wed, 16 Sep 2020 16:06:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 3A8CC27A5D for ; Wed, 16 Sep 2020 16:06:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DKYslU8xbf4P for ; Wed, 16 Sep 2020 16:05:57 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by silver.osuosl.org (Postfix) with ESMTPS id 64AF027A5C for ; Wed, 16 Sep 2020 16:05:52 +0000 (UTC) X-Originating-IP: 73.241.94.255 Received: from localhost.localdomain.localdomain (unknown [73.241.94.255]) (Authenticated sender: hzhou@ovn.org) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 5CECF6000B; Wed, 16 Sep 2020 16:05:46 +0000 (UTC) From: Han Zhou To: dev@openvswitch.org Date: Wed, 16 Sep 2020 09:05:34 -0700 Message-Id: <1600272334-5936-1-git-send-email-hzhou@ovn.org> X-Mailer: git-send-email 2.1.0 Cc: Han Zhou Subject: [ovs-dev] [PATCH ovn v2] lflow.c: Rename function convert_acts_to_expr to convert_match_to_expr. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" The name was misleading because it in fact parses lflow match instead of actions. Fixes: 1213bc8270 ("ovn-controller: Cache logical flow expr matches.") Cc: Numan Siddique Acked-by: Numan Siddique Signed-off-by: Han Zhou Acked-by: Dumitru Ceara --- v1 -> v2: Address Dumitru's comments for the indentation. controller/lflow.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/controller/lflow.c b/controller/lflow.c index e785866..cf5cf9f 100644 --- a/controller/lflow.c +++ b/controller/lflow.c @@ -720,15 +720,15 @@ add_matches_to_flow_table(const struct sbrec_logical_flow *lflow, ofpbuf_uninit(&ofpacts); } -/* Converts the actions and returns the simplified expre tree. +/* Converts the match and returns the simplified expre tree. * The caller should evaluate the conditions and normalize the * expr tree. */ static struct expr * -convert_acts_to_expr(const struct sbrec_logical_flow *lflow, - struct expr *prereqs, - struct lflow_ctx_in *l_ctx_in, - struct lflow_ctx_out *l_ctx_out, - bool *pg_addr_set_ref, char **errorp) +convert_match_to_expr(const struct sbrec_logical_flow *lflow, + struct expr *prereqs, + struct lflow_ctx_in *l_ctx_in, + struct lflow_ctx_out *l_ctx_out, + bool *pg_addr_set_ref, char **errorp) { struct sset addr_sets_ref = SSET_INITIALIZER(&addr_sets_ref); struct sset port_groups_ref = SSET_INITIALIZER(&port_groups_ref); @@ -861,8 +861,8 @@ consider_logical_flow(const struct sbrec_logical_flow *lflow, struct expr *expr = NULL; if (!l_ctx_out->lflow_cache_map) { /* Caching is disabled. */ - expr = convert_acts_to_expr(lflow, prereqs, l_ctx_in, - l_ctx_out, NULL, &error); + expr = convert_match_to_expr(lflow, prereqs, l_ctx_in, + l_ctx_out, NULL, &error); if (error) { expr_destroy(prereqs); ovnacts_free(ovnacts.data, ovnacts.size); @@ -924,8 +924,8 @@ consider_logical_flow(const struct sbrec_logical_flow *lflow, bool pg_addr_set_ref = false; if (!expr) { - expr = convert_acts_to_expr(lflow, prereqs, l_ctx_in, l_ctx_out, - &pg_addr_set_ref, &error); + expr = convert_match_to_expr(lflow, prereqs, l_ctx_in, l_ctx_out, + &pg_addr_set_ref, &error); if (error) { expr_destroy(prereqs); ovnacts_free(ovnacts.data, ovnacts.size);