From patchwork Tue Aug 15 17:42:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 130386 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7C1D743074; Tue, 15 Aug 2023 19:43:04 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0234A427E9; Tue, 15 Aug 2023 19:43:04 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 4DBF7410ED for ; Tue, 15 Aug 2023 19:43:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1692121381; 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=JNXah2/VBdKx4ngvmHsSgEBqHari1UVAh7IaAQxvhjs=; b=W3/o3awGIafltp7g8smQikPEjsOOKOdNa6SvF4LYkhmczB90gZ2VQo5xUuM/OQ50Nkx3Al n5RBawsxvSZU99JToqk+GKvFOxAlSbsFoSCjyJUqDMMZPCh032JXa3AqkDeYnuDictSpsF uI/0p6b8LV8hMVCWz1YOcd1RbJbDzjQ= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-189--7q34VqNM1it5HzUz9gkdQ-1; Tue, 15 Aug 2023 13:42:56 -0400 X-MC-Unique: -7q34VqNM1it5HzUz9gkdQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C2A39185A78B; Tue, 15 Aug 2023 17:42:54 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.226.19]) by smtp.corp.redhat.com (Postfix) with ESMTP id C9E84140E950; Tue, 15 Aug 2023 17:42:53 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko Subject: [PATCH v3 1/2] devtools: add check on symbol maps format Date: Tue, 15 Aug 2023 19:42:48 +0200 Message-ID: <20230815174249.511589-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.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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 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..1907890635 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; From patchwork Tue Aug 15 17:42:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 130387 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A6D2A43074; Tue, 15 Aug 2023 19:43:09 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4181E4323A; Tue, 15 Aug 2023 19:43:06 +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 93BCD410ED for ; Tue, 15 Aug 2023 19:43:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1692121383; 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=ffTtxlCEqecE/ByNKUBa9cW1IkSxbl6OkeDKoafIZ3k=; b=HdOgIqM8OqkWkzApSkZfuAPjQ+LfLo1YyfyapIrzDYrrdGsO8aKDb/7JVVRx204X0PSBAs uuZxKbPAHzrxrmWPswu/MuHtuZtOvaSU/5m+NGrnSetvwzPpCYfi0NpwJsR5vhWQrc0lq7 6q01Pr2z1rrl/rlr/MgL9om8hjjYaH4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-358-j2uxL_qxOYG5fV6dhObrBg-1; Tue, 15 Aug 2023 13:42:57 -0400 X-MC-Unique: j2uxL_qxOYG5fV6dhObrBg-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7BBF2800CA6; Tue, 15 Aug 2023 17:42:57 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.226.19]) by smtp.corp.redhat.com (Postfix) with ESMTP id AC066492C13; Tue, 15 Aug 2023 17:42:56 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: Stephen Hemminger , Bruce Richardson Subject: [PATCH v3 2/2] devtools: list symbols by version Date: Tue, 15 Aug 2023 19:42:49 +0200 Message-ID: <20230815174249.511589-2-david.marchand@redhat.com> In-Reply-To: <20230815174249.511589-1-david.marchand@redhat.com> References: <20230811154944.2947783-1-david.marchand@redhat.com> <20230815174249.511589-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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 Make it easier to list experimental symbols added in a certain version. Example: $ ./buildtools/map-list-symbol.sh -V 18.11 lib/eal/version.map lib/eal/version.map EXPERIMENTAL rte_dev_event_callback_process lib/eal/version.map EXPERIMENTAL rte_dev_hotplug_handle_disable lib/eal/version.map EXPERIMENTAL rte_dev_hotplug_handle_enable Signed-off-by: David Marchand Acked-by: Stephen Hemminger --- buildtools/map-list-symbol.sh | 39 ++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/buildtools/map-list-symbol.sh b/buildtools/map-list-symbol.sh index 3bf9bd66f8..a834399816 100755 --- a/buildtools/map-list-symbol.sh +++ b/buildtools/map-list-symbol.sh @@ -6,7 +6,7 @@ section=all symbol=all quiet= -while getopts 'S:s:q' name; do +while getopts 'S:s:qV:' name; do case $name in S) [ $section = 'all' ] || { @@ -25,8 +25,11 @@ while getopts 'S:s:q' name; do q) quiet='y' ;; + V) + version=$OPTARG + ;; ?) - echo 'usage: $0 [-S section] [-s symbol] [-q]' + echo 'usage: $0 [-S section] [-s symbol] [-V version] [-q]' exit 1 ;; esac @@ -38,7 +41,8 @@ for file in $@; do cat "$file" |awk ' BEGIN { current_section = ""; - if ("'$section'" == "all" && "'$symbol'" == "all") { + current_version = ""; + if ("'$section'" == "all" && "'$symbol'" == "all" && "'$version'" == "") { ret = 0; } else { ret = 1; @@ -49,18 +53,25 @@ for file in $@; do current_section = $1; } } - /.*}/ { current_section = ""; } + /.*}/ { current_section = ""; current_version = ""; } + /^\t# added in / { + current_version=$4; + } /^[^}].*[^:*];/ { - if (current_section != "") { - gsub(";",""); - if ("'$symbol'" == "all" || $1 == "'$symbol'") { - ret = 0; - if ("'$quiet'" == "") { - print "'$file' "current_section" "$1; - } - if ("'$symbol'" != "all") { - exit 0; - } + if (current_section == "") { + next; + } + if ("'$version'" != "" && "'$version'" != current_version) { + next; + } + gsub(";",""); + if ("'$symbol'" == "all" || $1 == "'$symbol'") { + ret = 0; + if ("'$quiet'" == "") { + print "'$file' "current_section" "$1; + } + if ("'$symbol'" != "all") { + exit 0; } } }