netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH v3 nf] netfilter: x_tables: speed up jump target validation
Date: Thu, 14 Jul 2016 20:07:52 +0200	[thread overview]
Message-ID: <20160714180752.GA1471@salvia> (raw)
In-Reply-To: <1468511486-17283-1-git-send-email-fw@strlen.de>

On Thu, Jul 14, 2016 at 05:51:26PM +0200, Florian Westphal wrote:
> The dummy ruleset I used to test the original validation change was broken,
> most rules were unreachable and were not tested by mark_source_chains().
>
> In some cases rulesets that used to load in a few seconds now require
> several minutes.

Thanks for fixing this so fast. I was a bit surprised this O(n!)
validation was only taking 11% more time when you first posted this
patchset.

> sample ruleset that shows the behaviour:
> 
> echo "*filter"
> for i in $(seq 0 100000);do
>         printf ":chain_%06x - [0:0]\n" $i
> done
> for i in $(seq 0 100000);do
>    printf -- "-A INPUT -j chain_%06x\n" $i
>    printf -- "-A INPUT -j chain_%06x\n" $i
>    printf -- "-A INPUT -j chain_%06x\n" $i
> done
> echo COMMIT

Not exactly related to this patch.

As I said in the workshop, I would really to love to see more tests in
our trees.

Is there any chance you can get reuse that tests/shell/ directory that
Arturo made for nftables and place this in one of those scripts? You
can inagurate it with this scripts, and others that you used to fix
the lack of sanity checks (those actually would require some little C
code though).

With something like this in place, we can all validate better that
tests are not broken and catch regressions.

Thanks!

  reply	other threads:[~2016-07-14 18:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-14 15:51 [PATCH v3 nf] netfilter: x_tables: speed up jump target validation Florian Westphal
2016-07-14 18:07 ` Pablo Neira Ayuso [this message]
2016-07-14 21:28   ` Florian Westphal
2016-07-19 18:11 ` Pablo Neira Ayuso

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=20160714180752.GA1471@salvia \
    --to=pablo@netfilter.org \
    --cc=fw@strlen.de \
    --cc=netfilter-devel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).