From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 543D6239 for ; Wed, 31 Oct 2018 16:44:17 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id D5E6421165; Wed, 31 Oct 2018 11:44:16 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 31 Oct 2018 11:44:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=cgW9CpKb2GvGKVMDT5cYnYz7wL+yHkiclBNSILyvCxU=; b=SOtcWz7faWxz tN217fG607l6lLEZcxr8SpDtdOhc7+4EJnA0gxWxQAeNQTOh29HDdMOATbS+Mtm2 n3vwknRxXI7FjxNyIpV8vTDDteuW0XOo3s5PkhTqsoHQJRMbaiX7lcV3+HyutRVt Fn03pFsK/pqxumTc0o0YDrwz4JcHymM= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=cgW9CpKb2GvGKVMDT5cYnYz7wL+yHkiclBNSILyvC xU=; b=FSKLdmPpfRufcycd4/7XUpePo1Gr4GnwDs/FA1wv838leVUVlD7oeGUP3 xDgXhKW+603WQeSwfO1HbXLKg0b4l12w2tN2ljvGDV3LAQbvc62JWiN4kWtz9OM8 vcG3rhNi05ovglKnq7moYA40eh05NozAT/I4PmRrg7wnaT1bxfoW/PgvgXzTuhq8 xUpIM5ZZecxXQJa2k97zn7n8avYM1SrEN2W8iGwE9Q19GlEPqKizsWidBfTscvIv mNx0XOjdffc8zcQBIfR5ErCQ4Gd3NEPlB4O7VUdSPKAt2JfS2wEZFA9zsddN+SdW 6bcLBsx0CWApTUrD9OHY22Jjv+oUg== X-ME-Sender: X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 1D35AE4511; Wed, 31 Oct 2018 11:44:15 -0400 (EDT) From: Thomas Monjalon To: Chas Williams <3chas3@gmail.com> Cc: Radu Nicolau , dev@dpdk.org, declan.doherty@intel.com, chas3@att.com, ferruh.yigit@intel.com, arybchenko@solarflare.com Date: Wed, 31 Oct 2018 16:44:21 +0100 Message-ID: <9177844.5q68cmoSxg@xps> In-Reply-To: <2adb03da-ff43-3ab4-5e5a-0a44622d5f8d@gmail.com> References: <1540994346-17532-1-git-send-email-radu.nicolau@intel.com> <2490703.Y8HZJr6zFH@xps> <2adb03da-ff43-3ab4-5e5a-0a44622d5f8d@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [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 15:44:17 -0000 31/10/2018 16:37, Chas Williams: > > On 10/31/2018 11:06 AM, Thomas Monjalon wrote: > > 31/10/2018 14:59, Radu Nicolau: > >> 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") > > > > It would not segfault if you call rte_eth_dev_probing_finish() at the > > real end of the probing function. Then the port will be considered not > > valid in rte_eth_bond_8023ad_agg_selection_set(). > > It does not solve your problem but it is more correct. > > So I suggest to revert this patch (which was a wrong fix): > > http://git.dpdk.org/dpdk/commit/?id=1620175 > > Or just make the change proposed in this commit and also move this > section before the probing finish. This is performing initial setup of > the interface and it doesn't need to use the public API to do this. > And this should be done before the public API can access the device. Yes, this is what I proposed, but said differently :) Please add Fixes: 1620175b400e ("net/bonding: fix invalid port id") > > Then the issue is to allow configuring a port before the end of probing. > > That shouldn't be allowed of course. > > > This patch is workarounding the public API which checks port validity. > > I think it is a good approach.