Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Mar 2017 13:12:05 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        Adrian Chadd <adrian.chadd@gmail.com>
Cc:        Navdeep Parhar <nparhar@gmail.com>, Ryan Stone <rysto32@gmail.com>,  Sean Bruno <sbruno@freebsd.org>, =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= <roger.pau@citrix.com>,  src-committers <src-committers@freebsd.org>,  "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>,  "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
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
Message-ID:  <CANCZdfor3nCPiQGtR=XmEFph24MKnse4S2h2HCa5D8wu_EZnkQ@mail.gmail.com>
In-Reply-To: <CAJ-Vmo=%2B6uAm3bdF1u3jxGkQdK1fB7m%2Bh5c=mQR84GATAqanZg@mail.gmail.com>
References:  <201701100323.v0A3NMAI045868@repo.freebsd.org> <20170215100637.2xsyyu46odzig4c4@dhcp-3-221.uk.xensource.com> <f6022c26-ea27-1964-426a-dd61b66abe13@freebsd.org> <CANCZdfrj_t2Fmt4Er3oSU7Nf-Qois-Lzwn5DZ23i78c%2B22Crug@mail.gmail.com> <CAFMmRNyLuKZbMK3fVm=1G7Ky2KQsFOP4BNqkEhyRodxFZbBPpA@mail.gmail.com> <CAPFoGT9qDs%2Bu5erPNc-v825X7y%2B5icG0SNZj0OSrhoLy8ReJ9Q@mail.gmail.com> <CAJ-VmonGN9oxB6SXfGQ5u1FSDbjo1A%2BFeRzcJtEd%2B78cLCcKHQ@mail.gmail.com> <CANCZdfqNngQ5X5YJsQeQzs6N_pd5RahcS3UjsxhujpJawAokaA@mail.gmail.com> <CAJ-Vmo=%2B6uAm3bdF1u3jxGkQdK1fB7m%2Bh5c=mQR84GATAqanZg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Mar 10, 2017 at 1:10 PM, Adrian Chadd <adrian.chadd@gmail.com> wrot=
e:
> On 10 March 2017 at 12:09, Warner Losh <imp@bsdimp.com> wrote:
>> 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.
>
> Sounds like a GSoC project. :-)

Done properly, it could also solve the auto-loading of drivers issue
:) Many of the pieces are there, though marking pci drivers would need
to be done in earnest.

Warner

>
> -adrian
>
>> Warner
>>
>> On Fri, Mar 10, 2017 at 1:07 PM, Adrian Chadd <adrian.chadd@gmail.com> w=
rote:
>>> s/ifconfig/put-it-in-a-config-file-in-share-so-we-dont-have-to-patch-if=
config-every-time-we-change-this-kthxbai/g
>>>
>>>
>>> -adrian
>>>
>>>
>>> On 10 March 2017 at 11:12, Navdeep Parhar <nparhar@gmail.com> wrote:
>>>> On Fri, Mar 10, 2017 at 10:41 AM, Ryan Stone <rysto32@gmail.com> wrote=
:
>>>>> There's also the issue that running "ifconfig igb0 blah" during start=
up 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 <imp@bsdimp.com> wrote:
>>>>>>
>>>>>> On Fri, Mar 10, 2017 at 11:06 AM, Sean Bruno <sbruno@freebsd.org> wr=
ote:
>>>>>> >
>>>>>> >
>>>>>> > 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_i=
gb.ko
>>>>>> >>
>>>>>> >> This linking causes mfsBSD to choke when building an image from H=
EAD.
>>>>>> >> 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 c=
hange
>>>>>> >> 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 rem=
oved
>>>>>> >> 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 loo=
ks
>>>>>> it up to see which module to load. Maybe there's a way to fix it so
>>>>>> both load from one file?
>>>>>>
>>>>>> Warner
>>>>>>
>>>>>
>>>>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfor3nCPiQGtR=XmEFph24MKnse4S2h2HCa5D8wu_EZnkQ>