Re: Sanity check on a change to module load order

From: Warner Losh <imp_at_bsdimp.com>
Date: Thu, 23 Jun 2022 15:57:42 UTC
On Mon, Jun 20, 2022 at 8:11 PM Harris Snyder <harris.snyder@gmail.com>
wrote:

> Hello,
>
> I've been trying to get the iSCSI boot module to work ("isboot" in the
> ports collection) with a PCIe Mellanox NIC, and I noticed that isboot
> is declared as part of the SI_SUB_PROTO_END subsystem, whereas the
> mellanox driver module is SI_SUB_ROOT_CONF-2 (via a linux kpi
> #define), which comes later. So the iSCSI boot failed, because it
> couldn't find the Mellanox NIC as the driver wasn''t loaded yet. I am
> brand new to the FreeBSD kernel, but I was going to propose that the
> port maintainer simply move isboot down to SI_SUB_ROOT_CONF-1. Is this
> a bad idea for some reason that I'm not aware of? I tried the proposed
> modification on my own system. iSCSI boot is still failing, but for
> what I think is an unrelated reason. Even if I do get it working, are
> there any obvious undesirable side effects that I'm simply not aware
> of?
>

In general, moving things later in the boot process to satisfy a prereq
like this is fine (unless you move it past something else that depends
on this having already started).

I'm not super familiar with this code, but I took a quick look. I'm not
seeing anything that I would flag as an issue.

Warner