Page MenuHomeFreeBSD

It turns out the duplication is only mostly harmless.
ClosedPublic

Authored by imp on Aug 23 2019, 5:37 PM.

Details

Summary

While it worked with the kenrel, it wasn't working with the loader.
It failed to handle dependencies correctly. The reason for that is
that we never created a nvme module with the DRIVER_MODULE, but
instead a nvme_pci and nvme_ahci module. Create a real nvme module
that nvd can be dependent on so it can import the nvme symbols it
needs from there.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

imp created this revision.Aug 23 2019, 5:37 PM
jhb accepted this revision.Aug 23 2019, 5:48 PM
jhb added a subscriber: jhb.

This stuff is a bit too fragile in general, but if I fixed it, I would do a larger rototill by having MODUL_DEPEND only specify the version it is compiled against and then having modules advertise the versions they have compatible shims for (so instead of modules trying to guess a __FreeBSD_version range of kernels they are compatible with, the kernel would say which range of values it could handle modules from, and to handle things like virtual box and drm-kmod that want to use VM internals we might have a freebsd_vm "module" for which kernels advertise a smaller compatible range).

This revision is now accepted and ready to land.Aug 23 2019, 5:48 PM
imp added a comment.Aug 23 2019, 10:48 PM
In D21382#465307, @jhb wrote:

This stuff is a bit too fragile in general, but if I fixed it, I would do a larger rototill by having MODUL_DEPEND only specify the version it is compiled against and then having modules advertise the versions they have compatible shims for (so instead of modules trying to guess a __FreeBSD_version range of kernels they are compatible with, the kernel would say which range of values it could handle modules from, and to handle things like virtual box and drm-kmod that want to use VM internals we might have a freebsd_vm "module" for which kernels advertise a smaller compatible range).

We do need finer-grained dependency than we do now... This isn't quite the same thing... nvd has a... unique and special relationship with nvme that honestly should be a simple parent / child relationship for $REASONS to numerous to list here.

This revision was automatically updated to reflect the committed changes.