Devd / devmatch(8) -- netif race 12-RC1

From: Dan Partelly <dan_partelly_at_rdsor.ro>
Date: Mon, 19 Nov 2018 19:21:00 +0200
Hello,

Today I tried a simple wireless failover on a machine  running free-bsd. After reboot the system cannot complete the initialization sequence OK with devmatcher.
The devd/devmatch(8) combo correctly identified the wireless card and loaded required drivers and firmware. rcorder(8) reports  that devd(8) runs after netif. As far as I gather, devd (8) runs devmatch(8) on nomatch class events. This results in the situation in which the interfaces are created before “plug and play” initialization of the wireless device is complete (no driver no firmware yet ) , wlan0 creation is impossible and so on and so forth. 
More so, I believe the runs of devmatch(8) are async in this scenario, so even if you moved devd(8) before netif service, this would not solve the issue, there will be race conditions.  I know this can be solved by loading the drivers manually, but still rising some issue is in order:

1) Why does devd(8) service runs after netif ? I believe it should run before netif service, probably after kld service. Is there anything which prevents changing this order ?
2.) In the scenario in which devd(8) is started before netif, what can be done to ensure that a barier exists such that an arbitrary devmatch(8) run is guaranteed to finish loading required drivers before netif ? Ignore this if Im wrong about asyc nature of devmatch(8) run. 
3 In what state is devmatcher now ? A lot of modules seems to be loaded ok, but some do not yet. coretemp(4) hwpmc(4) , intel serie 9 smbus driver seems not.
Received on Tue Nov 20 2018 - 01:46:20 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:19 UTC