From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AEFEBC04AB4 for ; Tue, 14 May 2019 15:39:38 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id ED4482086A for ; Tue, 14 May 2019 15:39:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=monjalon.net header.i=@monjalon.net header.b="Niu4K8WW"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="D55jsxYj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ED4482086A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=monjalon.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4384C69D4; Tue, 14 May 2019 17:39:37 +0200 (CEST) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 11FE95F62 for ; Tue, 14 May 2019 17:39:35 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id AF32E26442; Tue, 14 May 2019 11:39:34 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 14 May 2019 11:39:34 -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=sQfWBtoKR9Ob16rL79U6fF2pZ1Da7m1izXk4WlNKzO0=; b=Niu4K8WWKyV8 FSMX1HMDkMTpy33MY260PFKoFlXcEliEzq5JteDFp4z2NTv0h98MVvSnLGHYyOIY YyxVqK5vY1MNDiQkx400tHaahJulPYtJTr6CNuavA6jy+PGK02L7Ai/6eHStdVjH y40pkie9GkRLBIt9O5Sq+OwIsPiEX2s= 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=fm2; bh=sQfWBtoKR9Ob16rL79U6fF2pZ1Da7m1izXk4WlNKz O0=; b=D55jsxYjxSPd4ww6v8nX9eNdK5uneNWqi0WLaJ3YXodiSZe/XgIpkcT6V EVS3XnAk+XfU9Y+gfuL9ZsxNyEsz83PhL4N8s7AeVxXOIs5WNBeHPEiIsa7jCrko iZc25mOA/GmB8ymFjKXq+fm1iLT5KZQUsQnAeF23if3SOZn9RrRjoaEpiuhO4z3t /SQJqJqwXnP/jQsU7yEaKPTNr5MOE2YrrwS15TneaYJquHj1HCB68HPNfAcvD3Ik kDqTLp4zY78iFJWeUVQFLcMHmNKf9SgO+1SpffB4vkixVi90prY7RG8nDAvOvOoc N7cj6s8HYQsiRaFc+r5bgIEBLJZ/w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrleeigdeludcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph epjeejrddufeegrddvtdefrddukeegnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhho mhgrshesmhhonhhjrghlohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd 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 DA107103CC; Tue, 14 May 2019 11:39:32 -0400 (EDT) From: Thomas Monjalon To: Nithin Dabilpuram , Nithin Dabilpuram Cc: dev@dpdk.org, Wenzhuo Lu , Jingjing Wu , Bernard Iremonger Date: Tue, 14 May 2019 17:39:30 +0200 Message-ID: <1973719.Au6Grg4Sd1@xps> In-Reply-To: <20190513112112.7069-1-ndabilpuram@marvell.com> References: <20190513112112.7069-1-ndabilpuram@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] app/testpmd: change port detach interface 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi, 13/05/2019 13:21, Nithin Dabilpuram: > With the latest published interface of > rte_eal_hotplug_[add,remove](), and rte_eth_dev_close(), > rte_eth_dev_close() would cleanup all the data structures of > port's eth dev leaving the device common resource intact > if RTE_ETH_DEV_CLOSE_REMOVE is set in dev flags. > So "port detach" (~hotplug remove) should be able to work, > with device identifier like "port attach" as eth_dev could have > been closed already and rte_eth_devices[port_id] reused. "port attach" uses devargs as identifier because there is no port id before creating it. But "detach port" uses logically the port id to close. > This change alters "port detach" cmdline interface to > work with device identifier like "port attach". The word "port" means an ethdev port, so it should be referenced with a port id. If you want to close an EAL rte_device, then you should rename the command. But testpmd purpose should be to work with ethdev ports only. PS: Please remind that a device can have multiple ports.