From patchwork Wed Sep 16 03:47:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Han Zhou X-Patchwork-Id: 1364905 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.133; helo=hemlock.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 hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrmK34bfCz9sTQ for ; Wed, 16 Sep 2020 13:48:05 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 089C38733C; Wed, 16 Sep 2020 03:48:03 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id i6e1WjxYeB0T; Wed, 16 Sep 2020 03:48:00 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by hemlock.osuosl.org (Postfix) with ESMTP id 4DB39872DD; Wed, 16 Sep 2020 03:48:00 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 0934DC0864; Wed, 16 Sep 2020 03:48:00 +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 A0D93C0051 for ; Wed, 16 Sep 2020 03:47:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 77A8523100 for ; Wed, 16 Sep 2020 03:47:58 +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 UD071waOIKMz for ; Wed, 16 Sep 2020 03:47:57 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay10.mail.gandi.net (relay10.mail.gandi.net [217.70.178.230]) by silver.osuosl.org (Postfix) with ESMTPS id DCB5122C51 for ; Wed, 16 Sep 2020 03:47:56 +0000 (UTC) Received: from localhost.localdomain.localdomain (unknown [216.113.160.71]) (Authenticated sender: hzhou@ovn.org) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 1B09524000B; Wed, 16 Sep 2020 03:47:51 +0000 (UTC) From: Han Zhou To: dev@openvswitch.org Date: Tue, 15 Sep 2020 20:47:44 -0700 Message-Id: <1600228064-129210-1-git-send-email-hzhou@ovn.org> X-Mailer: git-send-email 2.1.0 Cc: Han Zhou Subject: [ovs-dev] [PATCH ovn] 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 Signed-off-by: Han Zhou Acked-by: Numan Siddique --- controller/lflow.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/controller/lflow.c b/controller/lflow.c index e785866..9a96aac 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,7 +861,7 @@ 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, + expr = convert_match_to_expr(lflow, prereqs, l_ctx_in, l_ctx_out, NULL, &error); if (error) { expr_destroy(prereqs); @@ -924,7 +924,7 @@ 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, + expr = convert_match_to_expr(lflow, prereqs, l_ctx_in, l_ctx_out, &pg_addr_set_ref, &error); if (error) { expr_destroy(prereqs);