From mboxrd@z Thu Jan 1 00:00:00 1970 From: Radu Nicolau Subject: [PATCH v3] test/bonding: assign non-zero MAC to null devices Date: Thu, 1 Feb 2018 11:06:18 +0000 Message-ID: <1517483178-30424-1-git-send-email-radu.nicolau@intel.com> References: <1517235962-25128-1-git-send-email-radu.nicolau@intel.com> Cc: ferruh.yigit@intel.com, declan.doherty@intel.com, thomas@monjalon.net, Radu Nicolau To: dev@dpdk.org Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 1E67E532C for ; Thu, 1 Feb 2018 12:11:31 +0100 (CET) In-Reply-To: <1517235962-25128-1-git-send-email-radu.nicolau@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Prevent failure in rte_eth_dev_default_mac_addr_set() that resunts in bonding add slave failure. Fixes: aa7791ba8de0 ("net/bonding: fix setting slave MAC addresses") Signed-off-by: Radu Nicolau --- v3: 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