From patchwork Thu Dec 8 14:26:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ales Musil X-Patchwork-Id: 1713762 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=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) 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=ahGJ8lZD; dkim-atps=neutral Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::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 4NSc0m0lC4z23pD for ; Fri, 9 Dec 2022 01:26:46 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 8044A418A5; Thu, 8 Dec 2022 14:26:44 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 8044A418A5 Authentication-Results: smtp4.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=ahGJ8lZD 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 A_QUabcT0caS; Thu, 8 Dec 2022 14:26:43 +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 2EC3941862; Thu, 8 Dec 2022 14:26:42 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 2EC3941862 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id F2272C0033; Thu, 8 Dec 2022 14:26:41 +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 15AFDC002D for ; Thu, 8 Dec 2022 14:26:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id D087E405A4 for ; Thu, 8 Dec 2022 14:26:40 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org D087E405A4 Authentication-Results: smtp2.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=ahGJ8lZD 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 NkCGjWib5Scm for ; Thu, 8 Dec 2022 14:26:40 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 07BCB4032A Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp2.osuosl.org (Postfix) with ESMTPS id 07BCB4032A for ; Thu, 8 Dec 2022 14:26:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670509598; 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=pvbdm0ArzuV3RmT0U+wApBd+7IpTFzs2y3U4ZdmRzJM=; b=ahGJ8lZDq53xLKKfUlgNDu5Og8ZfztfkOyLc4qb5UP5pQSVdhjsGHgbmZti4XnL/Ap05BG wJPP+HV0tdDIcxQ0G6Y67k7oWJ/FmJiqjgKxgyUDR5pftQcgCiuIpbk+QovUcaF7kTI/7H ofR+24icI4zGOMyKcXjwz9ojQ/zJrDs= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-244-oNvlGfQbMYK-erPIdFrEsA-1; Thu, 08 Dec 2022 09:26:37 -0500 X-MC-Unique: oNvlGfQbMYK-erPIdFrEsA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1FC1D8027FE; Thu, 8 Dec 2022 14:26:37 +0000 (UTC) Received: from amusil.redhat.com (ovpn-192-197.brq.redhat.com [10.40.192.197]) by smtp.corp.redhat.com (Postfix) with ESMTP id C1F4F200BC58; Thu, 8 Dec 2022 14:26:35 +0000 (UTC) From: Ales Musil To: dev@openvswitch.org Date: Thu, 8 Dec 2022 15:26:32 +0100 Message-Id: <20221208142634.138624-1-amusil@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: i.maximets@ovn.org Subject: [ovs-dev] [PATCH v2 0/2] Add extension for partial CT flush 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" Add extension that will allow to flush connection from CT specified by full orig 5-tuple or partial match that combines orig or reply direction. Ales Musil (2): ofp, dpif: Allow CT flush based on partial match openflow: Add extension to flush CT by generic match NEWS | 5 + include/openflow/nicira-ext.h | 30 +++ include/openvswitch/ofp-msgs.h | 4 + include/openvswitch/ofp-util.h | 32 +++ lib/automake.mk | 2 + lib/ct-dpif.c | 201 +++++++-------- lib/ct-dpif.h | 4 +- lib/dpctl.c | 45 ++-- lib/dpctl.man | 3 +- lib/ofp-bundle.c | 1 + lib/ofp-ct-util.c | 457 +++++++++++++++++++++++++++++++++ lib/ofp-ct-util.h | 43 ++++ lib/ofp-print.c | 20 ++ lib/ofp-util.c | 25 ++ lib/rconn.c | 1 + ofproto/ofproto-dpif.c | 8 +- ofproto/ofproto-provider.h | 7 +- ofproto/ofproto.c | 30 ++- tests/ofp-print.at | 93 +++++++ tests/ovs-ofctl.at | 12 + tests/system-traffic.at | 132 ++++++++-- utilities/ovs-ofctl.c | 38 +++ 22 files changed, 1023 insertions(+), 170 deletions(-) create mode 100644 lib/ofp-ct-util.c create mode 100644 lib/ofp-ct-util.h