From patchwork Tue Mar 5 13:49:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 137996 X-Patchwork-Delegate: david.marchand@redhat.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 7780043C38; Tue, 5 Mar 2024 14:50:04 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5ED2240FDE; Tue, 5 Mar 2024 14:50:04 +0100 (CET) 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 29E8E40270 for ; Tue, 5 Mar 2024 14:50:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1709646602; 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=RKrIixEgW6/ScaeB2gUws5/eXZ6prxL+nyASIj6VEBI=; b=TGkM5jj7INk17OyJL4b1xerbS5P40REPLklwJyMuTuocbuoQk2Kfl9GGYL9C7HYmRDpU9p mJaPJHE52gB0enXeEsoHSMgz1T3GRtQ4HyR+lKZmLNW1i6sY9oF4s33ltn2swjm9+JsaJo /c9DqbX4ft/saWa8Nb+OWY2myv0mi/c= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-478-VB76_GPnPZm9TI1OB0xnww-1; Tue, 05 Mar 2024 08:49:59 -0500 X-MC-Unique: VB76_GPnPZm9TI1OB0xnww-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id 52F351E441C7; Tue, 5 Mar 2024 13:49:59 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.225.66]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7B08F17A9A; Tue, 5 Mar 2024 13:49:58 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net Subject: [PATCH] devtools: require version for experimental symbols Date: Tue, 5 Mar 2024 14:49:50 +0100 Message-ID: <20240305134950.3527240-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 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 version to all symbols maps and a check so any experimental symbol is versioned. Signed-off-by: David Marchand --- buildtools/map-list-symbol.sh | 8 ++++++-- devtools/check-symbol-maps.sh | 15 +++++++++++++++ doc/guides/contributing/abi_policy.rst | 17 ++++++++++++++++- drivers/baseband/acc/version.map | 1 + drivers/baseband/fpga_5gnr_fec/version.map | 1 + drivers/baseband/fpga_lte_fec/version.map | 2 +- drivers/bus/pci/version.map | 1 + drivers/dma/dpaa2/version.map | 3 +++ drivers/event/dlb2/version.map | 1 + drivers/mempool/cnxk/version.map | 2 ++ drivers/net/atlantic/version.map | 1 + drivers/net/i40e/version.map | 7 ++++++- drivers/net/ixgbe/version.map | 1 + lib/argparse/version.map | 1 + lib/metrics/version.map | 2 +- lib/mldev/version.map | 1 + lib/regexdev/version.map | 9 ++++++--- lib/reorder/version.map | 2 ++ 18 files changed, 66 insertions(+), 9 deletions(-) diff --git a/buildtools/map-list-symbol.sh b/buildtools/map-list-symbol.sh index a834399816..b76e2417c5 100755 --- a/buildtools/map-list-symbol.sh +++ b/buildtools/map-list-symbol.sh @@ -61,8 +61,12 @@ for file in $@; do if (current_section == "") { next; } - if ("'$version'" != "" && "'$version'" != current_version) { - next; + if ("'$version'" != "") { + if ("'$version'" == "unset" && current_version != "") { + next; + } else if ("'$version'" != "unset" && "'$version'" != current_version) { + next; + } } gsub(";",""); if ("'$symbol'" == "all" || $1 == "'$symbol'") { diff --git a/devtools/check-symbol-maps.sh b/devtools/check-symbol-maps.sh index ba2f892f56..6121f78ec6 100755 --- a/devtools/check-symbol-maps.sh +++ b/devtools/check-symbol-maps.sh @@ -97,4 +97,19 @@ if [ -n "$bad_format_maps" ] ; then ret=1 fi +find_non_versioned_maps () +{ + for map in $@ ; do + [ $(buildtools/map-list-symbol.sh -S EXPERIMENTAL -V unset $map | wc -l) = '0' ] || + echo $map + done +} + +non_versioned_maps=$(find_non_versioned_maps $@) +if [ -n "$non_versioned_maps" ] ; then + echo "Found non versioned maps:" + echo "$non_versioned_maps" + ret=1 +fi + exit $ret diff --git a/doc/guides/contributing/abi_policy.rst b/doc/guides/contributing/abi_policy.rst index 5fd4052585..3c4478692a 100644 --- a/doc/guides/contributing/abi_policy.rst +++ b/doc/guides/contributing/abi_policy.rst @@ -331,7 +331,22 @@ become part of a tracked ABI version. Note that marking an API as experimental is a multi step process. To mark an API as experimental, the symbols which are desired to be exported must be placed in an EXPERIMENTAL version block in the corresponding libraries' -version map script. +version map script. Experimental symbols must be commented so +that it is clear in which DPDK version they were introduced. + +.. code-block:: none + + EXPERIMENTAL { + global: + + # added in 20.11 + rte_foo_init; + rte_foo_configure; + + # added in 21.02 + rte_foo_cleanup; + ... + Secondly, the corresponding prototypes of those exported functions (in the development header files), must be marked with the ``__rte_experimental`` tag (see ``rte_compat.h``). diff --git a/drivers/baseband/acc/version.map b/drivers/baseband/acc/version.map index 1b6b1cd10d..fa39a63f0f 100644 --- a/drivers/baseband/acc/version.map +++ b/drivers/baseband/acc/version.map @@ -5,5 +5,6 @@ DPDK_24 { EXPERIMENTAL { global: + # added in 22.11 rte_acc_configure; }; diff --git a/drivers/baseband/fpga_5gnr_fec/version.map b/drivers/baseband/fpga_5gnr_fec/version.map index 2da20cabc1..855ce55703 100644 --- a/drivers/baseband/fpga_5gnr_fec/version.map +++ b/drivers/baseband/fpga_5gnr_fec/version.map @@ -5,6 +5,7 @@ DPDK_24 { EXPERIMENTAL { global: + # added in 20.11 rte_fpga_5gnr_fec_configure; }; diff --git a/drivers/baseband/fpga_lte_fec/version.map b/drivers/baseband/fpga_lte_fec/version.map index 83f3a8a267..2c8e60375d 100644 --- a/drivers/baseband/fpga_lte_fec/version.map +++ b/drivers/baseband/fpga_lte_fec/version.map @@ -5,6 +5,6 @@ DPDK_24 { EXPERIMENTAL { global: + # added in 20.11 rte_fpga_lte_fec_configure; - }; diff --git a/drivers/bus/pci/version.map b/drivers/bus/pci/version.map index 9e4d8f5e54..5d9dced5b2 100644 --- a/drivers/bus/pci/version.map +++ b/drivers/bus/pci/version.map @@ -17,6 +17,7 @@ DPDK_24 { EXPERIMENTAL { global: + # added in 20.11 rte_pci_find_ext_capability; # added in 21.08 diff --git a/drivers/dma/dpaa2/version.map b/drivers/dma/dpaa2/version.map index 7dc2d6e185..713ed41f0c 100644 --- a/drivers/dma/dpaa2/version.map +++ b/drivers/dma/dpaa2/version.map @@ -3,6 +3,9 @@ DPDK_24 { }; EXPERIMENTAL { + global: + + # added in 22.07 rte_dpaa2_qdma_completed_multi; rte_dpaa2_qdma_copy_multi; rte_dpaa2_qdma_vchan_fd_us_enable; diff --git a/drivers/event/dlb2/version.map b/drivers/event/dlb2/version.map index 8aabf8b727..1d0a0a75d7 100644 --- a/drivers/event/dlb2/version.map +++ b/drivers/event/dlb2/version.map @@ -5,5 +5,6 @@ DPDK_24 { EXPERIMENTAL { global: + # added in 20.11 rte_pmd_dlb2_set_token_pop_mode; }; diff --git a/drivers/mempool/cnxk/version.map b/drivers/mempool/cnxk/version.map index 775d46d934..8249417527 100644 --- a/drivers/mempool/cnxk/version.map +++ b/drivers/mempool/cnxk/version.map @@ -4,6 +4,8 @@ DPDK_24 { EXPERIMENTAL { global: + + # added in 23.07 rte_pmd_cnxk_mempool_is_hwpool; rte_pmd_cnxk_mempool_mbuf_exchange; rte_pmd_cnxk_mempool_range_check_disable; diff --git a/drivers/net/atlantic/version.map b/drivers/net/atlantic/version.map index b063baa7a4..cbe9ee9263 100644 --- a/drivers/net/atlantic/version.map +++ b/drivers/net/atlantic/version.map @@ -5,6 +5,7 @@ DPDK_24 { EXPERIMENTAL { global: + # added in 19.05 rte_pmd_atl_macsec_enable; rte_pmd_atl_macsec_disable; rte_pmd_atl_macsec_config_txsc; diff --git a/drivers/net/i40e/version.map b/drivers/net/i40e/version.map index 3ba31f4768..52b7a3269a 100644 --- a/drivers/net/i40e/version.map +++ b/drivers/net/i40e/version.map @@ -42,9 +42,14 @@ DPDK_24 { EXPERIMENTAL { global: + # added in 19.11 + rte_pmd_i40e_set_switch_dev; + + # added in 20.08 rte_pmd_i40e_get_fdir_info; rte_pmd_i40e_get_fdir_stats; rte_pmd_i40e_set_gre_key_len; + + # added in 23.07 rte_pmd_i40e_set_pf_src_prune; - rte_pmd_i40e_set_switch_dev; }; diff --git a/drivers/net/ixgbe/version.map b/drivers/net/ixgbe/version.map index 2c9d977f5c..9a6ef29b1d 100644 --- a/drivers/net/ixgbe/version.map +++ b/drivers/net/ixgbe/version.map @@ -43,6 +43,7 @@ DPDK_24 { EXPERIMENTAL { global: + # added in 20.08 rte_pmd_ixgbe_get_fdir_info; rte_pmd_ixgbe_get_fdir_stats; }; diff --git a/lib/argparse/version.map b/lib/argparse/version.map index 9b68464600..46da99a3e2 100644 --- a/lib/argparse/version.map +++ b/lib/argparse/version.map @@ -1,6 +1,7 @@ EXPERIMENTAL { global: + # added in 24.03 rte_argparse_parse; rte_argparse_parse_type; diff --git a/lib/metrics/version.map b/lib/metrics/version.map index 4763ac6b8b..9766a1af5b 100644 --- a/lib/metrics/version.map +++ b/lib/metrics/version.map @@ -16,11 +16,11 @@ DPDK_24 { EXPERIMENTAL { global: + # added in 20.05 rte_metrics_tel_encode_json_format; rte_metrics_tel_reg_all_ethdev; rte_metrics_tel_get_global_stats; rte_metrics_tel_get_port_stats_ids; rte_metrics_tel_get_ports_stats_json; rte_metrics_tel_extract_data; - }; diff --git a/lib/mldev/version.map b/lib/mldev/version.map index 1978695314..84bdd6c300 100644 --- a/lib/mldev/version.map +++ b/lib/mldev/version.map @@ -1,6 +1,7 @@ EXPERIMENTAL { global: + # added in 22.11 rte_ml_dequeue_burst; rte_ml_dev_close; rte_ml_dev_configure; diff --git a/lib/regexdev/version.map b/lib/regexdev/version.map index 3c6e9fffa1..4c0435180c 100644 --- a/lib/regexdev/version.map +++ b/lib/regexdev/version.map @@ -1,7 +1,7 @@ EXPERIMENTAL { global: - rte_regex_devices; + # added in 20.08 rte_regexdev_attr_get; rte_regexdev_attr_set; rte_regexdev_close; @@ -12,8 +12,6 @@ EXPERIMENTAL { rte_regexdev_enqueue_burst; rte_regexdev_get_dev_id; rte_regexdev_info_get; - rte_regexdev_is_valid_dev; - rte_regexdev_logtype; rte_regexdev_queue_pair_setup; rte_regexdev_rule_db_compile_activate; rte_regexdev_rule_db_export; @@ -27,6 +25,11 @@ EXPERIMENTAL { rte_regexdev_xstats_names_get; rte_regexdev_xstats_reset; + # added in 22.03 + rte_regex_devices; + rte_regexdev_is_valid_dev; + rte_regexdev_logtype; + local: *; }; diff --git a/lib/reorder/version.map b/lib/reorder/version.map index ea60759106..5baeab56f8 100644 --- a/lib/reorder/version.map +++ b/lib/reorder/version.map @@ -15,11 +15,13 @@ DPDK_24 { EXPERIMENTAL { global: + # added in 20.11 rte_reorder_seqn_dynfield_offset; # added in 23.03 rte_reorder_drain_up_to_seqn; rte_reorder_min_seqn_set; + # added in 23.07 rte_reorder_memory_footprint_get; };