From patchwork Tue Jan 23 14:14:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Coyle, David" X-Patchwork-Id: 34343 X-Patchwork-Delegate: thomas@monjalon.net 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 2892CA491; Tue, 23 Jan 2018 15:20:42 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 2595558CE for ; Tue, 23 Jan 2018 15:20:39 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Jan 2018 06:20:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,401,1511856000"; d="scan'208";a="195617502" Received: from silpixa00395740.ir.intel.com (HELO silpixa00395740.ger.corp.intel.com) ([10.237.223.20]) by orsmga005.jf.intel.com with ESMTP; 23 Jan 2018 06:20:37 -0800 From: David Coyle To: dev@dpdk.org Cc: david.hunt@intel.com, stable@intel.com, David Coyle Date: Tue, 23 Jan 2018 14:14:15 +0000 Message-Id: <1516716855-14805-1-git-send-email-david.coyle@intel.com> X-Mailer: git-send-email 2.7.5 Subject: [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" 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 Acked-by: David Hunt --- 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, ð); if (ret == -ENOTSUP) ret = rte_pmd_i40e_set_vf_mac_addr(portid,