From patchwork Wed Nov 29 07:23:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ales Musil X-Patchwork-Id: 1869581 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=i3tvZtiK; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.138; helo=smtp1.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (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 4Sg9mN1G64z1ySY for ; Wed, 29 Nov 2023 18:23:46 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 091FC84392; Wed, 29 Nov 2023 07:23:44 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 091FC84392 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=i3tvZtiK 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 Z47TtjeKbO6n; Wed, 29 Nov 2023 07:23:43 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp1.osuosl.org (Postfix) with ESMTPS id 28AA682993; Wed, 29 Nov 2023 07:23:42 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 28AA682993 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 0EA9EC0DCF; Wed, 29 Nov 2023 07:23:42 +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 5E976C008E for ; Wed, 29 Nov 2023 07:23:40 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 2CCC060B4E for ; Wed, 29 Nov 2023 07:23:40 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 2CCC060B4E 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=i3tvZtiK 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 maKXPMjAQ80M for ; Wed, 29 Nov 2023 07:23:39 +0000 (UTC) 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 6C17960B3F for ; Wed, 29 Nov 2023 07:23:39 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 6C17960B3F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701242618; 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=rCy9/+xx6lIN4QLRodFUfShpuBDcqrSDaK+T1AH8IYM=; b=i3tvZtiKrvBid8Iw4yXFJb2Wq/KGXA7tg/zk3tsn5kI3mNf5ADDHhLx6zMQx/ml/7Q4FlJ Qme5uRX9ublZE/5OYuIJD/P6VLswEb9hEf/Te/GsmrEvhbhVXAi6idW/M8aw/uJg8BQR7b 7QTs5E4koS5vduMrE2cVV2FLXRmO4l4= 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-390-X5JiYuGKOb-DN--OUnuyBg-1; Wed, 29 Nov 2023 02:23:36 -0500 X-MC-Unique: X5JiYuGKOb-DN--OUnuyBg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (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 BD30480F82F; Wed, 29 Nov 2023 07:23:35 +0000 (UTC) Received: from amusil.. (unknown [10.34.130.152]) by smtp.corp.redhat.com (Postfix) with ESMTP id CCF6BC1596F; Wed, 29 Nov 2023 07:23:34 +0000 (UTC) From: Ales Musil To: dev@openvswitch.org Date: Wed, 29 Nov 2023 08:23:28 +0100 Message-ID: <20231129072334.91442-1-amusil@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: i.maximets@ovn.org Subject: [ovs-dev] [PATCH v7 0/6] Expose CT limit via DB 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 series exposes CT limit via DB, adding user friendly ovs-vsctl interface. The DB value has priority before the dpctl interface, this is achieved by storing which datapath is protected. The dpctl will return an error if the limit is already set in DB for that datapath. Ales Musil (6): ct-dpif: Handle default zone limit the same way as other limits. dpctl: Allow the default CT zone limit to de deleted. ovs-vsctl: Add limit to CT zone. vswitchd, ofproto-dpif: Propagate the CT limit from database. ct-dpif: Enforce CT zone limit protection. tests: Do not use zone 0 for CT limit system test. NEWS | 7 ++ lib/conntrack.c | 14 ++-- lib/conntrack.h | 7 +- lib/ct-dpif.c | 53 ++++++++++--- lib/ct-dpif.h | 16 ++-- lib/dpctl.c | 48 ++++++++--- lib/dpif-netdev.c | 21 ++--- lib/dpif-netlink.c | 29 ++----- lib/dpif-provider.h | 24 +++--- ofproto/ofproto-dpif.c | 52 ++++++++++++ ofproto/ofproto-dpif.h | 5 ++ ofproto/ofproto-provider.h | 13 +++ ofproto/ofproto.c | 23 ++++++ ofproto/ofproto.h | 4 + tests/dpctl.at | 8 +- tests/ovs-vsctl.at | 88 +++++++++++++++++++- tests/system-traffic.at | 159 +++++++++++++++++++++++++++++++++---- utilities/ovs-vsctl.8.in | 31 ++++++-- utilities/ovs-vsctl.c | 141 ++++++++++++++++++++++++++++++-- vswitchd/bridge.c | 82 ++++++++++++++----- vswitchd/vswitch.ovsschema | 14 +++- vswitchd/vswitch.xml | 14 ++++ 22 files changed, 709 insertions(+), 144 deletions(-)