From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by dpdk.org (Postfix) with ESMTP id 57AB54F9C for ; Thu, 15 Nov 2018 15:17:39 +0100 (CET) Received: by mail-wm1-f65.google.com with SMTP id p2-v6so18059534wmc.2 for ; Thu, 15 Nov 2018 06:17:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:cc:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=wYbuH7fmYOYuCtcxVgTNTPfRBgEkpCj8nk+hNy/scO8=; b=pRME4T4efpDC8JAOUQIgUIZhP7eKa358ComuiIeFTadjUtSJ+NGiHUrDH0P9wpRBob Yj0xKjLgBW4ns1U3EaOUngALiabLa2xIooDyErzLldez5iDmn7o/g1QKSi0CgVPEwIWy Q4zDqGP4cyjTQ9vQCz434GQqeEkC8OW3Piz4SQvNDms9/NeLVJ+FX2YP2KThYvxOUSls NjU/DvylfL4HUEKYzwCHbgYzTW6QM/5rFLNQMOG0fl9I1OrKo1F5jEg6qB6x4MEMWV4i h6IPFa5dXvpOWMt5KvTOMwyC/6pBRpL1RjRVHNfj+FG4eDHQtixLQpOvhw5ACMVHUgi0 xCZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:cc:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=wYbuH7fmYOYuCtcxVgTNTPfRBgEkpCj8nk+hNy/scO8=; b=cKDNkLzQ3ds/IK0oTLjT8e8y4mHOKF3KMS/iY5BJeR92ZN0RlK8MWFmuq57obqhkNR MCacYFWKi/yvnw7uKyjO4hG18YZLOS+LDDBJqITTo89xsY3Dr/1FlD8D0qKbFXOe3WV2 DIjzRRgem7SAJljpKGfBKdifK3dbNaZwQzZ4xTxcP9sPi1s6MqiyBK2QYHMYgae/+PFo F69wkc6hm0o5Zv9NjCugmVbtnO1oBmrQO02EoubF1/mfkb+C3agYtmnovAzXPo7hTdjS cxsefE09spvdRfKjGrKuKdoc2yK4dEwUzPN6ltOIojiOdTcuBCZUrEos8HPxuNY8XOrX l3OA== X-Gm-Message-State: AGRZ1gK9kLLuzamnzfsLk1nWcyB5dWY0fquJT6g9v8hpWnR99SqtWxzp JOSq3ltYtdboz7oh92yhTKM= X-Google-Smtp-Source: AJdET5ejlGYWR8Pb2x3fl779Nf7Ze2beF9cF6s92sbIhcvC+3QgjMDCJ8NZvxjcmentDfTV2fjHQIw== X-Received: by 2002:a7b:c245:: with SMTP id b5mr5309867wmj.42.1542291459000; Thu, 15 Nov 2018 06:17:39 -0800 (PST) Received: from mugwort.local ([193.158.83.208]) by smtp.gmail.com with ESMTPSA id u14-v6sm32610155wrs.27.2018.11.15.06.17.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Nov 2018 06:17:38 -0800 (PST) To: Nakamura Hioryuki References: <22b6ce74-37df-0fd7-2265-a2206a19b327@lab.ntt.co.jp> <201811140041.wAE0fOtM013055@ccmail04.silk.ntt-tx.co.jp> <20181115091613.565C.82397448@po.ntt-tx.co.jp> From: Yasufumi Ogawa Cc: ferruh.yigit@intel.com, spp@dpdk.org, Yasufumi Ogawa , Yasufumi Ogawa Message-ID: Date: Thu, 15 Nov 2018 23:17:37 +0900 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20181115091613.565C.82397448@po.ntt-tx.co.jp> Content-Type: text/plain; charset=iso-2022-jp; format=flowed; delsp=yes Content-Language: en-US Content-Transfer-Encoding: 7bit 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 14:17:39 -0000 On 2018/11/15 9:16, Nakamura Hioryuki wrote: > 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(). Thanks Hideyuki and Hiroyuki for suggesting the update and having discussion with DPDK cores! It is clear what is the problem and that we should update. I think updating code is OK, but commit messages are still needed to be revised. Thanks, Yasufumi >