From patchwork Thu Feb 1 10:50:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Radu Nicolau X-Patchwork-Id: 34819 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 30FA2728E; Thu, 1 Feb 2018 11:55:47 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 223602D13 for ; Thu, 1 Feb 2018 11:55:45 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Feb 2018 02:55:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,443,1511856000"; d="scan'208";a="14671975" Received: from silpixa00383879.ir.intel.com (HELO silpixa00383879.ger.corp.intel.com) ([10.237.223.127]) by fmsmga008.fm.intel.com with ESMTP; 01 Feb 2018 02:55:43 -0800 From: Radu Nicolau To: dev@dpdk.org Cc: ferruh.yigit@intel.com, declan.doherty@intel.com, thomas@monjalon.net, Radu Nicolau Date: Thu, 1 Feb 2018 10:50:31 +0000 Message-Id: <1517482231-29805-1-git-send-email-radu.nicolau@intel.com> X-Mailer: git-send-email 2.7.5 In-Reply-To: <1517235962-25128-1-git-send-email-radu.nicolau@intel.com> References: <1517235962-25128-1-git-send-email-radu.nicolau@intel.com> Subject: [dpdk-dev] [PATCH v2] test/bonding: assign non-zero MAC to null devices 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" Prevent failure in rte_eth_dev_default_mac_addr_set() that resunts in bonding add slave failure. Signed-off-by: Radu Nicolau --- 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); }