If feeling bored
For the script sharks...
RTE_LIBRTE_xxx seems redundant. There are still a bunch of those in DPDK, which could be replaced by RTE_xxx.
Cleaning up this will probably break the API.
Quoted 3 lines · Morten Brørup
RTE_LIBRTE_xxxseems redundant. There are still a bunch of those in DPDK, which could be replaced byRTE_xxx.Cleaning up this will probably break the API.
If we exclude config/ doc/ and any rte_.*.h header, we should be good?
$ for pattern in $(git grep -o 'RTE_LIBRTE_[A-Z0-9_]*' ':^**/rte**.h'
':^config/' ':^doc/'); do file=${pattern%%:*}; symbol=${pattern##*:};
! git grep -wq $symbol '**/rte**.h' config/ doc/ || continue; sed -i
-e "s/$symbol/${symbol##RTE_LIB}/g" $file; done
$ git diff --stat
...
135 files changed, 437 insertions(+), 437 deletions(-)$ ninja -C build ...
There are still some exposed defines but it is a first move forward.
$ git grep RTE_LIBRTE_ | wc
306 1010 22337Signature · 1 line
David Marchand
Quoted 11 lines
From: David Marchand [mailto:[email protected]]
Sent: Tuesday, 12 September 2023 18.50Quoted 1 line · Morten Brørup
RTE_LIBRTE_xxxseems redundant. There are still a bunch of those inDPDK, which could be replaced by
RTE_xxx.Quoted 2 lines
Cleaning up this will probably break the API.
If we exclude config/ doc/ and any rte_.*.h header, we should be good?
Along with rte_*.h, we would also need to exclude all meson.build files.
But I'm not sure it's that simple...
E.g. RTE_LIBRTE_I40E_QUEUE_NUM_PER_PF is in config/rte_config.h but also in drivers/net/i40e/i40e_ethdev.c and doc/guides/nics/i40e.rst.
I think we need to replace them all.
grep -r "RTE_LIBRTE_" lib/ app/ drivers/ buildtools/ config/ devtools/ doc/ dts/ examples/ usertools/
And some simple manual processing of the output gives this list of 48 unique names with this prefix:
RTE_LIBRTE_@0@_COMMONRTE_LIBRTE_ARK_MIN_TX_PKTLENRTE_LIBRTE_AVP_DEBUG_BUFFERSRTE_LIBRTE_BBDEV_SKIP_VALIDATERTE_LIBRTE_BNX2X_DEBUG_PERIODICRTE_LIBRTE_BNX2X_DEBUG_RXRTE_LIBRTE_BNX2X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PY
Quoted 21 lines
$ for pattern in $(git grep -o 'RTE_LIBRTE_[A-Z0-9_]*' ':^**/rte**.h' ':^config/' ':^doc/'); do file=${pattern%%:*}; symbol=${pattern##*:}; ! git grep -wq $symbol '**/rte**.h' config/ doc/ || continue; sed -i -e "s/$symbol/${symbol##RTE_LIB}/g" $file; done $ git diff --stat ... 135 files changed, 437 insertions(+), 437 deletions(-)$ ninja -C build ...There are still some exposed defines but it is a first move forward.
$ git grep RTE_LIBRTE_ | wc 306 1010 22337--
David Marchand