problems with altq

Max Laier max at love2party.net
Wed Aug 4 11:05:04 PDT 2004


On Wednesday 04 August 2004 15:05, Divacky Roman wrote:
>                 struct pf_altq          *altq, *a;
>
>                 if (pa->ticket != ticket_altqs_inactive) {
>                         error = EBUSY;
>                         break;
>                 }
>                 altq = pool_get(&pf_altq_pl, PR_NOWAIT);
> 			         ^^^^^^^^^^
> shouldnt this be initalized to NULL? at least its not nice to have it
> uninitalized...

hum?
$ cd /usr/src/sys/contrib/pf/net && grep pf_altq_pl *
<...>
pf_ioctl.c:     pf_state_pl = pf_altq_pl = pf_pooladdr_pl = NULL;
pf_ioctl.c:     UMA_DESTROY(pf_altq_pl);
pf_ioctl.c:             UMA_CREATE(pf_altq_pl,    struct pf_altq, "pfaltqpl");
<...>

Or what are you thinking about?

Just like Dan Cojocar said in his reply, I can't reproduce your problem 
here :-\

> On Wed, Aug 04, 2004 at 02:56:40PM +0200, Divacky Roman wrote:
> > I am getting this
> > pfctl: DIOCADDALTQ: Cannot allocate memory
> > if I try to enable altq on pf configured as
> >
> >    altq on $ext_if bandwidth 256Kb cbq queue { ssh_i web other}
> >    queue ssh_i bandwidth 25% cbq(borrow red)
> >    queue web bandwidth 25% cbq(borrow red)
> >    queue other bandwidth 50% cbq(borrow default red)
> >
> >
> > without that "red" it works ok...

Now that is strange as it makes no difference in the DIOCADDALTQ call path 
whether you use RED or not. Might it be possible that you really are short on 
(kernel) memory?

-- 
/"\  Best regards,			| mlaier at freebsd.org
\ /  Max Laier				| ICQ #67774661
 X   http://pf4freebsd.love2party.net/	| mlaier at EFnet
/ \  ASCII Ribbon Campaign		| Against HTML Mail and News
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: signature
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20040804/1f96c204/attachment.bin


More information about the freebsd-current mailing list