From patchwork Thu Dec 15 12:45:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ales Musil X-Patchwork-Id: 1716110 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::138; helo=smtp1.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=MNCxYadn; dkim-atps=neutral Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (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 4NXsRX0Dzgz23ym for ; Thu, 15 Dec 2022 23:46:14 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 8DB8A81F6B; Thu, 15 Dec 2022 12:46:11 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 8DB8A81F6B 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=MNCxYadn X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0FIXftR6qUor; Thu, 15 Dec 2022 12:46:10 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp1.osuosl.org (Postfix) with ESMTPS id C7DF781F48; Thu, 15 Dec 2022 12:46:09 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org C7DF781F48 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 94441C0032; Thu, 15 Dec 2022 12:46:09 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id D167EC002D for ; Thu, 15 Dec 2022 12:46:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id B0E1D40C80 for ; Thu, 15 Dec 2022 12:46:07 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org B0E1D40C80 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=MNCxYadn 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 zalK_LQtaSQ5 for ; Thu, 15 Dec 2022 12:46:05 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 05EC940120 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 05EC940120 for ; Thu, 15 Dec 2022 12:46:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1671108364; 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=RSmyU0ltOQVS7/RBFvsHLqLmx1d0e6uR1b0Xd1sgpxg=; b=MNCxYadnMWzU5UoROuex8FDxiyBCrQzcOfvP25yHRpvteUzdhWHec9+lGwBwnn6I3CS9dd KHPHm2bklgxMKLwBBC77haEsu1U1YVKUsD17mcc/5tRF89r5fW6PoYIFtMlC/2HzohHofa 3AghURgLUGdHbgjKn2ZSY6jOWVNs86M= 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-587-5OT1gVbiPXekGN18DVh9Rw-1; Thu, 15 Dec 2022 07:46:00 -0500 X-MC-Unique: 5OT1gVbiPXekGN18DVh9Rw-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 8FA3E185A794; Thu, 15 Dec 2022 12:46:00 +0000 (UTC) Received: from amusil.redhat.com (ovpn-192-206.brq.redhat.com [10.40.192.206]) by smtp.corp.redhat.com (Postfix) with ESMTP id 88EB12026D68; Thu, 15 Dec 2022 12:45:59 +0000 (UTC) From: Ales Musil To: dev@openvswitch.org Date: Thu, 15 Dec 2022 13:45:55 +0100 Message-Id: <20221215124557.358665-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 v3 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, 1024 insertions(+), 169 deletions(-) create mode 100644 lib/ofp-ct-util.c create mode 100644 lib/ofp-ct-util.h