From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tetsuya Mukawa Subject: Re: [PATCH v8 12/14] eal/pci: Add rte_eal_dev_attach/detach() functions Date: Wed, 18 Feb 2015 10:54:49 +0900 Message-ID: <54E3F0E9.402@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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: dev-VfR2kkLFssw@public.gmane.org To: Maxime Leroy Return-path: In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" On 2015/02/18 1:15, Maxime Leroy wrote: > Hi Tetsuya, > > On Tue, Feb 17, 2015 at 9:51 AM, Tetsuya Mukawa wro= te: >> >>>> + /* 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 ? Hi Maxime, Yes, I agree. We can remove the argument. I will do it. Regards, Tetsuya > > Maxime