From patchwork Tue Jul 19 14:12:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladislav Odintsov X-Patchwork-Id: 1658064 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=IdGY3Zle; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LnLQC3ZMgz9sGG for ; Wed, 20 Jul 2022 00:12:51 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 28CA2400F6; Tue, 19 Jul 2022 14:12:49 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 28CA2400F6 Authentication-Results: smtp2.osuosl.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=IdGY3Zle X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hiDeVe-sc7bH; Tue, 19 Jul 2022 14:12:48 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp2.osuosl.org (Postfix) with ESMTPS id 5393D4042B; Tue, 19 Jul 2022 14:12:47 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 5393D4042B Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 1AF97C0033; Tue, 19 Jul 2022 14:12:45 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) by lists.linuxfoundation.org (Postfix) with ESMTP id CDB4DC0033 for ; Tue, 19 Jul 2022 14:12:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 9679F60B9F for ; Tue, 19 Jul 2022 14:12:36 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 9679F60B9F Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=IdGY3Zle X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1Xlrn9wce3oC for ; Tue, 19 Jul 2022 14:12:35 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 27C3560BD9 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by smtp3.osuosl.org (Postfix) with ESMTPS id 27C3560BD9 for ; Tue, 19 Jul 2022 14:12:35 +0000 (UTC) Received: by mail-lj1-x233.google.com with SMTP id r14so2776022ljp.2 for ; Tue, 19 Jul 2022 07:12:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=XbJmKHeHh9DedDk7pcIMeokbZ4Fjp9ljUHsxO1R68ng=; b=IdGY3ZleSIoTuzmHYSVC3dAtw3Z0DZ8w1E6DXM+QszTTRU3mKkKxeGGKHjPV4eLRWd wPVG0upSfBIy/lsayvFEq6Hf3GiewzDHTh+hkHHjDUW/w8xLZtPeXSr2SYOtMhv/7g7f CKYixcEAF+RfXGcJygMgNH0dZz2/GVn08MupvFGfkbaEKo98zsORAhfINJr3c0gqaz2x t/YlkjzWgR3xPw7jPtfInxyI5J287WSOrkeQA4dPXYJwBulKiDirqIhkbq6aZuAW7xez itvhOhk2IfhR/L6s6/hEh1UsSmLmoZVjXHzyIAaLckTBoJrYsUTFKBF/fPOCZ3ZUwLoL Eb+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=XbJmKHeHh9DedDk7pcIMeokbZ4Fjp9ljUHsxO1R68ng=; b=I6pCyAbL2oBC1vcTq+wvvGYVw1urUEM8oGqP1Pabv0jPcBfpbqphbt3HqtKLH4qv3h UtMFCjMEt70pILzHYed5gozVI3NsOEhxqSx1+uiyiFa54AtByQxp57czCf/aMckC9gGp 0wZ8vE8wJzIkXOkZ7b+gKfH7op9ny4UUGE4g/gAxxfqbmNboB+oy+ipROjQc/kXhrfWO Y4Mt/5R+QUmvfY5ldAkwV+NQamVifFRUhsOPKeMomMjDiHqKrW0hqq/4Rs+XhbXMJ470 hBdLMidNeQP4BZkR51UC6kflhJH45GmmkEPl56J4hTjnM+y3rxsZZxUj421tmgIW833Z U61A== X-Gm-Message-State: AJIora+ivedxBd8oT/bZ+r0eyNtI4wrJVfqAf7jpLbDLw01a/8U9N4SX 1jbj4xQkv9z888dO6WACyPKkVs+7uqAl5g== X-Google-Smtp-Source: AGRyM1tLgQVEMKwBnPmqZOn73jFAxQCwR1bZK0jqIa5ej+XTi2n1hyxn8ZmoVuSgqi3csxDMDaMC+w== X-Received: by 2002:a2e:9ac3:0:b0:25d:6f3f:1049 with SMTP id p3-20020a2e9ac3000000b0025d6f3f1049mr15199935ljj.452.1658239952589; Tue, 19 Jul 2022 07:12:32 -0700 (PDT) Received: from ip-10-70-112-12.vpc-1e810be1.internal (c2-178-216-98-9.elastic.cloud.croc.ru. [178.216.98.9]) by smtp.gmail.com with ESMTPSA id v12-20020a2ea60c000000b0025d6895ffa9sm2719698ljp.98.2022.07.19.07.12.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Jul 2022 07:12:31 -0700 (PDT) From: Vladislav Odintsov To: dev@openvswitch.org Date: Tue, 19 Jul 2022 17:12:30 +0300 Message-Id: <20220719141230.3122226-1-odivlad@gmail.com> X-Mailer: git-send-email 2.26.3 MIME-Version: 1.0 Cc: Vladislav Odintsov Subject: [ovs-dev] [PATCH ovn] northd: add support to make l3dgw ports fully distributed 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" This is used when traffic from HW VTEP goes to routable networks and logical switch to which VTEP logical port is attached also needs to support distributed routing features such as NAT and others. Signed-off-by: Vladislav Odintsov --- northd/northd.c | 8 +++++++- ovn-nb.xml | 10 ++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/northd/northd.c b/northd/northd.c index d31cb1688..0be45e22a 100644 --- a/northd/northd.c +++ b/northd/northd.c @@ -1674,6 +1674,12 @@ is_cr_port(const struct ovn_port *op) return op->l3dgw_port; } +static bool +is_distributed(const struct ovn_port *op) +{ + return smap_get_bool(&op->nbrp->options, "distributed", false); +} + static void destroy_routable_addresses(struct ovn_port_routable_addresses *ra) { @@ -10920,7 +10926,7 @@ build_adm_ctrl_flows_for_lrouter_port( ds_clear(match); ds_put_format(match, "eth.dst == %s && inport == %s", op->lrp_networks.ea_s, op->json_key); - if (is_l3dgw_port(op)) { + if (is_l3dgw_port(op) && !is_distributed(op)) { /* Traffic with eth.dst = l3dgw_port->lrp_networks.ea_s * should only be received on the gateway chassis. */ ds_put_format(match, " && is_chassis_resident(%s)", diff --git a/ovn-nb.xml b/ovn-nb.xml index e26afd83c..d4b454791 100644 --- a/ovn-nb.xml +++ b/ovn-nb.xml @@ -2976,6 +2976,16 @@ option.

+ + + If true, indicates, that flow for current LRP in + lr_in_admission must be installed on all chassis, even if it has + associated chassisredirect port. + Usable when traffic from HW VTEP goes to routable networks and logical + switch to which VTEP logical port is attached also needs to support + distributed routing features such as NAT, Load Balancing and others. + Empty value (default) means false. +