From owner-svn-src-all@freebsd.org Fri Mar 10 20:09:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F23CD0688B for ; Fri, 10 Mar 2017 20:09:29 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x244.google.com (mail-it0-x244.google.com [IPv6:2607:f8b0:4001:c0b::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 10B031E4A for ; Fri, 10 Mar 2017 20:09:29 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x244.google.com with SMTP id r141so493763ita.1 for ; Fri, 10 Mar 2017 12:09:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=A9ZWWoSIUEk55y4ETOndne2l/GyiydkWDCP9Cvk+kBw=; b=TRy3/FviPL34J8tJ3/pS0i9bwhmpIZ2sZsu2v/ytUG78EIExfit8zZMYL+MpWvrTl3 niSaot8bcF9Zt7nZWX/no87xGnZx8NNjxcqz6oaCJ9mUbSB92WcFX+C/PWs7TRiWI1B5 qiZzA3vE0e+qA9olDATDB9uSnF0LLhvNSwoyFAw/AElqhK8AiOPCP1NyJukrDh0L3aLP eEqZw4HAD3TECy6tgrmI3lbrg5vLTmmB8FKAH8sVTw7+XwXWpw+2wBcUGiLEDuoiDly1 jlLCKFjIo8Y/I+UJ5DIpXuMc45628EjUOyQqRDyQU2e569fTE089bSpx+kuPD6Jq8PK6 koJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=A9ZWWoSIUEk55y4ETOndne2l/GyiydkWDCP9Cvk+kBw=; b=kLli3HnUsgbhQ5MhOrydmMTU4e7Sw/BDoHVSWQF9y4IedYetUh720lZSU+qq+jnsqB VwJUYzhjVgPTll+T9wKczWFk9OyM7Bxh1/irS8jZ7t7C8cKiaatagS+tRvKR9wwOK9Ne aCFf4qFReAzE+TTac8DN70XkWNbJkIhrKRB/p2ox7J+/pklnmlM+nBesNM23sOV5Z+PT HIYVXHkSp+rDDrEsH74klJRK/tN09EU13sZcH3TlftetPhIW7Cu3cTjmg9EdRZRbgbNF yisLMv1OGwJPyJLCgn+iWEEMn94Az0JrlvIUNAFhrqh3FW2SqyMuq7VsRC3edKSNV0G4 qXSg== X-Gm-Message-State: AFeK/H13ZwKXvam64sxWsM56jJmWP+1ivcEaOWAiEQk9I+aPae8/qawN1+F9Z5HN9DjgdufmcSeig5LjuT8Dlg== X-Received: by 10.36.90.194 with SMTP id v185mr776912ita.85.1489176568123; Fri, 10 Mar 2017 12:09:28 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.134.129 with HTTP; Fri, 10 Mar 2017 12:09:27 -0800 (PST) X-Originating-IP: [69.53.245.200] In-Reply-To: References: <201701100323.v0A3NMAI045868@repo.freebsd.org> <20170215100637.2xsyyu46odzig4c4@dhcp-3-221.uk.xensource.com> From: Warner Losh Date: Fri, 10 Mar 2017 13:09:27 -0700 X-Google-Sender-Auth: b7AYWbPK3e7Gnwy9OcNpgO5whnE Message-ID: Subject: Re: svn commit: r311849 - in head: . sys/amd64/conf sys/arm64/conf sys/conf sys/dev/e1000 sys/i386/conf sys/mips/conf sys/modules sys/modules/em sys/modules/igb sys/powerpc/conf To: Adrian Chadd Cc: Navdeep Parhar , Ryan Stone , Sean Bruno , =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Mar 2017 20:09:29 -0000 It's already in loader.hints. The bug is that ifconfig doesn't use a library (which others can use) to find the module by name, but rather assumes a particular filename -> module name mapping. Warner On Fri, Mar 10, 2017 at 1:07 PM, Adrian Chadd wrot= e: > s/ifconfig/put-it-in-a-config-file-in-share-so-we-dont-have-to-patch-ifco= nfig-every-time-we-change-this-kthxbai/g > > > -adrian > > > On 10 March 2017 at 11:12, Navdeep Parhar wrote: >> On Fri, Mar 10, 2017 at 10:41 AM, Ryan Stone wrote: >>> There's also the issue that running "ifconfig igb0 blah" during startup= will >>> cause if_igb to be automatically loaded by ifconfig. >>> >>> I guess we could add a dummy if_igb.ko that just has a dependency on >>> if_em.ko >> >> I do similar stuff in cxgbe (if_cxl.ko and if_cc.ko exist solely to >> drag in if_cxgbe.ko as a dependency). In hindsight I wish I'd just >> added a list of ifnet names -> kld map to ifconfig instead. It would >> have been an ugly hack but much simpler. >> >> Regards, >> Navdeep >> >>> >>> On Fri, Mar 10, 2017 at 1:13 PM, Warner Losh wrote: >>>> >>>> On Fri, Mar 10, 2017 at 11:06 AM, Sean Bruno wrot= e: >>>> > >>>> > >>>> > On 02/15/17 03:06, Roger Pau Monn=C3=A9 wrote: >>>> >> On Tue, Jan 10, 2017 at 03:23:22AM +0000, Sean Bruno wrote: >>>> >>> Author: sbruno >>>> >>> Date: Tue Jan 10 03:23:22 2017 >>>> >>> New Revision: 311849 >>>> >>> URL: https://svnweb.freebsd.org/changeset/base/311849 >>>> >>> >>>> >>> Log: >>>> >>> Migrate e1000 to the IFLIB framework: >>>> >>> - em(4) igb(4) and lem(4) >>>> >>> - deprecate the igb device from kernel configurations >>>> >>> - create a symbolic link in /boot/kernel from if_em.ko to if_igb= .ko >>>> >> >>>> >> This linking causes mfsBSD to choke when building an image from HEA= D. >>>> >> It tries >>>> >> to issue the following command: >>>> >> >>>> >> ${_v}${CP} -rp ${_BOOTDIR}/kernel ${WRKDIR}/disk/boot >>>> >> >>>> >> Which fails when finding the symbol link. I can send a patch to cha= nge >>>> >> that to >>>> >> -Rp, which would work fine, but wouldn't it be better to either >>>> >> completely >>>> >> remove if_igb.ko, or simply copy if_em.ko to if_igb.ko? >>>> >> >>>> >> I'm wondering if for example anyone strips down it's /boot/kernel/ >>>> >> manually, by >>>> >> removing unused modules, and what would happen if if_em.ko is remov= ed >>>> >> but not >>>> >> if_igb.ko. >>>> >> >>>> >> Roger. >>>> >> >>>> >> >>>> > >>>> > Well, this was my naive attempt to make upgrades for users to be >>>> > non-eventful in the event they have "if_igb_load=3DYES" in their >>>> > loader.conf instead of having it built into their kernel. >>>> > >>>> > If the -Rp works, I'll add that instead. >>>> >>>> The module name is encoded in the module itself. The boot loader looks >>>> it up to see which module to load. Maybe there's a way to fix it so >>>> both load from one file? >>>> >>>> Warner >>>> >>> >>