From: Jan Viktorin Subject: Re: [PATCH v2 06/11] app/test: use linked list to store PCI drivers Date: Thu, 12 May 2016 17:53:07 +0200 Message-ID: <20160512175307.0573297e@pcviktorin.fit.vutbr.cz> References: <1462904011-29838-1-git-send-email-viktorin@rehivetech.com> <1462904011-29838-7-git-send-email-viktorin@rehivetech.com> <2242767.BO2sf06KAx@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, David Marchand , Bruce Richardson To: Thomas Monjalon Return-path: Received: from wes1-so2.wedos.net (wes1-so2.wedos.net [46.28.106.16]) by dpdk.org (Postfix) with ESMTP id 0EE8C6A56 for ; Thu, 12 May 2016 17:54:56 +0200 (CEST) In-Reply-To: <2242767.BO2sf06KAx@xps13> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, 12 May 2016 17:31:28 +0200 Thomas Monjalon wrote: > 2016-05-10 20:13, Jan Viktorin: > > The test unregisters all real drivers before starting into an array. This > > inflexiable as we can use a linked list for this purpose. > > I don't understand this. Maybe some words are missing. Better? The test unregisters all real drivers before starting (stored into an array). This is inflexiable (due to its fixed size) and we can use a linked list for this purpose. > > > +/* real drivers (not used for testing) */ > > What do mean by "not used for testing"? The test now avoids the DPDK builtin drivers. It only considers its internal fake drivers my_driver and my_driver2. So the real drivers are temporarily store into the real_pci_driver_list and returned back after the test finishes. It is the linked list mentioned in the commit log. It replaces the original fixed-size array. (For drivers, it does not matter that much. But for devices, I think, it is not a good practice to consider them in autotests. Every PC where you execute the tests have different set of PCI devices.) > > > +struct pci_driver_list real_pci_driver_list = > > + TAILQ_HEAD_INITIALIZER(real_pci_driver_list); > -- Jan Viktorin E-mail: Viktorin@RehiveTech.com System Architect Web: www.RehiveTech.com RehiveTech Brno, Czech Republic