From patchwork Fri Mar 3 23:03:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Maximets X-Patchwork-Id: 1751673 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.137; helo=smtp4.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PT3Rn5wQzz1yWx for ; Sat, 4 Mar 2023 10:03:33 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 9C89441D7E; Fri, 3 Mar 2023 23:03:31 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 9C89441D7E X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9ym81mTMoqip; Fri, 3 Mar 2023 23:03:30 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp4.osuosl.org (Postfix) with ESMTPS id 67FA741CC5; Fri, 3 Mar 2023 23:03:29 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 67FA741CC5 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 397E2C0071; Fri, 3 Mar 2023 23:03:29 +0000 (UTC) X-Original-To: ovs-dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 7049BC0032 for ; Fri, 3 Mar 2023 23:03:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 376788226B for ; Fri, 3 Mar 2023 23:03:27 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 376788226B X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id x-HEUbso5eQv for ; Fri, 3 Mar 2023 23:03:26 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 32FCF80FB8 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by smtp1.osuosl.org (Postfix) with ESMTPS id 32FCF80FB8 for ; Fri, 3 Mar 2023 23:03:25 +0000 (UTC) Received: (Authenticated sender: i.maximets@ovn.org) by mail.gandi.net (Postfix) with ESMTPSA id C922EE0004; Fri, 3 Mar 2023 23:03:22 +0000 (UTC) From: Ilya Maximets To: ovs-dev@openvswitch.org Date: Sat, 4 Mar 2023 00:03:15 +0100 Message-Id: <20230303230315.1816558-1-i.maximets@ovn.org> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Cc: Dumitru Ceara , Ilya Maximets Subject: [ovs-dev] [PATCH ovn] controller: Use ofctrl_add_flow for CT SNAT hairpin flows. 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: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" We no longer use conjunctions for these flows, so no need to try to append them. Fixes: c2f968235241 ("controller: Fix hairpin SNAT flow explosion if hairpin_snat_ip is set.") Signed-off-by: Ilya Maximets Acked-by: Ales Musil --- controller/lflow.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/controller/lflow.c b/controller/lflow.c index 6a98b19e1..003195ae4 100644 --- a/controller/lflow.c +++ b/controller/lflow.c @@ -1746,11 +1746,9 @@ add_lb_ct_snat_hairpin_for_dp(const struct ovn_controller_lb *lb, * datapath match, but it will also match on the less restrictive * general case. Therefore, we set the priority in the * "hairpin_snat_ip" case to be higher than the general case. */ - ofctrl_add_or_append_flow(flow_table, OFTABLE_CT_SNAT_HAIRPIN, - datapath ? 200 : 100, - lb->slb->header_.uuid.parts[0], - dp_match, dp_acts, &lb->slb->header_.uuid, - NX_CTLR_NO_METER, NULL); + ofctrl_add_flow(flow_table, OFTABLE_CT_SNAT_HAIRPIN, + datapath ? 200 : 100, lb->slb->header_.uuid.parts[0], + dp_match, dp_acts, &lb->slb->header_.uuid); } /* Add a ct_snat flow for each VIP of the LB. If this LB does not use