On Fri, Aug 19, 2016 at 02:31:44PM +0200, Christoph Mathys wrote: > I need to set some properties on a network interface BEFORE it is brought > up. So I use a script in if-pre-up.d that sets said properties. This > works fine if the interface is "auto". > > I had to change this to "allow-hotplug" because there can be one or two > of those interfaces. However, in the case of "allow-hotplug", someone else > sets the interface to "up" before ifup runs. This breaks my usecase and > the interface is not setup correctly after boot.
Hm, that's interesting. Normally, if allow-hotplug is set, the interface
is still brought up using the ifup command, so any if-pre-up.d script
should still be executed before the link is brought up. It should also
never be brought up twice, because ifupdown keeps track of that.
> I don't know who brings the interface up too early, I searched in
> udev/systemd and ifupdown, but couldn't find out who is responsible.
The best course of action is just to bring the link down again in the
if-pre-up.d script. That's what is being done in some other pre-up
scripts as well.
> For the interested: I set network coalesce options with ethtools to
> disable interrupt throttling. But for some reason, this is not reliable
> when I do this while the interface is coming up (that is after ifconfig
> up). I suspect some kind of race inside the driver (e1000e and igb).
Hm, that sounds like a kernel bug or maybe even a problem with the
hardware itself. But yes, the best solution is to set the coalesce
options when the link is down.
--
Met vriendelijke groet / with kind regards,
Guus Sliepen <[email protected]>
signature.asc
Description: Digital signature

