From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Leroy Subject: Re: [PATCH v8 12/14] eal/pci: Add rte_eal_dev_attach/detach() functions Date: Tue, 17 Feb 2015 17:15:39 +0100 Message-ID: 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 Cc: dev-VfR2kkLFssw@public.gmane.org To: Tetsuya Mukawa Return-path: In-Reply-To: <54E300F8.8000503-AlSX/UN32fvPDbFq/vQRIQ@public.gmane.org> 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" 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