From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail04.ics.ntt-tx.co.jp (mail05.ics.ntt-tx.co.jp [210.232.35.69]) by dpdk.org (Postfix) with ESMTP id 8CA8A2B94 for ; Thu, 15 Nov 2018 01:16:36 +0100 (CET) Received: from gwchk03.silk.ntt-tx.co.jp (gwchk03.silk.ntt-tx.co.jp [10.107.0.111]) by mail04.ics.ntt-tx.co.jp (unknown) with ESMTP id wAF0GZY7017239; Thu, 15 Nov 2018 09:16:35 +0900 Received: (from root@localhost) by gwchk03.silk.ntt-tx.co.jp (unknown) id wAF0GZhj010440; Thu, 15 Nov 2018 09:16:35 +0900 Received: from gwchk.silk.ntt-tx.co.jp [10.107.0.110] by gwchk03.silk.ntt-tx.co.jp with ESMTP id KAA10439; Thu, 15 Nov 2018 09:16:35 +0900 Received: from imss06.silk.ntt-tx.co.jp (localhost [127.0.0.1]) by ccmail04.silk.ntt-tx.co.jp (unknown) with ESMTP id wAF0GYwW005444; Thu, 15 Nov 2018 09:16:34 +0900 Received: from imss06.silk.ntt-tx.co.jp (localhost [127.0.0.1]) by imss06.silk.ntt-tx.co.jp (unknown) with ESMTP id wAF0GY8I014241; Thu, 15 Nov 2018 09:16:34 +0900 Received: from ccmail04 (smtp03.silk.ntt-tx.co.jp [10.107.0.135]) by imss06.silk.ntt-tx.co.jp (unknown) with SMTP id wAF0GY8g014238; Thu, 15 Nov 2018 09:16:34 +0900 Date: Thu, 15 Nov 2018 09:16:14 +0900 From: Nakamura Hioryuki In-Reply-To: <201811140041.wAE0fOtM013055@ccmail04.silk.ntt-tx.co.jp> References: <22b6ce74-37df-0fd7-2265-a2206a19b327@lab.ntt.co.jp> <201811140041.wAE0fOtM013055@ccmail04.silk.ntt-tx.co.jp> Message-Id: <20181115091613.565C.82397448@po.ntt-tx.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-2022-JP" Content-Transfer-Encoding: 7bit X-Mailer: Becky! ver. 2.74 [ja] X-CCMail7: CC-Mail-V7.0.2-Client-Relayed X-TM-AS-MML: No X-CC-Mail-RelayStamp: CC-Mail-V5.14-Server To: ferruh.yigit@intel.com, spp@dpdk.org, Yasufumi Ogawa , Yasufumi Ogawa Subject: Re: [spp] [spp 03539] Re: [PATCH 0/6] Replace deprecated APIs X-BeenThere: spp@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Soft Patch Panel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2018 00:16:36 -0000 Hi, Yasufumi and all, > > I've got understand your point. Could you confirm why you avoid to use global variable? > rte_eth_dev_attach is function inside dpdk library so it is somehow > natural to use global variable when retrieve newly created dpdk port. > As I said earlier, this time new function is located in application side. > It is unnatural to use global variable of library from application > rather I prefer to use existing function for retrieving allocated dpdk > from appliction(rte_eth_dev_get_port_by_name). I would like to add background to above discussion. First, we asked simple question “How to replace rte_eth_dev_attach with rte_eal_hotplug_add" to dpdk-dev ML. At that time, we thought that this replacement can be realized by migrating the codes in rte_eth_dev_attatch() in "lib/librte_ethdev/rte_ethdev.c" to spp code. But thanks to advice from Thomas, we found that this idea is too simple (or idiot?) to handle the "internal data (global variable)" in rte_eth_dev_attach(). See https://mails.dpdk.org/archives/dev/2018-September/112412.html So, we decided to use rte_eth_dev_get_port_by_name(). -- Nakamura Hioryuki