DPDK patches and discussions
 help / color / mirror / Atom feed
* If feeling bored
@ 2023-09-12 16:46 Morten Brørup
  2023-09-12 17:50 ` David Marchand
  0 siblings, 1 reply; 3+ messages in thread
From: Morten Brørup @ 2023-09-12 16:46 UTC (permalink / raw)
  To: dev

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: If feeling bored
  2023-09-12 16:46 If feeling bored Morten Brørup
@ 2023-09-12 17:50 ` David Marchand
  2023-09-12 22:21   ` Morten Brørup
  0 siblings, 1 reply; 3+ messages in thread
From: David Marchand @ 2023-09-12 17:50 UTC (permalink / raw)
  To: Morten Brørup; +Cc: dev

On Tue, Sep 12, 2023 at 5:46 PM Morten Brørup <mb@smartsharesystems.com> wrote:
> 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



-- 
David Marchand


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: If feeling bored
  2023-09-12 17:50 ` David Marchand
@ 2023-09-12 22:21   ` Morten Brørup
  0 siblings, 0 replies; 3+ messages in thread
From: Morten Brørup @ 2023-09-12 22:21 UTC (permalink / raw)
  To: David Marchand; +Cc: dev

> From: David Marchand [mailto:david.marchand@redhat.com]
> Sent: Tuesday, 12 September 2023 18.50
> 
> On Tue, Sep 12, 2023 at 5:46 PM Morten Brørup <mb@smartsharesystems.com>
> wrote:
> > 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?

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
RTE_LIBRTE_BBDEV_SKIP_VALIDATE
RTE_LIBRTE_BNX2X_DEBUG_PERIODIC
RTE_LIBRTE_BNX2X_DEBUG_RX
RTE_LIBRTE_BNX2X_DEBUG_TX
RTE_LIBRTE_BPF_ELF
RTE_LIBRTE_DPAA_MAX_CRYPTODEV
RTE_LIBRTE_DPAA2_USE_PHYS_IOVA
RTE_LIBRTE_EAL_VMWARE_TSC_MAP_SUPPORT
RTE_LIBRTE_ETHDEV_DEBUG
RTE_LIBRTE_FM10K_RX_OLFLAGS_ENABLE
RTE_LIBRTE_GRAPH_STATS
RTE_LIBRTE_HNS3_MAX_TQP_NUM_PER_PF
RTE_LIBRTE_I40E_16BYTE_RX_DESC
RTE_LIBRTE_I40E_QUEUE_NUM_PER_PF
RTE_LIBRTE_I40E_QUEUE_NUM_PER_VF
RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM
RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC
RTE_LIBRTE_IP_FRAG_MAX
RTE_LIBRTE_IP_FRAG_MAX_FRAG
RTE_LIBRTE_IP_FRAG_MAX_FRAGS
RTE_LIBRTE_IP_FRAG_TBL_STAT
RTE_LIBRTE_IXGBE_BYPASS
RTE_LIBRTE_MBUF_DEBUG
RTE_LIBRTE_MEMPOOL_DEBUG
RTE_LIBRTE_MEMPOOL_STATS
RTE_LIBRTE_ML_DEV_DEBUG
RTE_LIBRTE_MLX4_DEBUG
RTE_LIBRTE_MLX5_DEBUG
RTE_LIBRTE_NGBE_TM
RTE_LIBRTE_PMD_BBDEV_LA12XX
RTE_LIBRTE_PMD_DLB2_QUELL_STATS
RTE_LIBRTE_QEDE_DEBUG_RX
RTE_LIBRTE_QEDE_DEBUG_TX
RTE_LIBRTE_QEDE_FW
RTE_LIBRTE_RCU_DEBUG
RTE_LIBRTE_RING_DEBUG
RTE_LIBRTE_SFC_EFX_DEBUG
RTE_LIBRTE_TIMER_DEBUG
RTE_LIBRTE_TXGBE_DEBUG_RX
RTE_LIBRTE_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

> 
> $ 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-09-12 22:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-12 16:46 If feeling bored Morten Brørup
2023-09-12 17:50 ` David Marchand
2023-09-12 22:21   ` Morten Brørup

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).