From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <david.hunt@intel.com>
Received: from mga11.intel.com (mga11.intel.com [192.55.52.93])
 by dpdk.org (Postfix) with ESMTP id 2CFF42951;
 Tue, 23 Jan 2018 15:29:30 +0100 (CET)
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from fmsmga001.fm.intel.com ([10.253.24.23])
 by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 23 Jan 2018 06:29:30 -0800
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.46,401,1511856000"; d="scan'208";a="24751684"
Received: from irsmsx105.ger.corp.intel.com ([163.33.3.28])
 by fmsmga001.fm.intel.com with ESMTP; 23 Jan 2018 06:29:29 -0800
Received: from irsmsx101.ger.corp.intel.com ([169.254.1.46]) by
 irsmsx105.ger.corp.intel.com ([169.254.7.236]) with mapi id 14.03.0319.002;
 Tue, 23 Jan 2018 14:29:29 +0000
From: "Hunt, David" <david.hunt@intel.com>
To: "Coyle, David" <david.coyle@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
CC: "stable@dpdk.org" <stable@dpdk.org>
Thread-Topic: [PATCH] examples/vm_power_manager: fix set VF MAC address
Thread-Index: AQHTlFVkVpAaVOUrO0GXdBdzy+xsu6OBhCxQ
Date: Tue, 23 Jan 2018 14:29:28 +0000
Message-ID: <3F5BA2D9419A984DBB40DB5CFACBB36D1FA8F1C7@IRSMSX101.ger.corp.intel.com>
References: <1516716855-14805-1-git-send-email-david.coyle@intel.com>
In-Reply-To: <1516716855-14805-1-git-send-email-david.coyle@intel.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
dlp-product: dlpe-windows
dlp-version: 11.0.0.116
dlp-reaction: no-action
x-originating-ip: [163.33.239.180]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: Re: [dpdk-stable] [PATCH] examples/vm_power_manager: fix set VF MAC
	address
X-BeenThere: stable@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches for DPDK stable branches <stable.dpdk.org>
List-Unsubscribe: <https://dpdk.org/ml/options/stable>,
 <mailto:stable-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/stable/>
List-Post: <mailto:stable@dpdk.org>
List-Help: <mailto:stable-request@dpdk.org?subject=help>
List-Subscribe: <https://dpdk.org/ml/listinfo/stable>,
 <mailto:stable-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Tue, 23 Jan 2018 14:29:31 -0000

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

-----Original Message-----
From: Coyle, David=20
Sent: Tuesday, 23 January, 2018 2:14 PM
To: dev@dpdk.org
Cc: Hunt, David <david.hunt@intel.com>; stable@intel.com; Coyle, David <dav=
id.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 continu=
es 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/m=
ain.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 =3D 0; portid < nb_ports; portid++) {
 		struct ether_addr eth;
 		int w, j;
-		int ret =3D -ENOTSUP;
+		int ret;
=20
 		if ((enabled_port_mask & (1 << portid)) =3D=3D 0)
 			continue;
@@ -308,8 +308,7 @@ main(int argc, char **argv)
 		for (w =3D 0; w < MAX_VFS; w++) {
 			eth.addr_bytes[5] =3D w + 0xf0;
=20
-			if (ret =3D=3D -ENOTSUP)
-				ret =3D rte_pmd_ixgbe_set_vf_mac_addr(portid,
+			ret =3D rte_pmd_ixgbe_set_vf_mac_addr(portid,
 						w, &eth);
 			if (ret =3D=3D -ENOTSUP)
 				ret =3D rte_pmd_i40e_set_vf_mac_addr(portid,
--
2.7.5