From nobody Thu Jun 23 15:57:42 2022 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 289C685ED3E for ; Thu, 23 Jun 2022 15:57:55 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-vs1-xe35.google.com (mail-vs1-xe35.google.com [IPv6:2607:f8b0:4864:20::e35]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LTPzQ3GQ3z4yQT for ; Thu, 23 Jun 2022 15:57:54 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-vs1-xe35.google.com with SMTP id o190so3484309vsc.5 for ; Thu, 23 Jun 2022 08:57:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rSslDPh1hbihlteNfne7IJC+Fjmo7aklm2pa9UfXkRg=; b=CDsNEgXEwT9ih1tpwL/VXdRntOXaIYLHdHk4V/USLJ2yCLf3a0TFXjMIpndl7zvRqD 2oAT7DolChiiTv5OFnpWYfR5xFyERUR7mZ6Sa87KIyit8c4xwU1vQ/m4fCdFb2ZK6hr9 +67OmlmNolkxMAfpyzya+huHmYsK1bVBTS9sDaTmtwdoFRVbGCnezZm13fkifb1Um9qj 7rKAg2xIRY/h2Venhw7ffR+hXaPEYuq/ZwaewuMMUquphxiKn68W8MalU1NbZV2iOSku kOd9v0YVHl+4Dsubn3pEzEUSnSbqfjFB4IMb7h0eI+qpdgG1G9EiL14AaOqm4Ix2KIOc BEtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rSslDPh1hbihlteNfne7IJC+Fjmo7aklm2pa9UfXkRg=; b=0XD+IvquD7uQn/TnHvp+npIb9A+/DFd+B6rWT+pGnnUWbOAKPM4s74EceMS9Aa5g1a gt/Mf29Sd9p2SEgx0Q+3iB7+3hrvciBk+GVRpE9u8SPqBnmG/rrGAjlVO1JZBdGOykI9 wDY10vKHsdphLvaowyOkGSQ1e80w6wzlWB3Fl/rJ2kSfL6hO71KJx2XoPv/5AvRgTjcz W9bjym+zIMAH4L+XAOzxoukZyKjsKX2W8zp/v0AJ7EwE0tvKseGZFRkW/f/FDfCCQDRX +cT4e6Bt3VQT3oSMGU+JaNHdLz/cTLt7QV2gI6iMORbBm8Mi+9QYK3gpazdzh++YE0lz HlXw== X-Gm-Message-State: AJIora/Z4RgGHfmpDWRwJKyhKvWqkvuE9ZUPouwe6BXD+a70+j3gTLDl X7XURXx6zZTuookwyZz8itFgCcw8sahb8/Ms8KJTMRqJCio= X-Google-Smtp-Source: AGRyM1vu/LIypzXpk4Ugi+8bMYz0bqjdm7whtmpluDH4j+v1jPXVwEqrWuk+bbHPm6T0ndLFl9jcFYWEJr+fp8f0uCU= X-Received: by 2002:a05:6102:3d85:b0:34c:102b:560 with SMTP id h5-20020a0561023d8500b0034c102b0560mr17532839vsv.40.1655999873946; Thu, 23 Jun 2022 08:57:53 -0700 (PDT) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Warner Losh Date: Thu, 23 Jun 2022 09:57:42 -0600 Message-ID: Subject: Re: Sanity check on a change to module load order To: Harris Snyder Cc: FreeBSD Hackers Content-Type: multipart/alternative; boundary="0000000000003c270f05e21f8420" X-Rspamd-Queue-Id: 4LTPzQ3GQ3z4yQT X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20210112.gappssmtp.com header.s=20210112 header.b=CDsNEgXE; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::e35) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-3.00 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20210112.gappssmtp.com:s=20210112]; NEURAL_HAM_MEDIUM(-1.00)[-0.998]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20210112.gappssmtp.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::e35:from]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MLMMJ_DEST(0.00)[freebsd-hackers]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; R_SPF_NA(0.00)[no SPF record]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com] X-ThisMailContainsUnwantedMimeParts: N --0000000000003c270f05e21f8420 Content-Type: text/plain; charset="UTF-8" On Mon, Jun 20, 2022 at 8:11 PM Harris Snyder 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 --0000000000003c270f05e21f8420 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Mon, Jun 20, 2022 at 8:11 PM Harri= s Snyder <harris.snyder@gmail= .com> wrote:
Hello,

I've been trying to get the iSCSI boot module to work ("isboot&quo= t; 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<= br> 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 yo= u move it past something else that depends
on this having already= started).

I'm not super familiar with this co= de, but I took a quick look. I'm not
seeing anything that I w= ould flag as an issue.

Warner
--0000000000003c270f05e21f8420--