On Sat, Jan 31, 2015 at 5:32 PM, Neil Horman <nhorman at tuxdriver.com> wrote:
> On Sat, Jan 31, 2015 at 05:07:28PM +0100, David Marchand wrote: > > In the end, we miss something to have dpdk work automatically like it > used > > to be, before the pci devices ids were stripped out of igb_uio. > > > > I can see two solutions : > > - all pmds export the pci device ids they support (this sounds like > > modalias :-)) or they register into the eal that exports this information > > for use by application, but to me the application should not bother with > > this ... > > - the pmd handles this automatically (like binding/unbinding on a kernel > > driver), with a _runtime_ option to enable this behavior (default being > "no > > automatic bind") > > > > Comments ? Ideas ? > > > I like the modalias idea, as it transports a table for uio/vfio to > identify with > the binary that needs it, preventing a possible discrepancy in what the > core > dpdk library identifies as supported devices and what the pmd DSO's > actually do > support. > Yes, but if a pmd can do this itself alone, there is no discrepancy either. Thinking aloud ... As long as the pmd does all the magic bindings, the dpdk core does not need to know about it. And if the dpdk core really needs to know about this (I can see no use case here, just want to avoid being blocked later) a dynamic register system would be fine too. > To implement it we would either provide our own linker script or have to > do some > other make trickery. The linker script is a bit more labor intensive, but > might > provide some future benefit (if you see a need for non-standard sections > that > you would like to suck into a given DSO in the future). Make trickery > would be > more straightforward, but requires that we add some additional make > targets to > build out the dynamic table to be readable by outside utilities. Maybe we > could > use objcopy to add in a separate section after the dso link. Not sure yet > Not sure either, I just think we may reinvent the wheel :-) -- David Marchand