[dpdk-dev] [PATCH 0/6] app/testpmd: add runtime config

Ferruh Yigit ferruh.yigit at intel.com
Wed Aug 26 18:33:20 CEST 2020


On 7/14/2020 10:51 PM, Dharmik Thakkar wrote:
> Meson build system lacks support for
> CONFIG_RTE_TEST_PMD_RECORD_CORE_CYCLES and
> CONFIG_RTE_TEST_PMD_RECORD_BURST_STATS configuration options.
> 
> One solution is to add these options within meson_options.txt
> 
> Since adding these as runtime config causes no performance impact,

Hi Dharmik,

These are on the datapath, and even disable there will be additional checks,
isn't it expected to have some impact?
Did you do any measurements for it?

> it makes sense to enable these as runtime config alongside other
> available runtime options within testpmd.

If there is performance impact,
another option can be still using the compile time config with meson.
As Jerin suggested previously, or Ed is doing in his patch right now, something
like:


 #ifdef RTE_TEST_PMD_RECORD_CORE_CYCLES
 const int record_core_cycles = 1;
 #else
 const int record_core_cycles = 0;
 #endif

 static inline void
 get_start_cycles(uint64_t *start_tsc)
 {
 	if (record_core_cycles)
 		*start_tsc = rte_rdtsc();
 }


When meson compiled by default, compiler will optimize out the code during
compile time.

To enable it, can provide the config option with CFLAGS,
CFLAGS="-DRTE_TEST_PMD_RECORD_CORE_CYCLES" meson build

> 
> Dharmik Thakkar (5):
>   app/testpmd: add record-core-cycles runtime config
>   doc: add record-core-cycles to testpmd funcs doc
>   app/testpmd: add record-burst-stats runtime config
>   doc: add record-burst-stats to testpmd funcs doc
>   app/testpmd: enable empty polls in 5tswap
> 
> Phil Yang (1):
>   app/testpmd: enable burst stats for noisy vnf mode
> 
>  app/test-pmd/5tswap.c                       | 25 ++----
>  app/test-pmd/cmdline.c                      | 92 +++++++++++++++++++++
>  app/test-pmd/config.c                       | 12 +++
>  app/test-pmd/csumonly.c                     | 24 ++----
>  app/test-pmd/flowgen.c                      | 21 ++---
>  app/test-pmd/icmpecho.c                     | 24 ++----
>  app/test-pmd/iofwd.c                        | 26 ++----
>  app/test-pmd/macfwd.c                       | 25 ++----
>  app/test-pmd/macswap.c                      | 24 ++----
>  app/test-pmd/noisy_vnf.c                    |  4 +
>  app/test-pmd/parameters.c                   | 11 ++-
>  app/test-pmd/rxonly.c                       | 19 +----
>  app/test-pmd/testpmd.c                      | 77 ++++++++---------
>  app/test-pmd/testpmd.h                      | 38 +++++++--
>  app/test-pmd/txonly.c                       | 20 +----
>  doc/guides/testpmd_app_ug/run_app.rst       |  8 ++
>  doc/guides/testpmd_app_ug/testpmd_funcs.rst | 30 +++++++
>  17 files changed, 272 insertions(+), 208 deletions(-)
> 



More information about the dev mailing list