HomeFreeBSD

devd: move all devd notification logic to a separate file.

Description

devd: move all devd notification logic to a separate file.

Currently, subr_bus.c shares logic for (a) maintaining all HW devices
(e.g. discovery/attach/detach logic) and (b) generic devctl notification
layer for devices/PMU/GEOM/interfaces/etc).
These two subsystems share really tiny interaction interface, composed of 3
notification functions. With that in mind, move devctl layer to a
separate file, establishing a clear notification interface between the
sub.c bus layer and the provider (devctl).

The primary driver of this change is netlink implementation (D36002).
The idea is to propagate device-level events to netlink as well, so all
netlink customers can subscribe to these changes.
The long-term goal is to deprecate devctl and to use netlink as the
kernel<> userland transport provided netlink gets enough traction.

Reviewed by: imp, markj
Differential Revision: https://reviews.freebsd.org/D36091
MFC after: 1 month

Details

Provenance
melifaroAuthored on Aug 9 2022, 3:55 PM
Reviewer
imp
Differential Revision
D36091: devd: move all devd notification logic to a separate file
Parents
rG5c4d2252d771: routing: move rtentry and subscription code out of route_ctl.c
Branches
Unknown
Tags
Unknown