Skip to contentSkip to conversation

If feeling bored

DISCUSSION Morten Brørup 2 participants 3 messages Sep 12, 2023

lore
Share & tools
lore
#0 lore raw

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.

#1 lore raw
Quoted 3 lines · Morten Brørup

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.

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   22337
Signature · 1 line
David Marchand
#2 lore raw
Quoted 11 lines

From: David Marchand [mailto:[email protected]]
Sent: Tuesday, 12 September 2023 18.50

Quoted 1 line · Morten Brørup

RTE_LIBRTE_xxx seems redundant. There are still a bunch of those in

DPDK, 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@_COMMON
RTE_LIBRTE_ARK_MIN_TX_PKTLEN
RTE_LIBRTE_AVP_DEBUG_BUFFERS
R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RTE_TXGBE_DEBUG_TX
RTE_LIBRTE_TXGBE_DEBUG_TX_FREE
RTE_LIBRTE_TXGBE_PF_DISABLE_STRIP_CRC
RTE_LIBRTE_TXGBE_TM
RTE_LIBRTE_VHOST_NUMA
RTE_LIBRTE_VHOST_POSTCOPY

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