From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 8FA7F1BB8F for ; Fri, 11 May 2018 01:58:46 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 337472277E; Thu, 10 May 2018 19:58:46 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 10 May 2018 19:58:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=mesmtp; bh=te1S/3ZMv98anV i7VcMUBLUmnZujBufOiFxp6N9Kg84=; b=bs/J8JTTsJ1EmBV3iQUGkT5moGbrc8 0qzZG2gefzrCN9e/R5+YcLs6ojmqWdeMH7qmTMauSehXEuxo5IGaZTRrOF67jTw8 IM6cgQcXdmPkQhg+ItOmJIaYI/zY/Zl3ILX6vUrLdILFyJKw3zRQGZFc5mc1bM0A iZTmZGA0RW5VY= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=te1S/3ZMv98anVi7VcMUBLUmnZujBufOiFxp6N9Kg84=; b=j2Hh8UdV FgZmMnD4d14nQ4NI3kzTWYjeG13imrYS+weHRWHfwhL+xMHeYLHzKi4NR+abla+u HcXVgxkqjxk+BrsFmQcKBJuGGT4eFWKWHJVECsfU43sE/FzYK2zWc1To5+GYo5Lf KPF74VaVH8lQc2sMi64IWfK5SFxPMtliMtf0i+UjmsugBTW6YD4qc4ZPdNBQTtZR XC2qMOu3Q28F9dFdNjtZ/ICFeuxlZeucf5lIq0/maTtjgj1mbGbigd8p5RNMcQx1 i9S7Ch53nJRTqqc7+2k9mApPvI3VFPwTzWwVcP/UyQ5vCGs8Dk+kkO9DWbbmIz8I i2JUfr91pEpoPQ== X-ME-Sender: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 46123E442F; Thu, 10 May 2018 19:58:45 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: matan@mellanox.com, arybchenko@solarflare.com, stephen@networkplumber.org, ferruh.yigit@intel.com Date: Fri, 11 May 2018 01:58:27 +0200 Message-Id: <20180510235836.1099-3-thomas@monjalon.net> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180510235836.1099-1-thomas@monjalon.net> References: <20180509094337.26112-1-thomas@monjalon.net> <20180510235836.1099-1-thomas@monjalon.net> Subject: [dpdk-dev] [PATCH v3 02/11] net/failsafe: fix sub-device visibility 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: Thu, 10 May 2018 23:58:46 -0000 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 Reviewed-by: Andrew Rybchenko Reviewed-by: Stephen Hemminger --- 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