Subject: Re: kernel-internal interface changes?
To: None <tech-kern@NetBSD.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-kern
Date: 03/25/2005 03:11:52
>> My stab seems to have missed.  I suspect there's something I don't
>> understand about packages and something I don't understand about
>> 2.0, and they're adding up to "it doesn't work".
> In my opinion, there are a lot of things you don't *want* to
> understand.

Your opinion is more or less correct.  I have no particular desire to
understand more of 2.0 than I have to to make this work.  This is
something I'm working on because I'm paid to, not - unlike most of my
NetBSD hackery - because it's something I enjoy doing for its own sake.
If it were a project of my own, it would be for 1.4T+mouseisms, I would
be a lot less hesitant to use non-stock stuff - and I daresay I would
not be asking all these questions.

But that's not to say that I don't want to understand that much.  Even
when the work is done for money rather than love, I still have my
professionalism and my pride in workmouseship.

>> [...error when trying to use the package...]
>> This isn't my idea of "it works with 2.0".
> You should have done what pkgsrc was telling you (after all, it's
> only one single command it's asking you to do!).

Now that you've confirmed that it's not for 2.0 but rather for
2.0-plus-newer-pkg-tools, I will.  I assumed I'd done something wrong
and got the wrong version of the package, or was trying to use it
wrong, because the error seemed to be saying that what I had was not
compatible with 2.0, conflicting with your statement that there was
such a package that did work with 2.0.

> You should have looked at how things are done in -current/-3:

> defpseudo tap {[unit = -1]}:            ifnet, ether, bpf_filter

> The reason why there is a locator is to get config(8) to generate the
> CFDRIVER_DECL() line in ioconf.c.

Aha!  (Out of idle curiosity, if you have the time and inclination to
satisfy it - and this may well be something that I don't know only
because I'm at home and all this stuff is at work - how do all the
kernel config bits get into sys/conf/files and sys/conf/majors and such
when you use the package?  I specifically went looking for scripts and
the like that might do something like patch those files.  I must have
missed something again, but what?)

> The fun thing about this is that tap(4) (back when it was the very
> simple and straightforward ethfoo(4)) was specifically written to be
> an example of a LKM.  I really thought I explained enough, or at
> least gave enough background, to the autoconf(9) APIs, in the
> commentaries if if_tap_lkm.c.

Well, for this, I definitely do not want an LKM, so I was ignoring
anything that looked LKM-specific - including if_tap_lkm.c.  I'll give
it a read-over.

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B