From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 7D99C23D for ; Wed, 31 Oct 2018 15:05:54 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Oct 2018 07:05:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,447,1534834800"; d="scan'208";a="102249810" Received: from silpixa00383879.ir.intel.com (HELO silpixa00383879.ger.corp.intel.com) ([10.237.223.127]) by fmsmga004.fm.intel.com with ESMTP; 31 Oct 2018 07:05:50 -0700 From: Radu Nicolau To: dev@dpdk.org Cc: thomas@monjalon.net, declan.doherty@intel.com, chas3@att.com, Radu Nicolau Date: Wed, 31 Oct 2018 13:59:06 +0000 Message-Id: <1540994346-17532-1-git-send-email-radu.nicolau@intel.com> X-Mailer: git-send-email 2.7.5 Subject: [dpdk-dev] [PATCH] net/bonding: fix segfault when creating bonded device 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: , X-List-Received-Date: Wed, 31 Oct 2018 14:05:54 -0000 After the patch below the call to rte_eth_bond_8023ad_agg_selection_set from probe() segfaults; there is no need to call the function, just set the mode directly. Fixes: 391797f04208 ("drivers/bus: move driver assignment to end of probing") Signed-off-by: Radu Nicolau --- drivers/net/bonding/rte_eth_bond_pmd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 156f31c..6421b96 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -3230,10 +3230,9 @@ bond_probe(struct rte_vdev_device *dev) } if (internals->mode == BONDING_MODE_8023AD) - rte_eth_bond_8023ad_agg_selection_set(port_id, - agg_mode); + internals->mode4.agg_selection = agg_mode; } else { - rte_eth_bond_8023ad_agg_selection_set(port_id, AGG_STABLE); + internals->mode4.agg_selection = AGG_STABLE; } RTE_BOND_LOG(INFO, "Create bonded device %s on port %d in mode %u on " -- 2.7.5