From owner-freebsd-current@freebsd.org Tue Nov 20 02:46:20 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E4B3113A7AD for ; Tue, 20 Nov 2018 02:46:20 +0000 (UTC) (envelope-from dan_partelly@rdsor.ro) Received: from clean203.mxserver.ro (clean203.mxserver.ro [176.223.127.109]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 022D5748A0 for ; Tue, 20 Nov 2018 02:46:18 +0000 (UTC) (envelope-from dan_partelly@rdsor.ro) Received: from cloud307.mxserver.ro ([89.46.7.240]) by cleanserver2.mxserver.ro with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1gOnEM-00045z-De for freebsd-current@freebsd.org; Mon, 19 Nov 2018 12:21:04 -0500 Received: from [82.78.22.81] (port=51911 helo=[192.168.1.225]) by cloud307.mxserver.ro with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1gOnEL-00BPSj-Ly for freebsd-current@freebsd.org; Mon, 19 Nov 2018 19:21:01 +0200 From: Dan Partelly Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Devd / devmatch(8) -- netif race 12-RC1 Message-Id: Date: Mon, 19 Nov 2018 19:21:00 +0200 To: FreeBSD Current X-Mailer: Apple Mail (2.3445.9.1) X-AuthUser: dan.partelly@diosoft.ro X-Originating-IP: 89.46.7.240 X-SpamExperts-Domain: cloud307.mxserver.ro X-SpamExperts-Username: 89.46.7.240 Authentication-Results: mxserver.ro; auth=pass smtp.auth=89.46.7.240@cloud307.mxserver.ro X-SpamExperts-Outgoing-Class: ham X-SpamExperts-Outgoing-Evidence: Combined (0.14) X-Recommended-Action: accept X-Filter-ID: EX5BVjFpneJeBchSMxfU5hg+lEcGSVg0NMwTVUQlTF9602E9L7XzfQH6nu9C/Fh9KJzpNe6xgvOx q3u0UDjvOxYnfOrbv5yynLLGtiROoZXCIEosMB8bP7XRr5Ru9ccv1kN9h/JMaXpH3QAmrQScTRK/ ap+37Ts3EFG1lHMZcfynH/uMuybLqnATUjKobC5ejNjanhCp59cgZO18BLEVwlLgNuxLX4ccNvFn 1TmzNyR5UZg0wS+n1rnhcYzBhzBiIkRInETzFeWnWEMjTrypoO20Rue/s6EE0c5bkubSRmwZ5Pwh +xjA76z0d+efDlXSDD2gT2inkFvv0JWjnb/IrKlDmIJyW38W7+aXaHbyXDVnUieBFCycRYsm3u7b Vr0Wdh4/UftkpoV+CH2yD6i/JAkmr0Aaz6GoBF32dtdAsfG8Ksk+aedMfNWSnJswrtlNMmPQnCyf 9d5/D0pODifKzh7AtVGoA2PqbOXMvdUflYx1/atoPPXpgcY5OL20mhCuJgQWcrs8q+WcXVXZDcW5 0g76yqA0Nu4mwQqhIOhV9G6NzxWCRNOXsxOxrshsuaiIlOflcHKQjpcsGgA6q9FNAbFbM+EYGZJV r7MNKT5QaSzsHmlD3vQ7e6yhfhNiQZsPzGZksjEn4plfZE37s9mYaKNaKi/rT33jiWT7oVBkxUv0 uQdRJNEkMSjN6Th0hAA6tS2tEStfmiak0cnSEwJ23NanJX7wS0Ry3Mvg3lekAV2Edj15aKMKRR5k 9ZpsoDFut80nrKJx+82BDVZPKE7juJlXVjIO0galCsFt2MW+msesDZ6gtYl6LDI8voYeQdI0ctgz cDoFd+96Xw4QUNtTnUhFD7I36iguHgBfh2Rn4EWBdBv1bgqqCt2j+qUdDBHXhfLMChPQzgYLg9Q3 2E9lPPnw0tP+QpdL6x38o7rgJXIkE+88OME9qjCh92R8cfjmdQdVd9YOTNwpMBmKomfUUSAzeyjU OpHImeuYR4duOFGuPlALO5c3Xa/F5FuESniSqycyl+LWFNqGA1OM3l5vj0oHBF0RsCAGFbcMBWwu oII= X-Report-Abuse-To: spam@cleanserver1.mxserver.ro X-Rspamd-Queue-Id: 022D5748A0 X-Spamd-Result: default: False [6.10 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_XOIP(0.00)[]; MV_CASE(0.50)[]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[cached: smtp.rdsor.ro]; RECEIVED_SPAMHAUS_PBL(0.00)[81.22.78.82.zen.spamhaus.org : 127.0.0.11]; R_DKIM_NA(0.00)[]; IP_SCORE(-0.02)[asn: 5588(-0.09), country: CZ(0.01)]; ASN(0.00)[asn:5588, ipnet:176.223.126.0/23, country:CZ]; MID_RHS_MATCH_FROM(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; ARC_NA(0.00)[]; RECEIVED_SPAMHAUS_XBL(3.00)[240.7.46.89.zen.spamhaus.org : 127.0.0.4]; R_SPF_FAIL(1.00)[-all]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(0.81)[0.805,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[rdsor.ro]; NEURAL_SPAM_MEDIUM(0.31)[0.314,0]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_SPAM_LONG(0.61)[0.606,0]; RCVD_IN_DNSWL_NONE(0.00)[109.127.223.176.list.dnswl.org : 127.0.10.0]; GREYLIST(0.00)[pass,body]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Server: mx1.freebsd.org X-Spam: Yes X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Nov 2018 02:46:20 -0000 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 =E2=80=9Cplug and play=E2=80=9D = initialization of the wireless device is complete (no driver no firmware = yet ) , wlan0 creation is impossible and so on and so forth.=20 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.=20 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.=