From patchwork Wed Feb 7 16:35:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ales Musil X-Patchwork-Id: 1896217 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=b1NrTYmf; 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 4TVQjL5GvQz23hb for ; Thu, 8 Feb 2024 03:36:06 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 36186416D1; Wed, 7 Feb 2024 16:36:04 +0000 (UTC) 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 LObvmBi-a2ww; Wed, 7 Feb 2024 16:36:03 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.9.56; helo=lists.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org D5EEC40A73 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=b1NrTYmf Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp2.osuosl.org (Postfix) with ESMTPS id D5EEC40A73; Wed, 7 Feb 2024 16:36:02 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 3AC3EC0077; Wed, 7 Feb 2024 16:36:02 +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 A00CCC0037 for ; Wed, 7 Feb 2024 16:36:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 9DBD261436 for ; Wed, 7 Feb 2024 16:36:00 +0000 (UTC) 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 DLaSxFvh7DdW for ; Wed, 7 Feb 2024 16:36:00 +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 smtp3.osuosl.org EC87061427 Authentication-Results: smtp3.osuosl.org; dmarc=pass (p=none dis=none) header.from=redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org EC87061427 Authentication-Results: smtp3.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=b1NrTYmf Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp3.osuosl.org (Postfix) with ESMTPS id EC87061427 for ; Wed, 7 Feb 2024 16:35:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1707323758; 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=n/9vJmyjZEn/Ingv3+MaaToYcWofN0pOmpahRL8kjpE=; b=b1NrTYmfO9igrZeO+bqlcPFu9QHUh1/valqR5gVP6RaZGox9u4W6yfiRboPZgF4Szz6MM/ 0lh+GTmnxAn8GW4nwy9Di3SDzRXc5aPKklxFIFwyxXI93ebqxG95+2lgg9yd19Q3oqdFBE ogJW4h5OtnGe+pmSHB/ft+HXD8/0hoc= 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-206-FYNtvYAsOhupEOs50McRqA-1; Wed, 07 Feb 2024 11:35:57 -0500 X-MC-Unique: FYNtvYAsOhupEOs50McRqA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (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 8A5FF1833FA1 for ; Wed, 7 Feb 2024 16:35:57 +0000 (UTC) Received: from amusil.redhat.com (unknown [10.45.224.13]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8060A2026D09; Wed, 7 Feb 2024 16:35:56 +0000 (UTC) From: Ales Musil To: dev@openvswitch.org Date: Wed, 7 Feb 2024 17:35:53 +0100 Message-ID: <20240207163555.213086-1-amusil@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: dceara@redhat.com Subject: [ovs-dev] [PATCH ovn v5 0/2] Keep track of SNAT status for ICMP need frag 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" The ICMP need frag could be generated after routing stage when the unSNAT already happened. Add flows that will ensure that we are keeping track of the CT state and do appropriate CT nat action later on. Because the ICMP traffic is related to already existing one in this case we can use adjusted ct_commit_nat that will perform this action in SNAT zone. Ales Musil (2): actions: Adjust the ct_commit_nat action. northd: Explicitly handle SNAT for ICMP need frag. controller/chassis.c | 8 ++ include/ovn/actions.h | 12 ++- include/ovn/features.h | 1 + include/ovn/logical-fields.h | 3 + lib/actions.c | 69 ++++++++++--- lib/logical-fields.c | 4 + northd/en-global-config.c | 10 ++ northd/en-global-config.h | 1 + northd/northd.c | 189 +++++++++++++++++++---------------- tests/ovn-northd.at | 118 +++++++++++++++------- tests/ovn.at | 27 ++++- tests/system-ovn-kmod.at | 3 +- utilities/ovn-trace.c | 2 +- 13 files changed, 304 insertions(+), 143 deletions(-)