hashing filters - increasing no. of buckets and hashkey size

Linux Advanced Routing and Traffic Control

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

 



In tc, each hashtable can have a maximum of 256 buckets and each
bucket contains actual filters.

Besides, there is an option of 'hashkey' which when used on traffic,
gives a 8 bit number using which one can achieve Hashing filters. i.e.
we dont have to search linearly in filters and can directly reach a
bucket.

If there are say, 1024, linearly increasing IPs then I need to search
only 4 filters at max.

however, if there are more  IPs, and more importantly not linearly
increasing and can fall in anywhere in a class A subnet 10.0.0.0/8,
then I will have to do is multi-level hashing and achieve similar
behaviour. But that would require atleast 3 times hashing calculation
on every pkt and can be a performance intensive task.

If this 8 bit can be increased to 24 bit and no. of buckets become 4M
then it will be possible to achieve the required behaviour and that
too with a nice performance. I agree that overhead could be memory in
this but that is acceptable.

Whats your view on this?

Is it possible by some parameter editing or variable modification and
recompiling tc or some other way?
--
To unsubscribe from this list: send the line "unsubscribe lartc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux