From patchwork Mon Jan 16 11:45:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ales Musil X-Patchwork-Id: 1727008 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=YTRT4nug; 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 4NwVZZ0Vwlz23g6 for ; Mon, 16 Jan 2023 22:45:24 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id A1B60408AE; Mon, 16 Jan 2023 11:45:21 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org A1B60408AE 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=YTRT4nug 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 i9wjD-pca0IC; Mon, 16 Jan 2023 11:45:20 +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 41A6640384; Mon, 16 Jan 2023 11:45:19 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 41A6640384 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id E9CB4C0035; Mon, 16 Jan 2023 11:45:18 +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 547C3C002D for ; Mon, 16 Jan 2023 11:45:17 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 2F12540364 for ; Mon, 16 Jan 2023 11:45:17 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 2F12540364 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=YTRT4nug 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 iod61-t_7D1o for ; Mon, 16 Jan 2023 11:45:16 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 7746740132 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 7746740132 for ; Mon, 16 Jan 2023 11:45:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673869514; 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=KKpZ0vlu4hvfva+qRdvXSjhaFF/hMFinKjpkdxSFjTg=; b=YTRT4nugSoasffS6b5rxLQrKLleL+6wHBruSiVycTHDueRNgGxenj/20By9YXzW0hXT/E8 N1jcXV+nG4foC1/rPv6qjfo9UIyG0a/zM/vX0TAeZLyGdy3e/W/adSh/HosBxxhWLrcZRf Bi68Msgd4BBzdRTTQAennpXnwHQ0HgM= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-582-iMp7TVtEP8-tdBhmyAx_mQ-1; Mon, 16 Jan 2023 06:45:11 -0500 X-MC-Unique: iMp7TVtEP8-tdBhmyAx_mQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BBF0D1C06EE5; Mon, 16 Jan 2023 11:45:10 +0000 (UTC) Received: from amusil.redhat.com (ovpn-195-16.brq.redhat.com [10.40.195.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id D62D239D6D; Mon, 16 Jan 2023 11:45:09 +0000 (UTC) From: Ales Musil To: dev@openvswitch.org Date: Mon, 16 Jan 2023 12:45:06 +0100 Message-Id: <20230116114508.221794-1-amusil@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: i.maximets@ovn.org Subject: [ovs-dev] [PATCH v7 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 | 9 + include/openflow/nicira-ext.h | 37 +++ include/openvswitch/automake.mk | 1 + include/openvswitch/ofp-ct.h | 80 +++++++ include/openvswitch/ofp-msgs.h | 4 + lib/automake.mk | 1 + lib/ct-dpif.c | 298 ++++++++++++++--------- lib/ct-dpif.h | 5 +- lib/dpctl.c | 43 +++- lib/dpctl.man | 24 +- lib/ofp-bundle.c | 1 + lib/ofp-ct.c | 410 ++++++++++++++++++++++++++++++++ lib/ofp-print.c | 20 ++ lib/rconn.c | 1 + ofproto/ofproto-dpif.c | 9 +- ofproto/ofproto-provider.h | 7 +- ofproto/ofproto.c | 29 ++- tests/ofp-print.at | 108 +++++++++ tests/ovs-ofctl.at | 38 +++ tests/system-traffic.at | 120 +++++++++- utilities/ovs-ofctl.8.in | 27 +++ utilities/ovs-ofctl.c | 51 ++++ 22 files changed, 1170 insertions(+), 153 deletions(-) create mode 100644 include/openvswitch/ofp-ct.h create mode 100644 lib/ofp-ct.c