From patchwork Thu Mar 2 13:11:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Maximets X-Patchwork-Id: 1750734 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::138; helo=smtp1.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (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 4PSBM60K60z1yWy for ; Fri, 3 Mar 2023 00:11:29 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id F2A4382070; Thu, 2 Mar 2023 13:11:27 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org F2A4382070 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 bAlImyS3UaGa; Thu, 2 Mar 2023 13:11:27 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp1.osuosl.org (Postfix) with ESMTPS id 4BCA681E66; Thu, 2 Mar 2023 13:11:26 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 4BCA681E66 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 20FCEC0035; Thu, 2 Mar 2023 13:11:26 +0000 (UTC) X-Original-To: ovs-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 BFA2AC0032 for ; Thu, 2 Mar 2023 13:11:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 8D3A060F80 for ; Thu, 2 Mar 2023 13:11:24 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 8D3A060F80 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 i8B1-ZkWZp_P for ; Thu, 2 Mar 2023 13:11:23 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 93BD960AC3 Received: from relay10.mail.gandi.net (relay10.mail.gandi.net [217.70.178.230]) by smtp3.osuosl.org (Postfix) with ESMTPS id 93BD960AC3 for ; Thu, 2 Mar 2023 13:11:23 +0000 (UTC) Received: (Authenticated sender: i.maximets@ovn.org) by mail.gandi.net (Postfix) with ESMTPSA id D57A2240010; Thu, 2 Mar 2023 13:11:19 +0000 (UTC) From: Ilya Maximets To: ovs-dev@openvswitch.org Date: Thu, 2 Mar 2023 14:11:07 +0100 Message-Id: <20230302131110.1665580-1-i.maximets@ovn.org> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Cc: Simon Horman , Dumitru Ceara , Ilya Maximets Subject: [ovs-dev] [PATCH ovn v2 0/3] northd: Optimize parsing of LSP addresses. 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" This patch set optimizes usage of string operations and avoids parsing same LSP addresses multiple times. Performance tests with ovn-heater show 5-10% improvement in high-scale density-light scenarios. Version 2: - Reduced code duplication in is_dynamic_lsp_address(). [Mark] Ilya Maximets (3): treewide: Remove unnecessary strlen() calls. ovn-util: Optimize is_dynamic_lsp_address. northd: Don't parse LSP addresses twice. controller/chassis.c | 4 +-- controller/encaps.c | 2 +- controller/physical.c | 2 +- controller/pinctrl.c | 6 ++-- ic/ovn-ic.c | 4 +-- lib/ovn-util.c | 45 ++++++++++++++++++++---------- northd/northd.c | 64 +++++++++++++++---------------------------- utilities/ovn-nbctl.c | 14 +++++----- 8 files changed, 68 insertions(+), 73 deletions(-)