From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 710182904 for ; Sat, 20 Jan 2018 21:29:09 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id CF1E420991; Sat, 20 Jan 2018 15:29:08 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Sat, 20 Jan 2018 15:29:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=OI8oipTBD3v+B69mHDoq7kM6JR GcdhDFzOPsVdCvT1Y=; b=Kg81gH5Z+OMSxCPbSc6LaBQFISFjXKhWTCAlWtC8Md ize4vYFw08oYqK7fDr/AoAPsdpiYBMQadT4ZvwXKvfYYZ7hbtuY5fQ8O7p88JBFC F/6LFTdzNxVWq1Qkl1oVSOHfaYL2GWtL7pWnBaJsnYhmwqR5bzHBdVxhq04cDSvF U= 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-sender:x-me-sender:x-sasl-enc; s=fm1; bh=OI8oip TBD3v+B69mHDoq7kM6JRGcdhDFzOPsVdCvT1Y=; b=VyXF3uK51Q0etuuhhaL94D PQIeQ+VASim3NgzNUJyS2i5u+aqZPb4Z49ynOfXa0DzfX10b3YhIgEpUGkL8y5Om BxqYrIS6TcA1mXGwC5izXXQVxIYDA9Ttg4uWT86ZlCGI4h+0B0KQ3GdgUJdhfH5t 0gaMKKbXykGDxl/IJ4uWADOlAd8Ox7Vtc9lwsRqbPwmjxfZN5gUEhUEGOLU60RNH ES5nNuBb7xXfLZUsJuZRuvjZ/xvsG1gNPIyiCCVSwdWM+NBqMmOfNrnoUVSc4oOe bG5kT4Tl8sPG9n5mlmAuP2PG5YLLMSPMcQR1nBBqzfVgsYtBvVO7VoeEsJ5YKu3w == X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 79967240DE; Sat, 20 Jan 2018 15:29:08 -0500 (EST) From: Thomas Monjalon To: Matan Azrad Cc: Ferruh Yigit , "Ananyev, Konstantin" , "dev@dpdk.org" , Adrien Mazarguil , Gaetan Rivet , Andrew Rybchenko , Alejandro Lucero , Jerin Jacob , Hemant Agrawal , Shahaf Shuler , Olivier MATZ , "Zhang, Helin" Date: Sat, 20 Jan 2018 21:28:33 +0100 Message-ID: <1624152.X7h7I9Omfq@xps> In-Reply-To: References: <1516220357-13013-1-git-send-email-matan@mellanox.com> <3230393.d19WHEAjBn@xps> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v6 4/6] ethdev: adjust APIs removal error report 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: Sat, 20 Jan 2018 20:29:09 -0000 20/01/2018 20:04, Matan Azrad: > Konstantin wrote in another thread: > >+ RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0); > >+ > >+ dev = &rte_eth_devices[port_id]; > >+ > >+ RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->is_removed, 0); > > > I'd says these 2 checks have to be swapped. > > Konstantin, Please explain why. I think he was talking about these 2 tests: + RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->is_removed, 0); + if (dev->state == RTE_ETH_DEV_REMOVED) + return 1;