From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: [PATCH v2 02/11] net/failsafe: fix sub-device visibility Date: Thu, 10 May 2018 00:43:04 +0200 Message-ID: <20180509224313.27289-3-thomas@monjalon.net> References: <20180509094337.26112-1-thomas@monjalon.net> <20180509224313.27289-1-thomas@monjalon.net> To: dev@dpdk.org Return-path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 1A9931B77C for ; Thu, 10 May 2018 00:43:24 +0200 (CEST) Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 0F3B7E4EEF for ; Wed, 9 May 2018 18:43:22 -0400 (EDT) In-Reply-To: <20180509224313.27289-1-thomas@monjalon.net> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The iterator function rte_eth_find_next_owned_by(), used by the iterator macro RTE_ETH_FOREACH_DEV_OWNED_BY, are ignoring the devices which are neither ATTACHED nor REMOVED. Thus sub-devices, having the state DEFERRED, cannot be seen with the ethdev iterator. The state RTE_ETH_DEV_DEFERRED can be replaced by RTE_ETH_DEV_ATTACHED + owner. Fixes: dcd0c9c32b8d ("net/failsafe: use ownership mechanism for slaves") Cc: stable@dpdk.org Signed-off-by: Thomas Monjalon Acked-by: Matan Azrad Acked-by: Gaetan Rivet --- drivers/net/failsafe/failsafe_eal.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/failsafe/failsafe_eal.c b/drivers/net/failsafe/failsafe_eal.c index ee89236f1..ce767703f 100644 --- a/drivers/net/failsafe/failsafe_eal.c +++ b/drivers/net/failsafe/failsafe_eal.c @@ -98,7 +98,6 @@ fs_bus_init(struct rte_eth_dev *dev) SUB_ID(sdev) = i; sdev->fs_dev = dev; sdev->dev = ETH(sdev)->device; - ETH(sdev)->state = RTE_ETH_DEV_DEFERRED; sdev->state = DEV_PROBED; } return 0; -- 2.16.2