From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shreyansh Jain Subject: Re: [PATCH v9 00/25] Introducing rte_driver/rte_device generalization Date: Fri, 9 Sep 2016 17:12:56 +0530 Message-ID: <6b977abe-b2ff-60b6-9c31-e23db99eb389@nxp.com> References: <1466510566-9240-1-git-send-email-shreyansh.jain@nxp.com> <1473257297-7221-1-git-send-email-shreyansh.jain@nxp.com> <20160907114004.4a218155@xeon-e3> <20160908094929.22d21b2f@xeon-e3> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Cc: , To: Stephen Hemminger Return-path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0042.outbound.protection.outlook.com [104.47.32.42]) by dpdk.org (Postfix) with ESMTP id 7EABF2BAD for ; Fri, 9 Sep 2016 13:42:47 +0200 (CEST) In-Reply-To: <20160908094929.22d21b2f@xeon-e3> 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" Hi Stephen, On Thursday 08 September 2016 10:19 PM, Stephen Hemminger wrote: [...] >> > I think yes. There are separate lists for all device types which helps >> > keep the EAL code free of type checks. But, functionally it doesn't make >> > that big a different between a common or specific list. >> > I am in favor of separate lists of each rte_xxx_device/driver type - >> > other than a global list (which is not actually being used, for now). > I was just concerned that doing bookkeeping on multiple lists creates more possibilities > for bugs where error unwind paths don't match. > That is true. But in this particular situation (in my opinion), maintaining multiple lists helps because: 1. Device/Drivers lists are separate and no functionality except setup and tear-down operation would ever need to parse the common list - at least not during the application run-to-completion-cycle. 2. Keeping them separate helps make the respective scan/probe code cleaner. In fact, in absence of checks for device type, I think debugging would be easier as one would only need to focus on code related to attached physical/virtual device. But again, above is just my opinion and preference - if merging the lists helps, it can be done. In fact, rte_driver/rte_device are already creating a common list - just that it is not being used right now. I don't think there is any technical impact of this (except increasing type validation - but that is only in setup/tear-down path). -- Shreyansh