From patchwork Tue Jan 23 14:29:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hunt, David" X-Patchwork-Id: 34356 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B5C802BF3; Tue, 23 Jan 2018 15:29:32 +0100 (CET) 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" To: "Coyle, David" , "dev@dpdk.org" CC: "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] MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] examples/vm_power_manager: fix set VF MAC address X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Replying to notify , 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 ; stable@intel.com; Coyle, David 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 --- examples/vm_power_manager/main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- 2.7.5 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, ð); if (ret == -ENOTSUP) ret = rte_pmd_i40e_set_vf_mac_addr(portid,