+
+static int
+parse_pmd_mgmt_config(const char *name)
+{
+#define PMD_MGMT_MONITOR "monitor"
+#define PMD_MGMT_PAUSE "pause"
+#define PMD_MGMT_SCALE "scale"
+#define PMD_MGMT_BASELINE "baseline"
+
+ if (strncmp(PMD_MGMT_MONITOR, name, sizeof(PMD_MGMT_MONITOR)) == 0) {
+ pmgmt_type = RTE_POWER_MGMT_TYPE_MONITOR;
+ return 0;
+ }
+
+ if (strncmp(PMD_MGMT_PAUSE, name, sizeof(PMD_MGMT_PAUSE)) == 0) {
+ pmgmt_type = RTE_POWER_MGMT_TYPE_PAUSE;
+ return 0;
+ }
+
+ if (strncmp(PMD_MGMT_SCALE, name, sizeof(PMD_MGMT_SCALE)) == 0) {
+ pmgmt_type = RTE_POWER_MGMT_TYPE_SCALE;
+ return 0;
+ }
+ if (strncmp(PMD_MGMT_BASELINE, name, sizeof(PMD_MGMT_BASELINE)) == 0) {
+ baseline_enabled = true;
+ return 0;
+ }
+ /* unknown PMD power management mode */
+ return -1;
+}
+