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 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: , X-List-Received-Date: Tue, 14 May 2019 15:39:35 -0000 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. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 04DF2A00E6 for ; Tue, 14 May 2019 17:39:37 +0200 (CEST) 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="UTF-8" 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" Message-ID: <20190514153930.LLQfL9EsoNiImaV9CIHeiI1iX4TJK8MowvJN2HLA2qI@z> 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.