[dpdk-dev] [PATCH v9 00/25] Introducing rte_driver/rte_device generalization

Shreyansh Jain shreyansh.jain at nxp.com
Fri Sep 9 13:42:56 CEST 2016


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


More information about the dev mailing list