[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[altq 1049] Re: altq not working in NetBSD 1.5
RE: [altq 1037] Re: altq not working in NetBSD 1.5I don't think this is the
issue, but I could well be wrong.
In my copy of /miscfs/specfs/spec_vnops.c (NetBSD) the only line that
contains 'nchrdev' returns an error that specifically mentions that
variable... in other words, if it was that error, I would be receiving an
error that mentions the variable, and I do not.
That same variable is mentioned over a hundred times in other files, so I'm
not completely ruling that out... but it doesn't seem likely given my
limited understanding. Throughout the code, the value of nchrdev seems to be
variable... determined at runtime based on sizeof(somechardevarray), not
fixed at compile time.
Thank you for the possibility however. Perhaps the other members of the altq
mailing list will tell me that I'm wrong and this is the solution.
From: Hwang, Lin Yuh-Ing (Lin Yuh-Ing)
Sent: Thursday, September 06, 2001 2:27 PM
Subject: Re: altq not working in NetBSD 1.5
I am running altq on OpenBSD. I had similar problems yesterday. This morning
I found out that my problem was
1. I had a mismatch of major numbers. In altq_conf.c I had altq major # =
72, while in MAKEDEV.altq I had major # = 70. So I changed MAKEDEV.altq
script to have major # for altq = 72 to match that in altq_conf.c. But then
I still could not get altq to work.
2. Then I found out my problem was that my altq major # is 72, the system's
max character device number is 71, (nchrdev has that value, I found it in
spec_vnops.c), so the altq_open() function never gets called. So I changed
the major number for altq in both altq_conf.c MAKEDEV.altq to 70 and build
the kernel, reboot it and rerun "sh MAKEDEV.altq all". And now I seem to be
able to configur altq now.
I hope this will help.
From: Myrddin Emrys [SMTP:email@example.com]
Sent: Tuesday, September 04, 2001 2:05 PM
To: firstname.lastname@example.org; email@example.com
Subject: [altq 1037] Re: altq not working in NetBSD 1.5
From: Kenjiro Cho <firstname.lastname@example.org>
Sent: Tuesday, September 04, 2001 9:52 AM
> Another place you can look at is the entry point for the special
> device open call: spec_open() in sys-altq/miscfs/specfs/spec_vnops.c.
> You can insert something like:
> if (maj == 75)
> printf("cdevsw.d_open = %p\n", cdevsw[maj].d_open);
> to get the address of the open routine for cdev 75.
> Then, compare it with the result of "nm /netbsd | grep altqopen".
Did this, got output. Every time I attempt to start altqd, I get the message
(in kernel colors):
cdevsw.d_open = 0xc011902c
This matches the address for the altqopen() function as found by nm:
c011902c t altqopen
Yet, the printf statement I added to the altqopen() function never prints:
altqopen(dev, flag, fmt, p)
int flag, fmt;
struct proc *p;
int unit = minor(dev);
+ printf("altq: Entering altqopen, unit = %i",unit);