[PATCH] argparse: add version in symbols map

David Marchand david.marchand at redhat.com
Tue Mar 5 16:02:18 CET 2024


On Tue, Mar 5, 2024 at 1:14 PM David Marchand <david.marchand at redhat.com> wrote:
>
> On Tue, Mar 5, 2024 at 12:35 PM fengchengwen <fengchengwen at huawei.com> wrote:
> >
> > Acked-by: Chengwen Feng <fengchengwen at huawei.com>
> >
> > BTW: which tool detects this problem?
>
> I found out about those issues while manually inspecting the changes
> on **/version.map since v23.11.
>
> At the moment, there is no tool enforcing that experimental symbols
> must be in a block with a version comment.
>
> Adding a check could be done:
>
> $ git diff
> 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'") {
>
>
> And it catches more issues:
> $ find lib -name 'version.map' -exec ./buildtools/map-list-symbol.sh
> -S EXPERIMENTAL -V unset {} \;
> lib/metrics/version.map EXPERIMENTAL rte_metrics_tel_encode_json_format
> lib/metrics/version.map EXPERIMENTAL rte_metrics_tel_reg_all_ethdev
> lib/metrics/version.map EXPERIMENTAL rte_metrics_tel_get_global_stats
> lib/metrics/version.map EXPERIMENTAL rte_metrics_tel_get_port_stats_ids
> lib/metrics/version.map EXPERIMENTAL rte_metrics_tel_get_ports_stats_json
> lib/metrics/version.map EXPERIMENTAL rte_metrics_tel_extract_data
> lib/regexdev/version.map EXPERIMENTAL rte_regex_devices
> lib/regexdev/version.map EXPERIMENTAL rte_regexdev_attr_get
> lib/regexdev/version.map EXPERIMENTAL rte_regexdev_attr_set
> lib/regexdev/version.map EXPERIMENTAL rte_regexdev_close
> lib/regexdev/version.map EXPERIMENTAL rte_regexdev_configure
> lib/regexdev/version.map EXPERIMENTAL rte_regexdev_count
> lib/regexdev/version.map EXPERIMENTAL rte_regexdev_dequeue_burst
> lib/regexdev/version.map EXPERIMENTAL rte_regexdev_dump
> lib/regexdev/version.map EXPERIMENTAL rte_regexdev_enqueue_burst
> lib/regexdev/version.map EXPERIMENTAL rte_regexdev_get_dev_id
> lib/regexdev/version.map EXPERIMENTAL rte_regexdev_info_get
> lib/regexdev/version.map EXPERIMENTAL rte_regexdev_is_valid_dev
> lib/regexdev/version.map EXPERIMENTAL rte_regexdev_logtype
> lib/regexdev/version.map EXPERIMENTAL rte_regexdev_queue_pair_setup
> lib/regexdev/version.map EXPERIMENTAL rte_regexdev_rule_db_compile_activate
> lib/regexdev/version.map EXPERIMENTAL rte_regexdev_rule_db_export
> lib/regexdev/version.map EXPERIMENTAL rte_regexdev_rule_db_import
> lib/regexdev/version.map EXPERIMENTAL rte_regexdev_rule_db_update
> lib/regexdev/version.map EXPERIMENTAL rte_regexdev_selftest
> lib/regexdev/version.map EXPERIMENTAL rte_regexdev_start
> lib/regexdev/version.map EXPERIMENTAL rte_regexdev_stop
> lib/regexdev/version.map EXPERIMENTAL rte_regexdev_xstats_by_name_get
> lib/regexdev/version.map EXPERIMENTAL rte_regexdev_xstats_get
> lib/regexdev/version.map EXPERIMENTAL rte_regexdev_xstats_names_get
> lib/regexdev/version.map EXPERIMENTAL rte_regexdev_xstats_reset
> lib/reorder/version.map EXPERIMENTAL rte_reorder_seqn_dynfield_offset
> lib/mldev/version.map EXPERIMENTAL rte_ml_dequeue_burst
> lib/mldev/version.map EXPERIMENTAL rte_ml_dev_close
> lib/mldev/version.map EXPERIMENTAL rte_ml_dev_configure
> lib/mldev/version.map EXPERIMENTAL rte_ml_dev_count
> lib/mldev/version.map EXPERIMENTAL rte_ml_dev_dump
> lib/mldev/version.map EXPERIMENTAL rte_ml_dev_info_get
> lib/mldev/version.map EXPERIMENTAL rte_ml_dev_init
> lib/mldev/version.map EXPERIMENTAL rte_ml_dev_is_valid_dev
> lib/mldev/version.map EXPERIMENTAL rte_ml_dev_logtype
> lib/mldev/version.map EXPERIMENTAL rte_ml_dev_queue_pair_setup
> lib/mldev/version.map EXPERIMENTAL rte_ml_dev_selftest
> lib/mldev/version.map EXPERIMENTAL rte_ml_dev_socket_id
> lib/mldev/version.map EXPERIMENTAL rte_ml_dev_start
> lib/mldev/version.map EXPERIMENTAL rte_ml_dev_stats_get
> lib/mldev/version.map EXPERIMENTAL rte_ml_dev_stats_reset
> lib/mldev/version.map EXPERIMENTAL rte_ml_dev_stop
> lib/mldev/version.map EXPERIMENTAL rte_ml_dev_xstats_by_name_get
> lib/mldev/version.map EXPERIMENTAL rte_ml_dev_xstats_get
> lib/mldev/version.map EXPERIMENTAL rte_ml_dev_xstats_names_get
> lib/mldev/version.map EXPERIMENTAL rte_ml_dev_xstats_reset
> lib/mldev/version.map EXPERIMENTAL rte_ml_enqueue_burst
> lib/mldev/version.map EXPERIMENTAL rte_ml_io_dequantize
> lib/mldev/version.map EXPERIMENTAL rte_ml_io_quantize
> lib/mldev/version.map EXPERIMENTAL rte_ml_model_info_get
> lib/mldev/version.map EXPERIMENTAL rte_ml_model_load
> lib/mldev/version.map EXPERIMENTAL rte_ml_model_params_update
> lib/mldev/version.map EXPERIMENTAL rte_ml_model_start
> lib/mldev/version.map EXPERIMENTAL rte_ml_model_stop
> lib/mldev/version.map EXPERIMENTAL rte_ml_model_unload
> lib/mldev/version.map EXPERIMENTAL rte_ml_op_error_get
> lib/mldev/version.map EXPERIMENTAL rte_ml_op_pool_create
> lib/mldev/version.map EXPERIMENTAL rte_ml_op_pool_free
> lib/argparse/version.map EXPERIMENTAL rte_argparse_parse
> lib/argparse/version.map EXPERIMENTAL rte_argparse_parse_type
>

I sent a respin, fixing all existing issues.
If the respin has no objection, I will discard this current patch.


-- 
David Marchand



More information about the dev mailing list