maximum number of queues

Ronnel P. Maglasang rmaglasang at infoweapons.com
Wed Jun 28 00:41:44 UTC 2006


Artis Caune wrote:
>> Ronnel P. Maglasang wrote:
>>> hi, is there a maximum system limit for the number of queues for
>>> altq? is this settable/tunable? whats the default limit?
>>>
>
>
> # grep _MAX_ sys/contrib/altq/altq/*.h
>
> edit, tune && recompile kernel
>

i came across an old thread that answered the same problem, it said
modify the following typedef:

#define  HFSC_MAX_CLASSES        64


is this enough? whats the logic behind the changes? is there a formula to
this?

looking at the code, pf seemed to run out of memory when it allocates
an "altq" data from the altq pool.

sys/contrib/pf/net/pf_ioctl.c

--
--
       case DIOCADDALTQ: {
                struct pfioc_altq       *pa = (struct pfioc_altq *)addr;
                struct pf_altq          *altq, *a;

                if (pa->ticket != ticket_altqs_inactive) {
                        error = EBUSY;
                        break;
                }
                altq = pool_get(&pf_altq_pl, PR_NOWAIT);
                if (altq == NULL) {
                        error = ENOMEM;
                        break;
                }
--
--


More information about the freebsd-pf mailing list