All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jamal Hadi Salim <jhs@mojatatu.com>
To: Florian Westphal <fw@strlen.de>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH -next] net: sched: use counter to break reclassify loops
Date: Wed, 13 May 2015 07:18:57 -0400	[thread overview]
Message-ID: <55533321.302@mojatatu.com> (raw)
In-Reply-To: <20150512130029.GA22387@breakpoint.cc>

On 05/12/15 09:00, Florian Westphal wrote:
> Jamal Hadi Salim <jhs@mojatatu.com> wrote:
>> Florian,
>> In general i am in support of removing this - since the use case never
>> materialized as being useful. However, this is not the same logic that
>> was there before. To get equivalency you need to pass the limit into
>> tc_classify_compat() so i can be reset.
>
> AFAICS this re-set only happens when we return something other
> than RECLASSIFY which means the caller will not check the limit.
>
> So in fact it should be ok to remove this since the counter will always
> start from 0 on next tc_classify() invocation.
>

Florian, consider the following scenario:
Assume X is the max allowed reclassified before bells start ringing.
If we see upto X back-to-back reclassify - we are very much likely in
a loop. We should see fire trucks arrive and bail out.
If we see X-1  "reclassify" followed by a "pipe" followed by
X-1 "reclassify" followed by "ok" then that looks like a healthy
policy. But that is a a total of 2X-2 reclassifies. You will
bail out at X reclassifies; what i am saying is you shouldnt.
And existing logic doesnt. Does that make sense?
Pass the &limit and reset it as before to 0 when you see something
other than reclassify.

cheers,
jamal

  reply	other threads:[~2015-05-13 11:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-11 17:50 [PATCH -next] net: sched: use counter to break reclassify loops Florian Westphal
2015-05-11 20:30 ` Alexei Starovoitov
2015-05-12 11:38 ` Jamal Hadi Salim
2015-05-12 13:00   ` Florian Westphal
2015-05-13 11:18     ` Jamal Hadi Salim [this message]
2015-05-13 11:29       ` Florian Westphal
2015-05-13 12:04         ` Jamal Hadi Salim
2015-05-13 12:44           ` Florian Westphal
2015-05-13 19:08 ` David Miller

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

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

  git send-email \
    --in-reply-to=55533321.302@mojatatu.com \
    --to=jhs@mojatatu.com \
    --cc=fw@strlen.de \
    --cc=netdev@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.