DPDK patches and discussions
 help / color / mirror / Atom feed
From: Radu Nicolau <radu.nicolau@intel.com>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com, declan.doherty@intel.com,
	thomas@monjalon.net, Radu Nicolau <radu.nicolau@intel.com>
Subject: [dpdk-dev] [PATCH v2] test/bonding: assign non-zero MAC to null devices
Date: Thu,  1 Feb 2018 10:50:31 +0000	[thread overview]
Message-ID: <1517482231-29805-1-git-send-email-radu.nicolau@intel.com> (raw)
In-Reply-To: <1517235962-25128-1-git-send-email-radu.nicolau@intel.com>

Prevent failure in rte_eth_dev_default_mac_addr_set() that
resunts in bonding add slave failure.

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
---
v2: update commit message

 test/test/test_link_bonding_rssconf.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/test/test/test_link_bonding_rssconf.c b/test/test/test_link_bonding_rssconf.c
index cf9c4b0..518c4c1 100644
--- a/test/test/test_link_bonding_rssconf.c
+++ b/test/test/test_link_bonding_rssconf.c
@@ -505,6 +505,7 @@ test_setup(void)
 	int port_id;
 	char name[256];
 	struct slave_conf *port;
+	struct ether_addr mac_addr = {0};
 
 	if (test_params.mbuf_pool == NULL) {
 
@@ -536,6 +537,10 @@ test_setup(void)
 		TEST_ASSERT_SUCCESS(retval, "Failed to configure virtual ethdev %s\n",
 				name);
 
+		/* assign a non-zero MAC */
+		mac_addr.addr_bytes[5] = 0x10 + port->port_id;
+		rte_eth_dev_default_mac_addr_set(port->port_id, &mac_addr);
+
 		rte_eth_dev_info_get(port->port_id, &port->dev_info);
 	}
 
-- 
2.7.5

  parent reply	other threads:[~2018-02-01 10:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-29 14:26 [dpdk-dev] [PATCH] " Radu Nicolau
2018-01-31 19:31 ` Ferruh Yigit
2018-02-01 10:50 ` Radu Nicolau [this message]
2018-02-01 11:06 ` [dpdk-dev] [PATCH v3] " Radu Nicolau
2018-02-05 15:43   ` Ferruh Yigit

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=1517482231-29805-1-git-send-email-radu.nicolau@intel.com \
    --to=radu.nicolau@intel.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=thomas@monjalon.net \
    /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).