On Mon, 14 Apr 2014 08:57:54 +0000 "Burakov, Anatoly" <anatoly.burakov at intel.com> wrote:
> Hi Stephen, > > > I actually liked the unbind code that was there. It meant that additional > > logic > > did not have to be added to the startup script to do PCI discovery and > > finding/mapping devices. > > > > As it is the EAL startup process is a bit of a mess. It assumes that > > various bits > > of information and infrastructure are already in place prior to starting the > > DPDK application. > > I would argue that it's not the responsibility of the application to set up > its environment. The EAL startup process is indeed a bit all over the place, > but the alternative would be worse. Those "various bits of information and > infrastructure" you're referring to include, say, hugepages - I don't think > it's a good idea for an application to meddle with system's hugepages any > more than I think it's a good idea for it to meddle with the driver bindings. > > Plus, current state of affairs makes for headaches in the future when support > for other drivers is implemented (say, VFIO). It's much better to move the > responsibility of binding the drivers to the user, and DPDK provides quite > convenient means to do that (the PCI binding Python script) and also a > centralized script to prepare the DPDK environment without much hassle (the > setup.sh). > > Best regards, > Anatoly Burakov > DPDK SW Engineer > The problem is that doing the initialization requires duplicating all the logic to probe the PCI bus and do blacklisting etc in the startup application.