aboutsummaryrefslogtreecommitdiffstats
path: root/examples/vm_power_manager/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/vm_power_manager/main.c')
-rw-r--r--examples/vm_power_manager/main.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/examples/vm_power_manager/main.c b/examples/vm_power_manager/main.c
index 893bf4cd..5fa13fe6 100644
--- a/examples/vm_power_manager/main.c
+++ b/examples/vm_power_manager/main.c
@@ -31,9 +31,15 @@
#include "vm_power_cli.h"
#include "oob_monitor.h"
#include "parse.h"
+#ifdef RTE_LIBRTE_IXGBE_PMD
#include <rte_pmd_ixgbe.h>
+#endif
+#ifdef RTE_LIBRTE_I40E_PMD
#include <rte_pmd_i40e.h>
+#endif
+#ifdef RTE_LIBRTE_BNXT_PMD
#include <rte_pmd_bnxt.h>
+#endif
#define RX_RING_SIZE 1024
#define TX_RING_SIZE 1024
@@ -175,6 +181,7 @@ parse_args(int argc, char **argv)
if (cnt < 0) {
printf("Invalid core-list - [%s]\n",
optarg);
+ free(oob_enable);
break;
}
for (i = 0; i < ci->core_count; i++) {
@@ -369,14 +376,21 @@ main(int argc, char **argv)
for (w = 0; w < MAX_VFS; w++) {
eth.addr_bytes[5] = w + 0xf0;
+ ret = -ENOTSUP;
+#ifdef RTE_LIBRTE_IXGBE_PMD
ret = rte_pmd_ixgbe_set_vf_mac_addr(portid,
w, &eth);
+#endif
+#ifdef RTE_LIBRTE_I40E_PMD
if (ret == -ENOTSUP)
ret = rte_pmd_i40e_set_vf_mac_addr(
portid, w, &eth);
+#endif
+#ifdef RTE_LIBRTE_BNXT_PMD
if (ret == -ENOTSUP)
ret = rte_pmd_bnxt_set_vf_mac_addr(
portid, w, &eth);
+#endif
switch (ret) {
case 0:
@@ -390,7 +404,6 @@ main(int argc, char **argv)
break;
}
printf("\n");
- break;
}
}
}