From patchwork Thu Oct 20 10:53:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ales Musil X-Patchwork-Id: 1692415 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::136; helo=smtp3.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=VTXYVAgX; dkim-atps=neutral Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (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 4MtPbV6vg8z23jk for ; Thu, 20 Oct 2022 21:53:42 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 266126FA9A; Thu, 20 Oct 2022 10:53:41 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 266126FA9A Authentication-Results: smtp3.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=VTXYVAgX 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 wn9wmnXfjftR; Thu, 20 Oct 2022 10:53:40 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp3.osuosl.org (Postfix) with ESMTPS id 5C19F60A88; Thu, 20 Oct 2022 10:53:38 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 5C19F60A88 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id B830EC0083; Thu, 20 Oct 2022 10:53:37 +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 BCF6CC002D for ; Thu, 20 Oct 2022 10:53:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 58C4D40289 for ; Thu, 20 Oct 2022 10:53:35 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 58C4D40289 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=VTXYVAgX 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 TqGYe6X2qEwc for ; Thu, 20 Oct 2022 10:53:34 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 995FC4013A 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 995FC4013A for ; Thu, 20 Oct 2022 10:53:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666263213; 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=3KGq7mTA1pwY5AMrlqnVDLE4A12AyqtVLMhs9puvEXg=; b=VTXYVAgXWbwHjAuZPAOcjwjN2yq1oOrC4SstCPH1CbZohfNrmebToCF2fQK4tlF3v7QHRU BuP6d6EXbHxSIRuo2iBFM20Cx6qR7vWPg1V9qTDjOtc1jmFoSxgHb/aqw6AkX0V6/H748+ VzwjYel3KJXpxCeAKd89KlYwNnktgKg= 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-533-Uw28H_fPPWOOkKUdca5cVw-1; Thu, 20 Oct 2022 06:53:30 -0400 X-MC-Unique: Uw28H_fPPWOOkKUdca5cVw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 57A32101A5B3; Thu, 20 Oct 2022 10:53:15 +0000 (UTC) Received: from amusil.redhat.com (unknown [10.34.130.108]) by smtp.corp.redhat.com (Postfix) with ESMTP id A731140C6E17; Thu, 20 Oct 2022 10:53:12 +0000 (UTC) From: Ales Musil To: dev@openvswitch.org Date: Thu, 20 Oct 2022 12:53:09 +0200 Message-Id: <20221020105311.114842-1-amusil@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: i.maximets@ovn.org Subject: [ovs-dev] [PATCH 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 | 26 +++ 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 | 14 +- lib/dpctl.man | 3 +- lib/ofp-bundle.c | 1 + lib/ofp-ct-util.c | 351 +++++++++++++++++++++++++++++++++ lib/ofp-ct-util.h | 37 ++++ lib/ofp-print.c | 16 ++ lib/ofp-util.c | 36 ++++ lib/rconn.c | 1 + ofproto/ofproto-dpif.c | 8 +- ofproto/ofproto-provider.h | 7 +- ofproto/ofproto.c | 24 ++- tests/ofp-print.at | 71 +++++++ tests/system-traffic.at | 80 ++++++++ 20 files changed, 796 insertions(+), 127 deletions(-) create mode 100644 lib/ofp-ct-util.c create mode 100644 lib/ofp-ct-util.h