From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <maxime.leroy@6wind.com>
Received: from mail-wg0-f48.google.com (mail-wg0-f48.google.com [74.125.82.48])
 by dpdk.org (Postfix) with ESMTP id B06F758F4
 for <dev@dpdk.org>; Fri, 20 Feb 2015 16:20:59 +0100 (CET)
Received: by mail-wg0-f48.google.com with SMTP id l18so13729366wgh.7
 for <dev@dpdk.org>; Fri, 20 Feb 2015 07:20:59 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:mime-version:in-reply-to:references:date
 :message-id:subject:from:to:cc:content-type;
 bh=fUu1JD4y/GgtMHTbgixMiMn1TvBrckNGygvnkX5E/lI=;
 b=KAdP8bbQohvQVU8k5LN2ENpMuVLZ7TWF8owVc73cXFM31u7V7qUVp78kmh2p7NGvUw
 RrNgzHt5GwCsQndjSs4ooLCCE9w3kLcOXCTNzVEaon5xOOMH4iRf4vBOUWiwDoM1oWpa
 kB9hs0KCNG+GLnom2EzccLOY5GqHVFSz3NFF2H70rLYAPU61QVC3Trx/2CgvagprFKYT
 NM47j8bDjYcZWg1DePg9WHEeA255OqjM4kjE7FxRD3cbwJ2KisEOmyFWuSg8LTX/Plym
 aq4R5OkqXOszXY5vJetsdeuYQn2e8eFpz6oTJpenjrts7CyBQdXduzQarNVAzFMJUKEi
 eGEw==
X-Gm-Message-State: ALoCoQnAzPFMqf422nk5szeDGcxrOIlS6YFlAaheql/xf3SWxry+1fJdD7TKSmXc3EOjzAfwGbGN
MIME-Version: 1.0
X-Received: by 10.180.24.65 with SMTP id s1mr20559548wif.30.1424445659407;
 Fri, 20 Feb 2015 07:20:59 -0800 (PST)
Received: by 10.194.185.204 with HTTP; Fri, 20 Feb 2015 07:20:59 -0800 (PST)
In-Reply-To: <54E70D38.6090209@igel.co.jp>
References: <1424060073-23484-2-git-send-email-mukawa@igel.co.jp>
 <1424414390-18509-1-git-send-email-mukawa@igel.co.jp>
 <1424414390-18509-14-git-send-email-mukawa@igel.co.jp>
 <CAEykdvpbx=n60XbjSBQnZJN7=t3o2CncC2hMo9ytB7V2GsL+RQ@mail.gmail.com>
 <54E70D38.6090209@igel.co.jp>
Date: Fri, 20 Feb 2015 16:20:59 +0100
Message-ID: <CAEykdvqQZBb4BSqX1iyWks_R9T4KkLk119rJZZERT=UCOUQdSQ@mail.gmail.com>
From: Maxime Leroy <maxime.leroy@6wind.com>
To: Tetsuya Mukawa <mukawa@igel.co.jp>
Content-Type: text/plain; charset=UTF-8
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v10 13/14] eal/pci: Add
 rte_eal_dev_attach/detach() functions
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Fri, 20 Feb 2015 15:20:59 -0000

Hi Tetsuya,

Thanks for your comment.

On Fri, Feb 20, 2015 at 11:32 AM, Tetsuya Mukawa <mukawa@igel.co.jp> wrote:
> On 2015/02/20 19:14, Maxime Leroy wrote:
>> Hi Tetsuya,
[...]
>>
>
> Hi Maxime,
>
> I appreciate for your comment.
>
> When rte_eal_init() is called, if we have "--vdev" options, these will
> be stored in vdevargs as you describe above.
> I agree this is the current behavior of DPDK.
>
> When we call hotplug functions, I guess doing same thing will be more
> consistent design.

The rte_eal_devargs_add is here to store a white list parameters for
later creating the devices.
It means that the devargs_list is only needed at the init to store the
devargs parsed .
I think we should not use the devargs_list after eal initialization.

Why you want to add devargs in the devargs_list, if there are no needs
to store this information ?

At the end, it adds extra codes for nothing.

>
> For example, we can do like below.
> 1. $ ./testpmd --vdev 'eth_pcap' -- -i
> 2. testpmd>port detach

It's exactly the same for physical device:
1. $./testpmd -w 0000:08:00:1 -- -i
2. testpmd> port detach

But you don't call rte_eal_devargs_add with RTE_DEVTYPE_WHILISTED_PCI
in  rte_eal_dev_attach_pdev ?
Thus it makes the hotplug implementation not coherent for me.

What do you think ?

Regards,

Maxime