From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4E3734307C; Wed, 16 Aug 2023 09:16:21 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E0A0643262; Wed, 16 Aug 2023 09:16:14 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id C896B40041 for ; Wed, 16 Aug 2023 09:16:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1692170172; 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: in-reply-to:in-reply-to:references:references; bh=TLz/DHbdKg4wm5FhEVjPTOUD/xPshPL4cfc6RmZNFw0=; b=hv31QID7sy1VZJUGfelIKQnTPD2RHefSUELKesYRmWv+FAPe5az3tMNcFjrBmri1R3mpDo MXwDXhtFjxUYK4ZL93uQdW7OH+Afec8PaSj48pMRmIU7BQg+/2UnBeiPMyfU1Y/1Uu0aW/ MZm7cC7sFg4kKSBUx2vSoGzHZM1XpPE= Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-452-BZ6VT3I2Mou7sBfYhqDdHQ-1; Wed, 16 Aug 2023 03:16:07 -0400 X-MC-Unique: BZ6VT3I2Mou7sBfYhqDdHQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4DCD73C0C4B0; Wed, 16 Aug 2023 07:16:07 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.226.19]) by smtp.corp.redhat.com (Postfix) with ESMTP id 59EF52026D33; Wed, 16 Aug 2023 07:16:06 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko Subject: [PATCH v4 1/2] devtools: add check on symbol maps format Date: Wed, 16 Aug 2023 09:16:02 +0200 Message-ID: <20230816071603.1002271-1-david.marchand@redhat.com> In-Reply-To: <20230811154944.2947783-1-david.marchand@redhat.com> References: <20230811154944.2947783-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Add a check on symbol maps format (fixing ethdev at the same time). This will be required by a next commit. Signed-off-by: David Marchand --- Changes since v3: - fixed Alpine build (same issue with { in awk expression than commit e1ab26df4862 ("buildtools: fix build with busybox")), Changes since v2: - fixed FreeBSD build by replacing (|pattern) with (pattern)?, Changes since v1: - moved this check in a separate patch, - fixed ethdev map file, --- devtools/check-symbol-maps.sh | 21 +++++++++++++++++++++ lib/ethdev/version.map | 30 ++++++++++++++---------------- 2 files changed, 35 insertions(+), 16 deletions(-) diff --git a/devtools/check-symbol-maps.sh b/devtools/check-symbol-maps.sh index 8c116bfa9c..9913393ced 100755 --- a/devtools/check-symbol-maps.sh +++ b/devtools/check-symbol-maps.sh @@ -74,4 +74,25 @@ if [ -n "$empty_maps" ] ; then ret=1 fi +find_bad_format_maps () +{ + for map in $@ ; do + cat $map | awk ' + /^(DPDK_[0-9]*|EXPERIMENTAL|INTERNAL) \{$/ { next; } # start of a section + /^};$/ { next; } # end of a section + /^$/ { next; } # empty line + /^\t(global:|local: \*;)$/ { next; } # qualifiers + /^\t[a-zA-Z_0-9]*;( # WINDOWS_NO_EXPORT)?$/ { next; } # symbols + /^\t# added in [0-9]*\.[0-9]*$/ { next; } # version comments + { print $0; }' || echo $map + done +} + +bad_format_maps=$(find_bad_format_maps $@) +if [ -n "$bad_format_maps" ] ; then + echo "Found badly formatted maps:" + echo "$bad_format_maps" + ret=1 +fi + exit $ret diff --git a/lib/ethdev/version.map b/lib/ethdev/version.map index b965d6aa52..da4f847116 100644 --- a/lib/ethdev/version.map +++ b/lib/ethdev/version.map @@ -181,7 +181,20 @@ EXPERIMENTAL { __rte_ethdev_trace_tx_burst; rte_flow_get_aged_flows; - # Marked as experimental in 20.11 + # added in 20.11 + rte_eth_hairpin_bind; + rte_eth_hairpin_get_peer_ports; + rte_eth_hairpin_unbind; + rte_eth_link_speed_to_str; + rte_eth_link_to_str; + rte_eth_fec_get_capability; + rte_eth_fec_get; + rte_eth_fec_set; + rte_flow_tunnel_decap_set; + rte_flow_tunnel_match; + rte_flow_get_restore_info; + rte_flow_tunnel_action_decap_release; + rte_flow_tunnel_item_release; rte_tm_capabilities_get; rte_tm_get_number_of_leaf_nodes; rte_tm_hierarchy_commit; @@ -213,21 +226,6 @@ EXPERIMENTAL { rte_tm_wred_profile_add; rte_tm_wred_profile_delete; - # added in 20.11 - rte_eth_hairpin_bind; - rte_eth_hairpin_get_peer_ports; - rte_eth_hairpin_unbind; - rte_eth_link_speed_to_str; - rte_eth_link_to_str; - rte_eth_fec_get_capability; - rte_eth_fec_get; - rte_eth_fec_set; - rte_flow_tunnel_decap_set; - rte_flow_tunnel_match; - rte_flow_get_restore_info; - rte_flow_tunnel_action_decap_release; - rte_flow_tunnel_item_release; - # added in 21.02 rte_eth_get_monitor_addr; -- 2.41.0