From patchwork Mon Sep 7 06:45: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: 1358614 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 4BlJht3ps8z9sSP for ; Mon, 7 Sep 2020 16:46:22 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 9E08A87089; Mon, 7 Sep 2020 06:46:17 +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 4ASieV9UaFCV; Mon, 7 Sep 2020 06:46:14 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by hemlock.osuosl.org (Postfix) with ESMTP id 272618708D; Mon, 7 Sep 2020 06:46:14 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 018B8C0893; Mon, 7 Sep 2020 06:46:14 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 19AB3C0859 for ; Mon, 7 Sep 2020 06:46:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 0BB5B86225 for ; Mon, 7 Sep 2020 06:46:10 +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 qnshjICUyp2z for ; Mon, 7 Sep 2020 06:46:08 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [217.70.178.231]) by whitealder.osuosl.org (Postfix) with ESMTPS id 7A6C886156 for ; Mon, 7 Sep 2020 06:46:08 +0000 (UTC) Received: from localhost.localdomain.localdomain (unknown [73.241.94.255]) (Authenticated sender: hzhou@ovn.org) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 19ABA10000A; Mon, 7 Sep 2020 06:46:04 +0000 (UTC) From: Han Zhou To: dev@openvswitch.org Date: Sun, 6 Sep 2020 23:45:34 -0700 Message-Id: <1599461142-84752-2-git-send-email-hzhou@ovn.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1599461142-84752-1-git-send-email-hzhou@ovn.org> References: <1599461142-84752-1-git-send-email-hzhou@ovn.org> Cc: Han Zhou Subject: [ovs-dev] [PATCH ovn v2 1/9] ofctrl: change ofctrl_dup_flow to module internal function 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" Signed-off-by: Han Zhou --- controller/ofctrl.c | 8 +++++--- controller/ofctrl.h | 2 -- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/controller/ofctrl.c b/controller/ofctrl.c index b8a9c2d..919db6d 100644 --- a/controller/ofctrl.c +++ b/controller/ofctrl.c @@ -169,6 +169,8 @@ static struct ofpbuf *encode_meter_mod(const struct ofputil_meter_mod *); static void ovn_installed_flow_table_clear(void); static void ovn_installed_flow_table_destroy(void); +static struct ovn_flow *ovn_flow_dup(struct ovn_flow *source); + static void ofctrl_recv(const struct ofp_header *, enum ofptype); @@ -787,8 +789,8 @@ ovn_flow_match_hash(const struct ovn_flow *f) } /* Duplicate an ovn_flow structure. */ -struct ovn_flow * -ofctrl_dup_flow(struct ovn_flow *src) +static struct ovn_flow * +ovn_flow_dup(struct ovn_flow *src) { struct ovn_flow *dst = xmalloc(sizeof *dst); dst->table_id = src->table_id; @@ -1291,7 +1293,7 @@ ofctrl_put(struct ovn_desired_flow_table *flow_table, ovn_flow_log(d, "adding installed"); /* Copy 'd' from 'flow_table' to installed_flows. */ - struct ovn_flow *new_node = ofctrl_dup_flow(d); + struct ovn_flow *new_node = ovn_flow_dup(d); hmap_insert(&installed_flows, &new_node->match_hmap_node, new_node->match_hmap_node.hash); } diff --git a/controller/ofctrl.h b/controller/ofctrl.h index 21d2ce6..37f06db 100644 --- a/controller/ofctrl.h +++ b/controller/ofctrl.h @@ -56,8 +56,6 @@ void ofctrl_wait(void); void ofctrl_destroy(void); int64_t ofctrl_get_cur_cfg(void); -struct ovn_flow *ofctrl_dup_flow(struct ovn_flow *source); - void ofctrl_ct_flush_zone(uint16_t zone_id); char *ofctrl_inject_pkt(const struct ovsrec_bridge *br_int,