Re: tc divisor maximum is too small

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 02 May 2007 18:34:20 +0400
Stanislav Kruchinin <stas@xxxxxxxxxxxx> wrote:

> I wrote a simple patches for userland and kernel parts of u32 classifier:
> iproute/tc/f_u32.c
> linux/net/sched/cls_u32.c
> 
> Now I can use filter table with 16384 entries. It's enough for O(1) operation,
> but still not enough for using last two octets of IP address as a hash key.
> Divisors 32768 and 65536 are not allowed due to insufficient kernel buffer
> memory.
> 
> Command
> # tc filter add dev eth1 parent 1:0 prio 5 handle 2: protocol ip \
>       u32 divisor 65536
> 
> gives "RTNETLINK answers: No buffer space available" instead of "Invalid divisor".
> 
> The question is "How to increase the size of the kernel buffer space?".

You probably are limited by the max kmalloc() size (131072 bytes)

You might try to change include/linux/kmalloc_sizes.h to add/enable

CACHE(262144)
CACHE(524288)

Or even better, change kmalloc/kzalloc/kfree to vmalloc/vfree variant

-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux