DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Coyle <david.coyle@intel.com>
To: dev@dpdk.org
Cc: david.hunt@intel.com, stable@intel.com,
	David Coyle <david.coyle@intel.com>
Subject: [dpdk-dev] [PATCH] examples/vm_power_manager: fix set VF MAC address
Date: Tue, 23 Jan 2018 14:14:15 +0000	[thread overview]
Message-ID: <1516716855-14805-1-git-send-email-david.coyle@intel.com> (raw)

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.

             reply	other threads:[~2018-01-23 14:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-23 14:14 David Coyle [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1516716855-14805-1-git-send-email-david.coyle@intel.com \
    --to=david.coyle@intel.com \
    --cc=david.hunt@intel.com \
    --cc=dev@dpdk.org \
    --cc=stable@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).