DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] examples/vm_power_manager: fix set VF MAC address
@ 2018-01-23 14:14 David Coyle
  2018-01-23 14:29 ` Hunt, David
  2018-01-23 14:32 ` Hunt, David
  0 siblings, 2 replies; 4+ messages in thread
From: David Coyle @ 2018-01-23 14:14 UTC (permalink / raw)
  To: dev; +Cc: david.hunt, stable, 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 <david.coyle@intel.com>
---
 examples/vm_power_manager/main.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/examples/vm_power_manager/main.c b/examples/vm_power_manager/main.c
index a50984d..a9f5ad1 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,
-- 
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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] examples/vm_power_manager: fix set VF MAC address
  2018-01-23 14:14 [dpdk-dev] [PATCH] examples/vm_power_manager: fix set VF MAC address David Coyle
@ 2018-01-23 14:29 ` Hunt, David
  2018-01-23 14:32 ` Hunt, David
  1 sibling, 0 replies; 4+ messages in thread
From: Hunt, David @ 2018-01-23 14:29 UTC (permalink / raw)
  To: Coyle, David, dev; +Cc: stable

Replying to notify <stable@dpdk.org>, which was missing from original mail.

-----Original Message-----
From: Coyle, David 
Sent: Tuesday, 23 January, 2018 2:14 PM
To: dev@dpdk.org
Cc: Hunt, David <david.hunt@intel.com>; stable@intel.com; Coyle, David <david.coyle@intel.com>
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.

Fixes: c9a4779135c9 ("examples/vm_power_mgr: set MAC address of VF")

Signed-off-by: David Coyle <david.coyle@intel.com>
---
 examples/vm_power_manager/main.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/examples/vm_power_manager/main.c b/examples/vm_power_manager/main.c
index a50984d..a9f5ad1 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,
--
2.7.5

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] examples/vm_power_manager: fix set VF MAC address
  2018-01-23 14:14 [dpdk-dev] [PATCH] examples/vm_power_manager: fix set VF MAC address David Coyle
  2018-01-23 14:29 ` Hunt, David
@ 2018-01-23 14:32 ` Hunt, David
  2018-02-01  0:18   ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
  1 sibling, 1 reply; 4+ messages in thread
From: Hunt, David @ 2018-01-23 14:32 UTC (permalink / raw)
  To: David Coyle, dev; +Cc: stable

Hi David,

On 23/1/2018 2:14 PM, David Coyle wrote:
> 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 <david.coyle@intel.com>
> ---
>   examples/vm_power_manager/main.c | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/examples/vm_power_manager/main.c b/examples/vm_power_manager/main.c
> index a50984d..a9f5ad1 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,

Acked-by: David Hunt <david.hunt@intel.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [dpdk-stable] [PATCH] examples/vm_power_manager: fix set VF MAC address
  2018-01-23 14:32 ` Hunt, David
@ 2018-02-01  0:18   ` Thomas Monjalon
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2018-02-01  0:18 UTC (permalink / raw)
  To: David Coyle; +Cc: stable, Hunt, David, dev

23/01/2018 15:32, Hunt, David:
> Hi David,
> 
> On 23/1/2018 2:14 PM, David Coyle wrote:
> > 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 <david.coyle@intel.com>
> 
> Acked-by: David Hunt <david.hunt@intel.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-02-01  0:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-23 14:14 [dpdk-dev] [PATCH] examples/vm_power_manager: fix set VF MAC address David Coyle
2018-01-23 14:29 ` Hunt, David
2018-01-23 14:32 ` Hunt, David
2018-02-01  0:18   ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).