From: Bruce Richardson Date: Wed, 2 Sep 2020 16:24:27 +0000 (+0100) Subject: app/testpmd: fix name of bitrate library in meson build X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=54f89e3df4b16e9079c9d343870d16757429b68b;p=dpdk.git app/testpmd: fix name of bitrate library in meson build The bitrate library in DPDK is actually in a "bitratestats" directory, so that is used by meson for the macro and library name. Therefore, we need to update references to RTE_LIBRTE_BITRATE to RTE_LIBRTE_BITRATESTATS in testpmd to have it found. Rather than supporting both defines, since make is being removed, we can just replace all instances of the former define with the latter. To ensure testpmd links ok when this is done, we also need to add bitratestats to the list of library dependencies. Fixes: 5b9656b157d3 ("lib: build with meson") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson Tested-by: Wei Ling Reviewed-by: Ferruh Yigit --- diff --git a/app/test-pmd/meson.build b/app/test-pmd/meson.build index ea56e547bb..f52ab148f6 100644 --- a/app/test-pmd/meson.build +++ b/app/test-pmd/meson.build @@ -25,6 +25,9 @@ sources = files('5tswap.c', 'util.c') deps += ['ethdev', 'gro', 'gso', 'cmdline', 'metrics', 'meter', 'bus_pci'] +if dpdk_conf.has('RTE_LIBRTE_BITRATESTATS') + deps += 'bitratestats' +endif if dpdk_conf.has('RTE_LIBRTE_PDUMP') deps += 'pdump' endif diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c index 784515314e..8c2aa13dd3 100644 --- a/app/test-pmd/parameters.c +++ b/app/test-pmd/parameters.c @@ -616,7 +616,7 @@ launch_args_parse(int argc, char** argv) #ifdef RTE_LIBRTE_LATENCY_STATS { "latencystats", 1, 0, 0 }, #endif -#ifdef RTE_LIBRTE_BITRATE +#ifdef RTE_LIBRTE_BITRATESTATS { "bitrate-stats", 1, 0, 0 }, #endif { "disable-crc-strip", 0, 0, 0 }, @@ -991,7 +991,7 @@ launch_args_parse(int argc, char** argv) " must be >= 0\n", n); } #endif -#ifdef RTE_LIBRTE_BITRATE +#ifdef RTE_LIBRTE_BITRATESTATS if (!strcmp(lgopts[opt_idx].name, "bitrate-stats")) { n = atoi(optarg); if (n >= 0) { diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index fb286b86e5..ee3dd27d81 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -54,7 +54,7 @@ #endif #include #include -#ifdef RTE_LIBRTE_BITRATE +#ifdef RTE_LIBRTE_BITRATESTATS #include #endif #ifdef RTE_LIBRTE_LATENCY_STATS @@ -488,7 +488,7 @@ uint8_t record_burst_stats; unsigned int num_sockets = 0; unsigned int socket_ids[RTE_MAX_NUMA_NODES]; -#ifdef RTE_LIBRTE_BITRATE +#ifdef RTE_LIBRTE_BITRATESTATS /* Bitrate statistics */ struct rte_stats_bitrates *bitrate_data; lcoreid_t bitrate_lcore_id; @@ -2064,7 +2064,7 @@ run_pkt_fwd_on_lcore(struct fwd_lcore *fc, packet_fwd_t pkt_fwd) struct fwd_stream **fsm; streamid_t nb_fs; streamid_t sm_id; -#ifdef RTE_LIBRTE_BITRATE +#ifdef RTE_LIBRTE_BITRATESTATS uint64_t tics_per_1sec; uint64_t tics_datum; uint64_t tics_current; @@ -2079,7 +2079,7 @@ run_pkt_fwd_on_lcore(struct fwd_lcore *fc, packet_fwd_t pkt_fwd) do { for (sm_id = 0; sm_id < nb_fs; sm_id++) (*pkt_fwd)(fsm[sm_id]); -#ifdef RTE_LIBRTE_BITRATE +#ifdef RTE_LIBRTE_BITRATESTATS if (bitrate_enabled != 0 && bitrate_lcore_id == rte_lcore_id()) { tics_current = rte_rdtsc(); @@ -3707,7 +3707,7 @@ main(int argc, char** argv) "Check the core mask argument\n"); /* Bitrate/latency stats disabled by default */ -#ifdef RTE_LIBRTE_BITRATE +#ifdef RTE_LIBRTE_BITRATESTATS bitrate_enabled = 0; #endif #ifdef RTE_LIBRTE_LATENCY_STATS @@ -3801,7 +3801,7 @@ main(int argc, char** argv) #endif /* Setup bitrate stats */ -#ifdef RTE_LIBRTE_BITRATE +#ifdef RTE_LIBRTE_BITRATESTATS if (bitrate_enabled != 0) { bitrate_data = rte_stats_bitrate_create(); if (bitrate_data == NULL) diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index a8ae5cceb1..f139fe7a0a 100644 --- a/app/test-pmd/testpmd.h +++ b/app/test-pmd/testpmd.h @@ -403,7 +403,7 @@ extern uint8_t latencystats_enabled; extern lcoreid_t latencystats_lcore_id; #endif -#ifdef RTE_LIBRTE_BITRATE +#ifdef RTE_LIBRTE_BITRATESTATS extern lcoreid_t bitrate_lcore_id; extern uint8_t bitrate_enabled; #endif