net/axgbe: support setting MAC address
[dpdk.git] / lib / librte_power / power_pstate_cpufreq.c
index 44a0b4a..2d8a949 100644 (file)
 #include <errno.h>
 #include <inttypes.h>
 
-#include <rte_string_fns.h>
-#include <rte_memcpy.h>
 #include <rte_atomic.h>
+#include <rte_memcpy.h>
+#include <rte_memory.h>
+#include <rte_string_fns.h>
 
 #include "power_pstate_cpufreq.h"
 #include "power_common.h"
@@ -32,7 +33,7 @@
 
 #define FOPEN_OR_ERR_RET(f, retval) do { \
                if ((f) == NULL) { \
-                       RTE_LOG(ERR, POWER, "File not openned\n"); \
+                       RTE_LOG(ERR, POWER, "File not opened\n"); \
                        return retval; \
                } \
 } while (0)
@@ -286,7 +287,7 @@ set_freq_internal(struct pstate_power_info *pi, uint32_t idx)
                        return -1;
                }
 
-               POWER_DEBUG_TRACE("Freqency '%u' to be set for lcore %u\n",
+               POWER_DEBUG_TRACE("Frequency '%u' to be set for lcore %u\n",
                                  target_freq, pi->lcore_id);
 
                fflush(pi->f_cur_min);
@@ -309,7 +310,7 @@ set_freq_internal(struct pstate_power_info *pi, uint32_t idx)
                        return -1;
                }
 
-               POWER_DEBUG_TRACE("Freqency '%u' to be set for lcore %u\n",
+               POWER_DEBUG_TRACE("Frequency '%u' to be set for lcore %u\n",
                                  target_freq, pi->lcore_id);
 
                fflush(pi->f_cur_max);
@@ -695,7 +696,8 @@ power_pstate_cpufreq_freq_up(unsigned int lcore_id)
        }
 
        pi = &lcore_power_info[lcore_id];
-       if (pi->curr_idx == 0)
+       if (pi->curr_idx == 0 ||
+           (pi->curr_idx == 1 && pi->turbo_available && !pi->turbo_enable))
                return 0;
 
        /* Frequencies in the array are from high to low. */