From patchwork Fri May 3 07:26:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ales Musil X-Patchwork-Id: 1930948 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=TL2WWH4t; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.138; helo=smtp1.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (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 4VW2RZ19Clz1ydX for ; Fri, 3 May 2024 17:26:32 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 575F082EF0; Fri, 3 May 2024 07:26:30 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 3mHo_WHc5V-q; Fri, 3 May 2024 07:26:29 +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 smtp1.osuosl.org 6B96982ACA Authentication-Results: smtp1.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=TL2WWH4t Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp1.osuosl.org (Postfix) with ESMTPS id 6B96982ACA; Fri, 3 May 2024 07:26:29 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 0B93DC0077; Fri, 3 May 2024 07:26:29 +0000 (UTC) X-Original-To: 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 AA149C0037 for ; Fri, 3 May 2024 07:26:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 8B9AC82ACA for ; Fri, 3 May 2024 07:26:27 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 22EcPbDf8dhZ for ; Fri, 3 May 2024 07:26:27 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=170.10.133.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=amusil@redhat.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org B96148294A Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=none dis=none) header.from=redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org B96148294A Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp1.osuosl.org (Postfix) with ESMTPS id B96148294A for ; Fri, 3 May 2024 07:26:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1714721185; 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=mx/Xc5PLiLPHkeNvI1AGSwMNdrICNwMkV7tL/ksd/Ys=; b=TL2WWH4tX1A9qpIcMSO+dOX0tM25W5pI+1OgkRIkUH78Z4v1on8cgUwk80QOSYoUvFUAs2 A3+LXVyc3qm7MThvAH+bHHutK4QWLFc+TMMcKqEA97+BbonnYovi2cPOvXCvNe1oBpmG7N x3BdsAydipTYxs0KLuWcvbTq/i1sYa4= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-150-cg31WKIsORm2JyalRQ3FWw-1; Fri, 03 May 2024 03:26:23 -0400 X-MC-Unique: cg31WKIsORm2JyalRQ3FWw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (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 AC6C31C4C394 for ; Fri, 3 May 2024 07:26:23 +0000 (UTC) Received: from amusil.redhat.com (unknown [10.45.224.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 17B4C16D94; Fri, 3 May 2024 07:26:22 +0000 (UTC) From: Ales Musil To: dev@openvswitch.org Date: Fri, 3 May 2024 09:26:19 +0200 Message-ID: <20240503072622.2111265-1-amusil@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn 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 | 99 +++++++------- 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, 738 insertions(+), 189 deletions(-)