From patchwork Wed May 29 15:56:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ales Musil X-Patchwork-Id: 1941335 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Bf7zdIVs; dkim-atps=neutral Authentication-Results: legolas.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=patchwork.ozlabs.org) 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 ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VqDXJ4539z20Pb for ; Thu, 30 May 2024 01:56:48 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 1249240C99; Wed, 29 May 2024 15:56:44 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id mTsnPTs3mlPz; Wed, 29 May 2024 15:56:43 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=2605:bc80:3010:104::8cd3:938; helo=lists.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org F406A40C09 Authentication-Results: smtp2.osuosl.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Bf7zdIVs Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp2.osuosl.org (Postfix) with ESMTPS id F406A40C09; Wed, 29 May 2024 15:56:42 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id D97F7C0072; Wed, 29 May 2024 15:56:42 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 0466AC0DD2 for ; Wed, 29 May 2024 15:56:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id D85A240111 for ; Wed, 29 May 2024 15:56:39 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id noo7eLdeMzyz for ; Wed, 29 May 2024 15:56:39 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=170.10.129.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=amusil@redhat.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org 4643B4097E Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=none dis=none) header.from=redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 4643B4097E Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp2.osuosl.org (Postfix) with ESMTPS id 4643B4097E for ; Wed, 29 May 2024 15:56:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1716998195; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pG/HA52ADBT+drV+BReuveDCRP6tRNhgMtF/p9R9FcU=; b=Bf7zdIVsTgzitF/P4wbrefivWr4MNEcF6ruXpzIzum6vX9vOFL5ZYymUNvr6buN6sEu7RC TgR9ED1lBPAFh422KE5hlTeDxeJc4Dmu0bcWWR755/QSKbS2OHeGgQ7Hfm0reZh8RP9aur cWuiKa94j2W9NHCEodsMd9oDql5usOg= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-321--pC5-mT8NMaC9Ou0hUw7nQ-1; Wed, 29 May 2024 11:56:32 -0400 X-MC-Unique: -pC5-mT8NMaC9Ou0hUw7nQ-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8067D81227E for ; Wed, 29 May 2024 15:56:32 +0000 (UTC) Received: from amusil.redhat.com (unknown [10.45.225.45]) by smtp.corp.redhat.com (Postfix) with ESMTP id CAD5C492BC6; Wed, 29 May 2024 15:56:31 +0000 (UTC) From: Ales Musil To: dev@openvswitch.org Date: Wed, 29 May 2024 17:56:27 +0200 Message-ID: <20240529155630.478992-1-amusil@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn v2 0/3] Arbitrary match for NAT 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 series adds the ability to have extra match per NAT, this allows the CMS to have more fine-grained control over the NAT action. At the same time it allows to have "duplicate" NATs e.g. multiple SNATs for the same logical_ip as well as multiple DNATs for the same external_ip. There is also priority in addition to the match which controls the evaluation order of the NAT with match, as the priority can be used only in combination with match. Ales Musil (3): nothd: Unify the priority calculation for NAT flows. nb: Add support for match and priority in NAT. northd: Use the NAT match column. northd/northd.c | 97 +++++++------- northd/ovn-northd.8.xml | 31 +++++ ovn-nb.ovsschema | 8 +- ovn-nb.xml | 15 +++ tests/ovn-nbctl.at | 220 +++++++++++++++++++++--------- tests/ovn-northd.at | 79 +++++++++++ tests/system-ovn.at | 272 ++++++++++++++++++++++++++++++++++++++ utilities/ovn-nbctl.8.xml | 14 +- utilities/ovn-nbctl.c | 189 ++++++++++++++++---------- 9 files changed, 736 insertions(+), 189 deletions(-) Acked-by: Mark Michelson