From patchwork Mon Feb 27 19:54:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Maximets X-Patchwork-Id: 1749096 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 4PQWRh1wq0z1yXC for ; Tue, 28 Feb 2023 06:54:38 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 5ABC281EFB; Mon, 27 Feb 2023 19:54:36 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 5ABC281EFB 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 SqKC9-72rmfo; Mon, 27 Feb 2023 19:54:35 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp1.osuosl.org (Postfix) with ESMTPS id 5EDA481EF4; Mon, 27 Feb 2023 19:54:34 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 5EDA481EF4 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 17EECC0032; Mon, 27 Feb 2023 19:54:34 +0000 (UTC) X-Original-To: ovs-dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 83E5FC002B for ; Mon, 27 Feb 2023 19:54:32 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 4D36B4016B for ; Mon, 27 Feb 2023 19:54:32 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 4D36B4016B 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 EWK01qsyQVz0 for ; Mon, 27 Feb 2023 19:54:31 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 5C26140138 Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [217.70.178.231]) by smtp2.osuosl.org (Postfix) with ESMTPS id 5C26140138 for ; Mon, 27 Feb 2023 19:54:31 +0000 (UTC) Received: (Authenticated sender: i.maximets@ovn.org) by mail.gandi.net (Postfix) with ESMTPSA id BEAB7100005; Mon, 27 Feb 2023 19:54:26 +0000 (UTC) From: Ilya Maximets To: ovs-dev@openvswitch.org Date: Mon, 27 Feb 2023 20:54:23 +0100 Message-Id: <20230227195423.1307900-1-i.maximets@ovn.org> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Cc: Ilya Maximets , Dumitru Ceara Subject: [ovs-dev] [PATCH ovn] ovn-util: Remove unused ovn_parse_internal_version_minor. 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 only user of this function was removed in a cited commit. And it is unlikely to be used in the future, since we have feature flags in the database instead. Fixes: 3013c2869696 ("northd: ovn-controller: Use ct_mark.natted only when ct_lb_mark is used.") Signed-off-by: Ilya Maximets Reviewed-by: Simon Horman --- lib/ovn-util.c | 18 ------------------ lib/ovn-util.h | 5 ----- 2 files changed, 23 deletions(-) diff --git a/lib/ovn-util.c b/lib/ovn-util.c index b12c027b9..5cd38c9c4 100644 --- a/lib/ovn-util.c +++ b/lib/ovn-util.c @@ -825,24 +825,6 @@ ovn_get_internal_version(void) N_OVNACTS, OVN_INTERNAL_MINOR_VER); } -unsigned int -ovn_parse_internal_version_minor(const char *ver) -{ - const char *p = ver + strlen(ver); - for (int i = 0; i < strlen(ver); i++) { - if (*p == '.') { - break; - } - p--; - } - - unsigned int minor; - if (ovs_scan(p, ".%u", &minor)) { - return minor; - } - return 0; -} - #ifdef DDLOG /* Callbacks used by the ddlog northd code to print warnings and errors. */ void diff --git a/lib/ovn-util.h b/lib/ovn-util.h index cda1fde48..a1a418a24 100644 --- a/lib/ovn-util.h +++ b/lib/ovn-util.h @@ -266,11 +266,6 @@ bool ip_address_and_port_from_lb_key(const char *key, char **ip_address, * value. */ char *ovn_get_internal_version(void); -/* Parse the provided internal version string and return the "minor" part which - * is expected to be an unsigned integer followed by the last "." in the - * string. Returns 0 if the string can't be parsed. */ -unsigned int ovn_parse_internal_version_minor(const char *ver); - /* OVN Packet definitions. These may eventually find a home in OVS's * packets.h file. For the time being, they live here because OVN uses them * and OVS does not.