Cake - FQ_codel the next generation
 help / color / mirror / Atom feed
From: Dave Taht <dave.taht@gmail.com>
To: Cake List <cake@lists.bufferbloat.net>
Subject: [Cake] cake_heap* could use some comments
Date: Fri, 1 Dec 2017 20:36:36 -0800	[thread overview]
Message-ID: <CAA93jw5ABRWpUkPF7QyW9jFBR4EXS+6peRNHff71hu0Gxwi3ZQ@mail.gmail.com> (raw)

1) Cake_heap* functions could use a set of explanatory comments.

In cake_heapify especially:

1a) m, mb, l are really not self explanatory. "major". "major byte". "lost"?
r is right? l is left? a is CAKE_MAX_HEAP.

2) What's the operating principle of the overflow_timeout?

3) Why the divide by 2 here:

static unsigned int cake_drop(struct Qdisc *sch, struct sk_buff **to_free)
{
struct cake_sched_data *q = qdisc_priv(sch);
struct sk_buff *skb;
u32 idx = 0, tin = 0, len;
struct cake_tin_data *b;
struct cake_flow *flow;
struct cake_heap_entry qq;
u64 now = cobalt_get_time();

if (!q->overflow_timeout) {
int i;
/* Build fresh max-heap */
for (i = CAKE_MAX_TINS * CAKE_QUEUES / 2; i >= 0; i--)
cake_heapify(q, i);
//



-- 

Dave Täht
CEO, TekLibre, LLC
http://www.teklibre.com
Tel: 1-669-226-2619

             reply	other threads:[~2017-12-02  4:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-02  4:36 Dave Taht [this message]
2017-12-02  7:57 ` 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=CAA93jw5ABRWpUkPF7QyW9jFBR4EXS+6peRNHff71hu0Gxwi3ZQ@mail.gmail.com \
    --to=dave.taht@gmail.com \
    --cc=cake@lists.bufferbloat.net \
    /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