From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by dpdk.org (Postfix) with ESMTP id B1B59B4E0 for ; Tue, 17 Feb 2015 17:15:39 +0100 (CET) Received: by mail-wi0-f181.google.com with SMTP id r20so35015489wiv.2 for ; Tue, 17 Feb 2015 08:15:39 -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=XwPdLZQjRztTtJU+jiUwqYHFIMgcORqTpETi0UDMxHI=; b=E2aXt/tZZpuPnJMoukmcGFqOU8rUy8snfYFUd2nUPMaUTlXrc0MHID5ui+nqslcOMg RK4zdvDnyGr2DP5QiSG2drnHZIol8aNYRUP0OYn4qROynxrh4sHB/eQ1l9NOohFE1Kkn bsVmBhl+1oeDKhX2Ikydy62qrLYUkd2PQ3Bhn24evo75X9RtqNfGQe6sRJDV1XvIM/dK T3aNs1pIPjmVi8jwvAQPWi0wG3kRydZIhLgT0oNCAyjUYF0jr/Kcq3xDvA9QHby1RJsR 7oopEI3KfYH4WgPuyU6P84rr2ca7nJqKSiZnpFA5/aTjppB/cv5gw2u8UFEvzYUWRPVN C8Pg== X-Gm-Message-State: ALoCoQlHsa3XSr3n6NT0jOQbEeNRNo+6gBP2ezg4/DnMVFXtvSVl8CRtWcHIAo/sLU2ojok0h6uV MIME-Version: 1.0 X-Received: by 10.194.24.103 with SMTP id t7mr61997944wjf.15.1424189739482; Tue, 17 Feb 2015 08:15:39 -0800 (PST) Received: by 10.194.185.204 with HTTP; Tue, 17 Feb 2015 08:15:39 -0800 (PST) In-Reply-To: <54E300F8.8000503@igel.co.jp> References: <1423470639-15744-2-git-send-email-mukawa@igel.co.jp> <1424060073-23484-1-git-send-email-mukawa@igel.co.jp> <1424060073-23484-13-git-send-email-mukawa@igel.co.jp> <83798909.brLNWNC9tj@xps13> <54E300F8.8000503@igel.co.jp> Date: Tue, 17 Feb 2015 17:15:39 +0100 Message-ID: From: Maxime Leroy To: Tetsuya Mukawa Content-Type: text/plain; charset=UTF-8 Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v8 12/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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Feb 2015 16:15:39 -0000 Hi Tetsuya, On Tue, Feb 17, 2015 at 9:51 AM, Tetsuya Mukawa wrote: > > > >> + /* get port_id enabled by above procedures */ > >> + if (rte_eth_dev_get_changed_port(devs, &new_port_id)) > >> + goto err2; > > [...] > > > >> /** > >> + * Uninitilization function called for each device driver once. > >> + */ > >> +typedef int (rte_dev_uninit_t)(const char *name, const char *args); > > Why do you need args for uninit? > > > > I just added for the case that finalization code of PMD needs it. > But, probably "args" parameter can be removed. > > I think there are no needs to have any args in the uninit function: 1) You librte_pmd_null doesn't use it 2) You give exactly the same argument that was used by the init function. A driver should have already stored these parameters in an internal private structure at initialization. So it's not needed to give me back for uninit method. >>From my understanding devargs_list is only needed at the init to store the arguments when we parse the command line. Then, at initialization, rte_eal_dev_init creates the devices from this list . By removing args from uninit function, you doesn't need to add and remove anymore devargs in devargs_list to (de)attach a new device. What do you think ? Maxime