From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 95E77A0542; Thu, 13 Feb 2020 16:52:44 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DF2DE1C06A; Thu, 13 Feb 2020 16:52:35 +0100 (CET) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id D60641C02A for ; Thu, 13 Feb 2020 16:52:33 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 496CE21FA7; Thu, 13 Feb 2020 10:52:33 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 13 Feb 2020 10:52:33 -0500 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; s=mesmtp; bh=xT8Gh7buxU NOhGItzCqaXihZDGiRYwBFPp2uQ6X/wHw=; b=OTulP0yAWVNUkTkL7sy4MRMPOQ M7d0n1rHeRBRMMCmprimuoUTm+upvhKaQTFbaiQ1NXkNcaSoWCRrIK6/MAOEUC4I S2H449JKoRJcwAS0J56sWq0H1ladwUenmXJq2UPaG2a1D3NEHRKxwIX8+xWEVwSa RLJZmleH+mMRkst3E= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding: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=xT8Gh7buxUNOhGItzCqaXihZDGiRYwBFPp2uQ6X/wHw=; b=OBWQrmJw LFdEg3VOTKgyG5kHUSzxGsYTt1+fKUEEjt1xXhyfvJQLk7HaLp7Dkdq730PAmPCf 73PvsqJHo8TS3GPxT5cdheegvlAge0IHPbyeJ7p7eVUVkWb1oc+/xVHVSi5wHQQo LmpnuMT52UD4N9/IfkgdPHM7oTOJtK4yOd67O9zGibLsI1hzLK4vVg0hXgqU5Uxa 64kkHnCJzL6GbKfo2gfvgcFL/bvC9jx6wCMsly++TACbSWFjItj0lec+uZ86veaU wq7HAiPMb1EfvWghAwIxXysad16PpfDFDKqpzpCl6P+2iZKqzCU1P5YiQheNGdT5 9Dkten5+YVAU0A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrieekgdekvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph epjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghr rghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 307B13280068; Thu, 13 Feb 2020 10:52:32 -0500 (EST) From: Thomas Monjalon To: dev@dpdk.org Cc: matan@mellanox.com, ferruh.yigit@intel.com, Wenzhuo Lu , Jingjing Wu , Bernard Iremonger Date: Thu, 13 Feb 2020 16:52:25 +0100 Message-Id: <20200213155226.1024939-2-thomas@monjalon.net> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200213155226.1024939-1-thomas@monjalon.net> References: <20200213155226.1024939-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 1/2] app/testpmd: rename function for detaching by devargs 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" There is a function detach_port_device() which takes a port_id, and a function detach_device() which takes a devargs string. In order to add a third function accepting a rte_device pointer, the function detach_device() is renamed into detach_devargs(). Signed-off-by: Thomas Monjalon --- app/test-pmd/cmdline.c | 2 +- app/test-pmd/testpmd.c | 3 ++- app/test-pmd/testpmd.h | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 99e4168103..38b6d804c6 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -1541,7 +1541,7 @@ static void cmd_operate_detach_device_parsed(void *parsed_result, struct cmd_operate_detach_device_result *res = parsed_result; if (!strcmp(res->keyword, "detach")) - detach_device(res->identifier); + detach_devargs(res->identifier); else printf("Unknown parameter\n"); } diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index a1dd4043e0..11203cb03d 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -2683,7 +2683,8 @@ detach_port_device(portid_t port_id) } void -detach_device(char *identifier) +void +detach_devargs(char *identifier) { struct rte_dev_iterator iterator; struct rte_devargs da; diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index 3dd5fc750b..b8eb28f62b 100644 --- a/app/test-pmd/testpmd.h +++ b/app/test-pmd/testpmd.h @@ -810,7 +810,7 @@ void stop_port(portid_t pid); void close_port(portid_t pid); void reset_port(portid_t pid); void attach_port(char *identifier); -void detach_device(char *identifier); +void detach_devargs(char *identifier); void detach_port_device(portid_t port_id); int all_ports_stopped(void); int port_is_stopped(portid_t port_id); -- 2.25.0