summaryrefslogtreecommitdiff
path: root/examples/vm_power_manager
diff options
context:
space:
mode:
authorDavid Coyle <david.coyle@intel.com>2018-01-23 14:14:15 +0000
committerThomas Monjalon <thomas@monjalon.net>2018-02-01 01:19:35 +0100
commita032a0816a1e63cc90505b96c0abf0770b71f160 (patch)
treedb88d4531a3c39bf5da4d484187770931b53f3e4 /examples/vm_power_manager
parent532e5242db15b311594c4a633d520ed3ae87b38d (diff)
downloaddpdk-a032a0816a1e63cc90505b96c0abf0770b71f160.zip
dpdk-a032a0816a1e63cc90505b96c0abf0770b71f160.tar.gz
dpdk-a032a0816a1e63cc90505b96c0abf0770b71f160.tar.xz
examples/vm_power_manager: fix set VF MAC address
Current code only sets mac address of first VF. Fix code so that it continues through the loop and sets the mac address of each VF. Fixes: c9a4779135c9 ("examples/vm_power_mgr: set MAC address of VF") Cc: stable@dpdk.org Signed-off-by: David Coyle <david.coyle@intel.com> Acked-by: David Hunt <david.hunt@intel.com>
Diffstat (limited to 'examples/vm_power_manager')
-rw-r--r--examples/vm_power_manager/main.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/vm_power_manager/main.c b/examples/vm_power_manager/main.c
index ad22b17..8a1e95b 100644
--- a/examples/vm_power_manager/main.c
+++ b/examples/vm_power_manager/main.c
@@ -290,7 +290,7 @@ main(int argc, char **argv)
for (portid = 0; portid < nb_ports; portid++) {
struct ether_addr eth;
int w, j;
- int ret = -ENOTSUP;
+ int ret;
if ((enabled_port_mask & (1 << portid)) == 0)
continue;
@@ -308,8 +308,7 @@ main(int argc, char **argv)
for (w = 0; w < MAX_VFS; w++) {
eth.addr_bytes[5] = w + 0xf0;
- if (ret == -ENOTSUP)
- ret = rte_pmd_ixgbe_set_vf_mac_addr(portid,
+ ret = rte_pmd_ixgbe_set_vf_mac_addr(portid,
w, &eth);
if (ret == -ENOTSUP)
ret = rte_pmd_i40e_set_vf_mac_addr(portid,