[LEDE-DEV] [Cake] Cake SQM killing my DIR-860L - was: [17.01] Kernel: bump to 4.4.51
Jonathan Morton
chromatix99 at gmail.com
Thu Mar 2 16:00:41 PST 2017
> On 3 Mar, 2017, at 01:16, John Yates <john at yates-sheets.org> wrote:
>
> What are the requirements for this hashing function?
> - How much data is being hashed? I am guessing a limited number of bytes rather than an entire packet payload.
Generally it’s what we call the “5-tuple”: two addresses (which could be IPv4, IPv6, or potentially Ethernet MAC), two port numbers (16 bits each), and a transport protocol ID (1 byte).
In Cake, the hash function is by default run three times, in order to get separate hashes over just the source address and just the destination address, as well as the full 5-tuple. These are necessary to operate the triple-isolate algorithm. There may be an opportunity for optimisation by producing all three hashes in parallel.
> - What is the typical number of hash table buckets? Is it prime or a power of 2?
It’s a power of two, yes. The actual number of buckets is 1024, but Cake uses the full 32-bit hash as a “tag” for hash collision detection without having to store and compare the entire 5-tuple.
- Jonathan Morton
More information about the Lede-dev
mailing list