Cake - FQ_codel the next generation
 help / color / mirror / Atom feed
From: Jonathan Morton <chromatix99@gmail.com>
To: John Yates <john@yates-sheets.org>
Cc: "Dave Täht" <dave@taht.net>,
	cake@lists.bufferbloat.net, lede-dev@lists.infradead.org
Subject: Re: [Cake] [LEDE-DEV] Cake SQM killing my DIR-860L - was: [17.01] Kernel: bump to 4.4.51
Date: Fri, 3 Mar 2017 02:00:41 +0200	[thread overview]
Message-ID: <3A9C046E-DE4C-4D97-BC47-2AD00D4F6A79@gmail.com> (raw)
In-Reply-To: <CAJnXXojvcbxcFwYXem9nR=25eg5O9S6BNyiE+mo0LwWWeWJ8RA@mail.gmail.com>


> On 3 Mar, 2017, at 01:16, John Yates <john@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


  reply	other threads:[~2017-03-03  0:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <e955b05f85fea5661cfe306be0a28250@inventati.org>
     [not found] ` <07479F0A-40DD-44E5-B67E-28117C7CF228@gmx.de>
     [not found]   ` <1488400107.3610.1@smtp.autistici.org>
     [not found]     ` <2B251BF1-C965-444D-A831-9981861E453E@gmx.de>
     [not found]       ` <1488484262.16753.0@smtp.autistici.org>
2017-03-02 21:10         ` Dave Täht
2017-03-02 23:16           ` John Yates
2017-03-03  0:00             ` Jonathan Morton [this message]
2017-03-02 23:55           ` John Yates
2017-03-03  0:02             ` Jonathan Morton
2017-03-03  4:31               ` Eric Luehrsen
2017-03-03  4:35                 ` Jonathan Morton
2017-03-03  5:00                   ` Eric Luehrsen
2017-03-03  5:49                     ` Jonathan Morton
2017-03-03  6:21                       ` Dave Taht
2017-03-06 13:30                         ` Benjamin Cronce
2017-03-06 14:44                           ` Jonathan Morton
2017-03-06 18:08                             ` Benjamin Cronce
2017-03-06 18:46                               ` Jonathan Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.bufferbloat.net/postorius/lists/cake.lists.bufferbloat.net/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3A9C046E-DE4C-4D97-BC47-2AD00D4F6A79@gmail.com \
    --to=chromatix99@gmail.com \
    --cc=cake@lists.bufferbloat.net \
    --cc=dave@taht.net \
    --cc=john@yates-sheets.org \
    --cc=lede-dev@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox