* [dpdk-dev] [PATCH] power: fix traffic aware compilation errors
@ 2018-10-26 12:38 David Hunt
2018-10-26 12:53 ` Thomas Monjalon
2018-10-26 13:51 ` Liang, Ma
0 siblings, 2 replies; 3+ messages in thread
From: David Hunt @ 2018-10-26 12:38 UTC (permalink / raw)
To: dev, david.hunt; +Cc: liang.j.ma
1. %ld to PRId64 for 32-bit builds
2. Fix dependency on librte_timer
Fixes: 450f0791312c ("power: add traffic pattern aware power control")
Signed-off-by: David Hunt <david.hunt@intel.com>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
lib/Makefile | 2 +-
lib/librte_power/rte_power_empty_poll.c | 13 +++++++------
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/lib/Makefile b/lib/Makefile
index 8c839425d..9ad10e0b6 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -71,7 +71,7 @@ DEPDIRS-librte_bitratestats := librte_eal librte_metrics librte_ethdev
DIRS-$(CONFIG_RTE_LIBRTE_LATENCY_STATS) += librte_latencystats
DEPDIRS-librte_latencystats := librte_eal librte_metrics librte_ethdev librte_mbuf
DIRS-$(CONFIG_RTE_LIBRTE_POWER) += librte_power
-DEPDIRS-librte_power := librte_eal
+DEPDIRS-librte_power := librte_eal librte_timer
DIRS-$(CONFIG_RTE_LIBRTE_METER) += librte_meter
DEPDIRS-librte_meter := librte_eal
DIRS-$(CONFIG_RTE_LIBRTE_FLOW_CLASSIFY) += librte_flow_classify
diff --git a/lib/librte_power/rte_power_empty_poll.c b/lib/librte_power/rte_power_empty_poll.c
index c1e10e02d..e6145462f 100644
--- a/lib/librte_power/rte_power_empty_poll.c
+++ b/lib/librte_power/rte_power_empty_poll.c
@@ -8,6 +8,7 @@
#include <rte_cycles.h>
#include <rte_atomic.h>
#include <rte_malloc.h>
+#include <inttypes.h>
#include "rte_power.h"
#include "rte_power_empty_poll.h"
@@ -226,8 +227,8 @@ update_stats(struct priority_worker *poll_stats)
/* edpi mean empty poll counter difference per interval */
RTE_LOG(DEBUG, POWER, "cur_edpi is too large "
- "cur edpi %ld "
- "base edpi %ld\n",
+ "cur edpi %"PRId64" "
+ "base edpi %"PRId64"\n",
cur_edpi,
s->thresh[s->cur_freq].base_edpi);
/* Value to make us fail need debug log*/
@@ -261,7 +262,7 @@ update_stats_normal(struct priority_worker *poll_stats)
enum freq_val cur_freq = poll_stats->cur_freq;
/* edpi mean empty poll counter difference per interval */
- RTE_LOG(DEBUG, POWER, "cure freq is %d, edpi is %lu\n",
+ RTE_LOG(DEBUG, POWER, "cure freq is %d, edpi is %"PRIu64"\n",
cur_freq,
poll_stats->thresh[cur_freq].base_edpi);
return;
@@ -346,14 +347,14 @@ empty_poll_training(struct priority_worker *poll_stats,
set_state(poll_stats, MED_NORMAL);
- RTE_LOG(INFO, POWER, "LOW threshold is %lu\n",
+ RTE_LOG(INFO, POWER, "LOW threshold is %"PRIu64"\n",
poll_stats->thresh[LOW].base_edpi);
- RTE_LOG(INFO, POWER, "MED threshold is %lu\n",
+ RTE_LOG(INFO, POWER, "MED threshold is %"PRIu64"\n",
poll_stats->thresh[MED].base_edpi);
- RTE_LOG(INFO, POWER, "HIGH threshold is %lu\n",
+ RTE_LOG(INFO, POWER, "HIGH threshold is %"PRIu64"\n",
poll_stats->thresh[HGH].base_edpi);
RTE_LOG(INFO, POWER, "Training is Complete for %d\n",
--
2.17.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] power: fix traffic aware compilation errors
2018-10-26 12:38 [dpdk-dev] [PATCH] power: fix traffic aware compilation errors David Hunt
@ 2018-10-26 12:53 ` Thomas Monjalon
2018-10-26 13:51 ` Liang, Ma
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2018-10-26 12:53 UTC (permalink / raw)
To: David Hunt; +Cc: dev, liang.j.ma, ferruh.yigit
26/10/2018 14:38, David Hunt:
> 1. %ld to PRId64 for 32-bit builds
> 2. Fix dependency on librte_timer
>
> Fixes: 450f0791312c ("power: add traffic pattern aware power control")
>
> Signed-off-by: David Hunt <david.hunt@intel.com>
> Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Applied, thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] power: fix traffic aware compilation errors
2018-10-26 12:38 [dpdk-dev] [PATCH] power: fix traffic aware compilation errors David Hunt
2018-10-26 12:53 ` Thomas Monjalon
@ 2018-10-26 13:51 ` Liang, Ma
1 sibling, 0 replies; 3+ messages in thread
From: Liang, Ma @ 2018-10-26 13:51 UTC (permalink / raw)
To: David Hunt; +Cc: dev
Hi Dave,
Many thanks!
Regards
Liang
On 26 Oct 13:38, David Hunt wrote:
> 1. %ld to PRId64 for 32-bit builds
> 2. Fix dependency on librte_timer
>
> Fixes: 450f0791312c ("power: add traffic pattern aware power control")
>
> Signed-off-by: David Hunt <david.hunt@intel.com>
> Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
> lib/Makefile | 2 +-
> lib/librte_power/rte_power_empty_poll.c | 13 +++++++------
> 2 files changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/lib/Makefile b/lib/Makefile
> index 8c839425d..9ad10e0b6 100644
> --- a/lib/Makefile
> +++ b/lib/Makefile
> @@ -71,7 +71,7 @@ DEPDIRS-librte_bitratestats := librte_eal librte_metrics librte_ethdev
> DIRS-$(CONFIG_RTE_LIBRTE_LATENCY_STATS) += librte_latencystats
> DEPDIRS-librte_latencystats := librte_eal librte_metrics librte_ethdev librte_mbuf
> DIRS-$(CONFIG_RTE_LIBRTE_POWER) += librte_power
> -DEPDIRS-librte_power := librte_eal
> +DEPDIRS-librte_power := librte_eal librte_timer
> DIRS-$(CONFIG_RTE_LIBRTE_METER) += librte_meter
> DEPDIRS-librte_meter := librte_eal
> DIRS-$(CONFIG_RTE_LIBRTE_FLOW_CLASSIFY) += librte_flow_classify
> diff --git a/lib/librte_power/rte_power_empty_poll.c b/lib/librte_power/rte_power_empty_poll.c
> index c1e10e02d..e6145462f 100644
> --- a/lib/librte_power/rte_power_empty_poll.c
> +++ b/lib/librte_power/rte_power_empty_poll.c
> @@ -8,6 +8,7 @@
> #include <rte_cycles.h>
> #include <rte_atomic.h>
> #include <rte_malloc.h>
> +#include <inttypes.h>
>
> #include "rte_power.h"
> #include "rte_power_empty_poll.h"
> @@ -226,8 +227,8 @@ update_stats(struct priority_worker *poll_stats)
>
> /* edpi mean empty poll counter difference per interval */
> RTE_LOG(DEBUG, POWER, "cur_edpi is too large "
> - "cur edpi %ld "
> - "base edpi %ld\n",
> + "cur edpi %"PRId64" "
> + "base edpi %"PRId64"\n",
> cur_edpi,
> s->thresh[s->cur_freq].base_edpi);
> /* Value to make us fail need debug log*/
> @@ -261,7 +262,7 @@ update_stats_normal(struct priority_worker *poll_stats)
> enum freq_val cur_freq = poll_stats->cur_freq;
>
> /* edpi mean empty poll counter difference per interval */
> - RTE_LOG(DEBUG, POWER, "cure freq is %d, edpi is %lu\n",
> + RTE_LOG(DEBUG, POWER, "cure freq is %d, edpi is %"PRIu64"\n",
> cur_freq,
> poll_stats->thresh[cur_freq].base_edpi);
> return;
> @@ -346,14 +347,14 @@ empty_poll_training(struct priority_worker *poll_stats,
>
> set_state(poll_stats, MED_NORMAL);
>
> - RTE_LOG(INFO, POWER, "LOW threshold is %lu\n",
> + RTE_LOG(INFO, POWER, "LOW threshold is %"PRIu64"\n",
> poll_stats->thresh[LOW].base_edpi);
>
> - RTE_LOG(INFO, POWER, "MED threshold is %lu\n",
> + RTE_LOG(INFO, POWER, "MED threshold is %"PRIu64"\n",
> poll_stats->thresh[MED].base_edpi);
>
>
> - RTE_LOG(INFO, POWER, "HIGH threshold is %lu\n",
> + RTE_LOG(INFO, POWER, "HIGH threshold is %"PRIu64"\n",
> poll_stats->thresh[HGH].base_edpi);
>
> RTE_LOG(INFO, POWER, "Training is Complete for %d\n",
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-10-26 13:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-26 12:38 [dpdk-dev] [PATCH] power: fix traffic aware compilation errors David Hunt
2018-10-26 12:53 ` Thomas Monjalon
2018-10-26 13:51 ` Liang, Ma
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).