All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: "Paul C. Diem" <PCDiem@FoxValley.net>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: Chain Sorting
Date: Sun, 16 Jul 2006 15:43:32 +0200	[thread overview]
Message-ID: <44BA4284.9010604@netfilter.org> (raw)
In-Reply-To: <FFEPKIHJDEDDAAFOFDGFKELOCBAA.PCDiem@FoxValley.net>

Paul C. Diem wrote:
> In my quest to speed up the TC_INIT, I found that the libiptc.c searches the
> chain list for the alphabetically correct place to insert chains as it
> converts from the blob to the chain list. However, when adding a new chain
> in TC_CREATE_CHAIN, it simply adds the new chain to the end of the list.
> 
> This leaves the chains unsorted when written back to the kernel and uses
> lots of cycles when loading. I patched libiptc.c to simply add chains to the
> end of the list when loading and use iptc_insert_chain in TC_CREATE_CHAIN to
> insert newly created chains into the proper order. My
> TC_INIT time with 4106 chains went from about 1.09 real seconds to about
> 0.05 real seconds.

This seems interesting, please, could send post the patch?

-- 
The dawn of the fourth age of Linux firewalling is coming; a time of 
great struggle and heroic deeds -- J.Kadlecsik got inspired by J.Morris

  reply	other threads:[~2006-07-16 13:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-15 20:19 Chain Sorting Paul C. Diem
2006-07-16 13:43 ` Pablo Neira Ayuso [this message]
2006-07-17  2:29   ` Paul C. Diem
2006-07-20 16:40     ` Patrick McHardy

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=44BA4284.9010604@netfilter.org \
    --to=pablo@netfilter.org \
    --cc=PCDiem@FoxValley.net \
    --cc=netfilter-devel@lists.netfilter.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.