From patchwork Mon May 27 07:00:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ales Musil X-Patchwork-Id: 1939679 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=KZ792SzB; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (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 4Vnml16jcRz20KL for ; Mon, 27 May 2024 17:01:01 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 521034092B; Mon, 27 May 2024 07:00:54 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id eQr7RXnZYEn8; Mon, 27 May 2024 07:00:53 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.9.56; helo=lists.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 3D21940108 Authentication-Results: smtp2.osuosl.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=KZ792SzB Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp2.osuosl.org (Postfix) with ESMTPS id 3D21940108; Mon, 27 May 2024 07:00:53 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 090D9C0072; Mon, 27 May 2024 07:00:53 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists.linuxfoundation.org (Postfix) with ESMTP id B685BC0037 for ; Mon, 27 May 2024 07:00:51 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 8F2778130E for ; Mon, 27 May 2024 07:00:51 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 1pT27YuF8CKa for ; Mon, 27 May 2024 07:00:50 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=170.10.133.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=amusil@redhat.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org 1FBBB81264 Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=none dis=none) header.from=redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 1FBBB81264 Authentication-Results: smtp1.osuosl.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=KZ792SzB Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp1.osuosl.org (Postfix) with ESMTPS id 1FBBB81264 for ; Mon, 27 May 2024 07:00:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1716793248; 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=TEX2/6LSXja3k2PY+iThrmnO7FqRycj+SBArv/sSqR4=; b=KZ792SzB3/73GNxcEBbWsgk4k86l+Ye2+DjPNJubak94T1Pbjp/DZSkj+dfcSc2jzUYTkW ggwOGku3NmtJr2Wn9QpUtNu0DJL+uOb/pPG20GeY91dsdQFrEweoJ5oOYq4NZJTiFqspW8 qiNvVmeHfIjk9EGzwJsVDhQ9zcVGJfw= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-694-Tk1gGFzHOPaM68emFZSTGA-1; Mon, 27 May 2024 03:00:46 -0400 X-MC-Unique: Tk1gGFzHOPaM68emFZSTGA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (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 B13063806721 for ; Mon, 27 May 2024 07:00:46 +0000 (UTC) Received: from amusil.brq.redhat.com (unknown [10.43.17.32]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3C938105480A; Mon, 27 May 2024 07:00:46 +0000 (UTC) From: Ales Musil To: dev@openvswitch.org Date: Mon, 27 May 2024 09:00:41 +0200 Message-ID: <20240527070045.26292-1-amusil@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn v2 0/4] Add ability to limit CT entries per LS/LR/LSP 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 ability that allows to set CT limits per logical switch, logical router or logical switch port. When the limit is applied to logical switch it will be implicitly set for all logical ports in the logical switch. This can be overwritten individually per port. To achieve this there is a small refactor of the CT zone handling logic which allows us to get the zone limiting more easily. Ales Musil (4): controller: Move CT zone handling into separate module. controller: Further encapsulate the CT zone handling. controller: Prepare structure around CT zone limiting. controller, northd: Add support for CT zone limits. NEWS | 3 + controller/automake.mk | 4 +- controller/ct-zone.c | 604 ++++++++++++++++++++++++++++++++++++ controller/ct-zone.h | 89 ++++++ controller/ofctrl.c | 5 +- controller/ovn-controller.c | 451 +++------------------------ controller/ovn-controller.h | 21 +- controller/physical.c | 17 +- controller/physical.h | 2 +- controller/pinctrl.c | 2 +- lib/ovn-util.c | 17 + lib/ovn-util.h | 3 + northd/northd.c | 8 + ovn-nb.xml | 29 ++ tests/ovn-controller.at | 99 ++++++ tests/ovn.at | 4 +- 16 files changed, 917 insertions(+), 441 deletions(-) create mode 100644 controller/ct-zone.c create mode 100644 controller/ct-zone.h