From patchwork Mon Jun 17 06:58:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ales Musil X-Patchwork-Id: 1948472 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=I0/f+ZBx; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W2ghZ3KG0z20Wg for ; Mon, 17 Jun 2024 16:58:38 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 102E04021C; Mon, 17 Jun 2024 06:58:36 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 17Dn6PO-zdY6; Mon, 17 Jun 2024 06:58:34 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=2605:bc80:3010:104::8cd3:938; helo=lists.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org A49B34010A 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=I0/f+ZBx Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp4.osuosl.org (Postfix) with ESMTPS id A49B34010A; Mon, 17 Jun 2024 06:58:34 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 04267C0012; Mon, 17 Jun 2024 06:58:34 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 45535C0011 for ; Mon, 17 Jun 2024 06:58:33 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 2CE2C4010A for ; Mon, 17 Jun 2024 06:58:33 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id WGc9FWRTDk7s for ; Mon, 17 Jun 2024 06:58:32 +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 smtp4.osuosl.org 3622B400F2 Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=none dis=none) header.from=redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 3622B400F2 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp4.osuosl.org (Postfix) with ESMTPS id 3622B400F2 for ; Mon, 17 Jun 2024 06:58:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718607511; 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=DTeXRdM7tpYU7BuzQkagwEpsUdUBqCsuVK9GFBqAwdM=; b=I0/f+ZBxdYbZ1R8MEZ5xIdiOvr8J/uOOuYKNBTQdFwVq5Mqd2nRQEo6Pv/kKneQvg6xzCL GLcNrWb45JktyIQe5DQZTnIi48HDEKgty5ZjKGmarYW7hjrJxjtoIiP6/cSu4KgAn0PWvu 5smBlcqdBJmy8fyk8/VTwUC5S5eZVn8= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-454-yZ03lIhGOratIVqV2bm1vg-1; Mon, 17 Jun 2024 02:58:29 -0400 X-MC-Unique: yZ03lIhGOratIVqV2bm1vg-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (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 mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A002F19560AB for ; Mon, 17 Jun 2024 06:58:28 +0000 (UTC) Received: from amusil.brq.redhat.com (unknown [10.43.17.32]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 86E9F19560AE; Mon, 17 Jun 2024 06:58:27 +0000 (UTC) From: Ales Musil To: dev@openvswitch.org Date: Mon, 17 Jun 2024 08:58:22 +0200 Message-ID: <20240617065826.76656-1-amusil@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn v3 0/4] Add ability to limit CT entries per LS/LR/LSP X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.30 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 | 605 ++++++++++++++++++++++++++++++++++++ controller/ct-zone.h | 89 ++++++ controller/ofctrl.c | 5 +- controller/ovn-controller.c | 452 +++------------------------ 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, 918 insertions(+), 442 deletions(-) create mode 100644 controller/ct-zone.c create mode 100644 controller/ct-zone.h