examples/vm_power_manager: fix set VF MAC address
PATCH 1/1 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.
--- examples/vm_power_manager/main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
examples/vm_power_manager/main.c +2 -3
@@ -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, ð);if (ret == -ENOTSUP ) ret = rte_pmd_i40e_set_vf_mac_addr(portid,
Signature · 13 lines
2.7.5 -------------------------------------------------------------- Intel Research and Development Ireland Limited Registered in Ireland Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
Replying to notify <[email protected]>, which was missing from original mail.
-----Original Message-----
From: Coyle, David
Sent: Tuesday, 23 January, 2018 2:14 PM
To: [email protected]
Cc: Hunt, David <[email protected]>; [email protected]; Coyle, David <[email protected]>
Subject: [PATCH] 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.
--- examples/vm_power_manager/main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
examples/vm_power_manager/main.c +2 -3
@@ -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, ð);if (ret == -ENOTSUP ) ret = rte_pmd_i40e_set_vf_mac_addr(portid,
--
2.7.5
Hi David,
Quoted 24 lines · David Coyle
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")Signed-off-by David Coyle <[email protected]>--- examples/vm_power_manager/main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)examples/vm_power_manager/main.c +1
-1@@ -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 ;
examples/vm_power_manager/main.c main(int argc, char **argv) · line 314
Quoted 9 lines
examples/vm_power_manager/main.c +1
-2@@ -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, ð);if (ret == -ENOTSUP ) ret = rte_pmd_i40e_set_vf_mac_addr(portid,
Thomas Monjalon
Applied23/01/2018 15:32, Hunt, David:
Quoted 11 lines
Hi David,
Quoted 6 lines · David Coyle
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")Signed-off-by David Coyle <[email protected]>Acked-by David Hunt <[email protected]>
Applied, thanks