patches for DPDK stable branches
 help / color / Atom feed
* [dpdk-stable] [PATCH] app/testpmd: fix name of bitrate library in meson build
@ 2020-09-02 15:56 Bruce Richardson
  2020-09-02 16:24 ` [dpdk-stable] [PATCH v2] " Bruce Richardson
  0 siblings, 1 reply; 5+ messages in thread
From: Bruce Richardson @ 2020-09-02 15:56 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, stable

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 <bruce.richardson@intel.com>
---

The exact commit to attribute the bug to is complicated, but I'm chosing
the above commit as the one where the issue of the different macro should
have been originally spotted.
---
 app/test-pmd/meson.build  |  3 +++
 app/test-pmd/parameters.c |  4 ++--
 app/test-pmd/testpmd.c    | 12 ++++++------
 app/test-pmd/testpmd.h    |  2 +-
 4 files changed, 12 insertions(+), 9 deletions(-)

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 7cb0e3d6ec..9b0c0582d0 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -613,7 +613,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_BITRATESTATSSTATS
 		{ "bitrate-stats",              1, 0, 0 },
 #endif
 		{ "disable-crc-strip",          0, 0, 0 },
@@ -986,7 +986,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 7842c3b781..d92c0ecc1f 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -54,7 +54,7 @@
 #endif
 #include <rte_flow.h>
 #include <rte_metrics.h>
-#ifdef RTE_LIBRTE_BITRATE
+#ifdef RTE_LIBRTE_BITRATESTATS
 #include <rte_bitrate.h>
 #endif
 #ifdef RTE_LIBRTE_LATENCY_STATS
@@ -478,7 +478,7 @@ uint8_t xstats_hide_zero;
 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;
@@ -2063,7 +2063,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;
@@ -2078,7 +2078,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();
@@ -3706,7 +3706,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
@@ -3800,7 +3800,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 25a12b14f2..4fa9797f7e 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -407,7 +407,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
-- 
2.25.1


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

* [dpdk-stable] [PATCH v2] app/testpmd: fix name of bitrate library in meson build
  2020-09-02 15:56 [dpdk-stable] [PATCH] app/testpmd: fix name of bitrate library in meson build Bruce Richardson
@ 2020-09-02 16:24 ` " Bruce Richardson
  2020-09-08  5:35   ` [dpdk-stable] [dpdk-dev] " Jiang, YuX
  0 siblings, 1 reply; 5+ messages in thread
From: Bruce Richardson @ 2020-09-02 16:24 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, stable

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 <bruce.richardson@intel.com>
---
v2: fixed search-replace fail, where I ended up with "BITRATESTATSSTATS".
    Thanks to dmarchand for his eagle-eyes in spotting this quickly. :-)

The exact commit to attribute the bug to is complicated, but I'm chosing
the above commit as the one where the issue of the different macro should
have been originally spotted.
---
 app/test-pmd/meson.build  |  3 +++
 app/test-pmd/parameters.c |  4 ++--
 app/test-pmd/testpmd.c    | 12 ++++++------
 app/test-pmd/testpmd.h    |  2 +-
 4 files changed, 12 insertions(+), 9 deletions(-)

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 7cb0e3d6ec..2a4cb6d2b7 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -613,7 +613,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 },
@@ -986,7 +986,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 7842c3b781..d92c0ecc1f 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -54,7 +54,7 @@
 #endif
 #include <rte_flow.h>
 #include <rte_metrics.h>
-#ifdef RTE_LIBRTE_BITRATE
+#ifdef RTE_LIBRTE_BITRATESTATS
 #include <rte_bitrate.h>
 #endif
 #ifdef RTE_LIBRTE_LATENCY_STATS
@@ -478,7 +478,7 @@ uint8_t xstats_hide_zero;
 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;
@@ -2063,7 +2063,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;
@@ -2078,7 +2078,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();
@@ -3706,7 +3706,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
@@ -3800,7 +3800,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 25a12b14f2..4fa9797f7e 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -407,7 +407,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
-- 
2.25.1


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

* Re: [dpdk-stable] [dpdk-dev] [PATCH v2] app/testpmd: fix name of bitrate library in meson build
  2020-09-02 16:24 ` [dpdk-stable] [PATCH v2] " Bruce Richardson
@ 2020-09-08  5:35   ` " Jiang, YuX
  2020-09-08  6:21     ` Ling, WeiX
  0 siblings, 1 reply; 5+ messages in thread
From: Jiang, YuX @ 2020-09-08  5:35 UTC (permalink / raw)
  To: Richardson, Bruce, dev; +Cc: Richardson, Bruce, stable

+ weix.ling@intel.com

-----Original Message-----
From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Bruce Richardson
Sent: Thursday, September 3, 2020 12:24 AM
To: dev@dpdk.org
Cc: Richardson, Bruce <bruce.richardson@intel.com>; stable@dpdk.org
Subject: [dpdk-dev] [PATCH v2] 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 <bruce.richardson@intel.com>
---
v2: fixed search-replace fail, where I ended up with "BITRATESTATSSTATS".
    Thanks to dmarchand for his eagle-eyes in spotting this quickly. :-)

The exact commit to attribute the bug to is complicated, but I'm chosing the above commit as the one where the issue of the different macro should have been originally spotted.
---
 app/test-pmd/meson.build  |  3 +++
 app/test-pmd/parameters.c |  4 ++--
 app/test-pmd/testpmd.c    | 12 ++++++------
 app/test-pmd/testpmd.h    |  2 +-
 4 files changed, 12 insertions(+), 9 deletions(-)

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 7cb0e3d6ec..2a4cb6d2b7 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -613,7 +613,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 },
@@ -986,7 +986,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 7842c3b781..d92c0ecc1f 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -54,7 +54,7 @@
 #endif
 #include <rte_flow.h>
 #include <rte_metrics.h>
-#ifdef RTE_LIBRTE_BITRATE
+#ifdef RTE_LIBRTE_BITRATESTATS
 #include <rte_bitrate.h>
 #endif
 #ifdef RTE_LIBRTE_LATENCY_STATS
@@ -478,7 +478,7 @@ uint8_t xstats_hide_zero;  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; @@ -2063,7 +2063,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;
@@ -2078,7 +2078,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();
@@ -3706,7 +3706,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
@@ -3800,7 +3800,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 25a12b14f2..4fa9797f7e 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -407,7 +407,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
--
2.25.1


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

* Re: [dpdk-stable] [dpdk-dev] [PATCH v2] app/testpmd: fix name of bitrate library in meson build
  2020-09-08  5:35   ` [dpdk-stable] [dpdk-dev] " Jiang, YuX
@ 2020-09-08  6:21     ` Ling, WeiX
  2020-09-15 12:04       ` Ferruh Yigit
  0 siblings, 1 reply; 5+ messages in thread
From: Ling, WeiX @ 2020-09-08  6:21 UTC (permalink / raw)
  To: Jiang, YuX, Richardson, Bruce, dev; +Cc: Richardson, Bruce, stable

Tested-by: Ling Wei<weix.ling@intel.com>

Regards,
Ling Wei

-----Original Message-----
From: dev <dev-bounces@dpdk.org> On Behalf Of Jiang, YuX
Sent: Tuesday, September 8, 2020 01:35 PM
To: Richardson, Bruce <bruce.richardson@intel.com>; dev@dpdk.org
Cc: Richardson, Bruce <bruce.richardson@intel.com>; stable@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2] app/testpmd: fix name of bitrate library in meson build

+ weix.ling@intel.com

-----Original Message-----
From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Bruce Richardson
Sent: Thursday, September 3, 2020 12:24 AM
To: dev@dpdk.org
Cc: Richardson, Bruce <bruce.richardson@intel.com>; stable@dpdk.org
Subject: [dpdk-dev] [PATCH v2] 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 <bruce.richardson@intel.com>
---
v2: fixed search-replace fail, where I ended up with "BITRATESTATSSTATS".
    Thanks to dmarchand for his eagle-eyes in spotting this quickly. :-)

The exact commit to attribute the bug to is complicated, but I'm chosing the above commit as the one where the issue of the different macro should have been originally spotted.
---
 app/test-pmd/meson.build  |  3 +++
 app/test-pmd/parameters.c |  4 ++--
 app/test-pmd/testpmd.c    | 12 ++++++------
 app/test-pmd/testpmd.h    |  2 +-
 4 files changed, 12 insertions(+), 9 deletions(-)

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 7cb0e3d6ec..2a4cb6d2b7 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -613,7 +613,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 },
@@ -986,7 +986,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 7842c3b781..d92c0ecc1f 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -54,7 +54,7 @@
 #endif
 #include <rte_flow.h>
 #include <rte_metrics.h>
-#ifdef RTE_LIBRTE_BITRATE
+#ifdef RTE_LIBRTE_BITRATESTATS
 #include <rte_bitrate.h>
 #endif
 #ifdef RTE_LIBRTE_LATENCY_STATS
@@ -478,7 +478,7 @@ uint8_t xstats_hide_zero;  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; @@ -2063,7 +2063,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;
@@ -2078,7 +2078,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();
@@ -3706,7 +3706,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
@@ -3800,7 +3800,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 25a12b14f2..4fa9797f7e 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -407,7 +407,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
--
2.25.1


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

* Re: [dpdk-stable] [dpdk-dev] [PATCH v2] app/testpmd: fix name of bitrate library in meson build
  2020-09-08  6:21     ` Ling, WeiX
@ 2020-09-15 12:04       ` Ferruh Yigit
  0 siblings, 0 replies; 5+ messages in thread
From: Ferruh Yigit @ 2020-09-15 12:04 UTC (permalink / raw)
  To: Ling, WeiX, Jiang, YuX, Richardson, Bruce, dev; +Cc: stable

On 9/8/2020 7:21 AM, Ling, WeiX wrote:

<...>

> 
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Bruce Richardson
> Sent: Thursday, September 3, 2020 12:24 AM
> To: dev@dpdk.org
> Cc: Richardson, Bruce <bruce.richardson@intel.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH v2] 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 <bruce.richardson@intel.com>
>
> Tested-by: Ling Wei<weix.ling@intel.com>
>

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied to dpdk-next-net/main, thanks.

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

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-02 15:56 [dpdk-stable] [PATCH] app/testpmd: fix name of bitrate library in meson build Bruce Richardson
2020-09-02 16:24 ` [dpdk-stable] [PATCH v2] " Bruce Richardson
2020-09-08  5:35   ` [dpdk-stable] [dpdk-dev] " Jiang, YuX
2020-09-08  6:21     ` Ling, WeiX
2020-09-15 12:04       ` Ferruh Yigit

patches for DPDK stable branches

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/ public-inbox