On Tue, Sep 29, 2015 at 12:30:54AM +0300, Mantas Mikulėnas wrote:
> I wonder if this could be handled with a generic Type=oneshot,
> ExecStart=driverctl bind foo...

Could you elaborate more on that?

If driverctl is an utility, we could use scripts, yeah.  The issue
is how to identify the device. We probably would need some sort
matching mechanism like udev does.

Another issue is identifying the target driver.  Ideally you would
have a template that says the device and the driver somehow.
For example something like ``bind-@.service´´, so when you start
bind-eth0@vfio-pci.service it would unbind eth0 from the previous
driver (if needed) and bind the device to vfio-pci driver.

fbl

 
> -- 
> Mantas Mikulėnas
> On Sep 28, 2015 21:48, "Flavio Leitner" <f...@sysclose.org> wrote:
> 
> > On Mon, Sep 28, 2015 at 08:06:50PM +0200, Kay Sievers wrote:
> > > On Sun, Sep 27, 2015 at 11:37 PM, Flavio Leitner <f...@sysclose.org>
> > wrote:
> > > > I am looking for guidance on how to properly resolve driver binding
> > > > with systemd (which seems to me the best place to do that).
> > >
> > > This seems to be a too exotic and niche use case, nothing
> > > general-purpose enough to implement high-level knobs in systemd.
> >
> > These alternative drivers might be new yet, so there is no much around
> > them, but we need to start right to avoid problems in the future.
> >
> > Accelerated userspace datapath is one use case that changes the default
> > NIC driver to UIO or VFIO driver. Then you use DPDK applications for
> > fast packet processing or use DPDK integrated Open vSwitch for switching.
> >
> > Consider that Open Stack (WIP), Open Shift and maybe containers can use
> > the above setup, so isn't really a niche use case.  It's pretty much a
> > requirement for NFV projects as well.
> >
> > > As you mention, you could use custom udev rules to actually bind a
> > > specific driver. I don't think we want anything more abstract in
> > > systemd.
> >
> > The problem with that is we can't stop the service to roll back the
> > driver.  Or more importantly, create a dependency to, let's say,
> > start Open vSwitch only after the ports are bound to the right driver.
> > Or start an application that requires the NIC to be bound first.
> >
> > Thanks,
> > fbl
> >
> > _______________________________________________
> > systemd-devel mailing list
> > systemd-devel@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/systemd-devel
> >

_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to