devargs: unify scratch buffer storage
authorXueming Li <xuemingl@nvidia.com>
Tue, 13 Apr 2021 03:14:08 +0000 (03:14 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 14 Apr 2021 20:25:08 +0000 (22:25 +0200)
commit64051bb1f144c418f3fc76e6d0973337b05d5886
tree826130ac3f87d82897c65a893a7427d22df39234
parent9667d97c250729eba96f95daa16c248d9bef27f3
devargs: unify scratch buffer storage

In current design, legacy parser rte_devargs_parse() saved scratch
buffer to devargs.args while new parser rte_devargs_layers_parse() saved
to devargs.data. Code using devargs had to know the difference and
cleaned up memory accordingly - error prone.

This patch unifies scratch buffer to data field, introduces
rte_devargs_reset() function to wrap the memory clean up logic.

Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
Reviewed-by: Gaetan Rivet <grive@u256.net>
12 files changed:
app/test-pmd/config.c
app/test-pmd/testpmd.c
drivers/bus/vdev/vdev.c
drivers/net/failsafe/failsafe_args.c
drivers/net/failsafe/failsafe_eal.c
examples/multi_process/hotplug_mp/commands.c
lib/librte_eal/common/eal_common_dev.c
lib/librte_eal/common/eal_common_devargs.c
lib/librte_eal/common/hotplug_mp.c
lib/librte_eal/include/rte_devargs.h
lib/librte_eal/version.map
lib/librte_ethdev/rte_ethdev.c