All of lore.kernel.org
 help / color / mirror / Atom feed
* Chain Sorting
@ 2006-07-15 20:19 Paul C. Diem
  2006-07-16 13:43 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 4+ messages in thread
From: Paul C. Diem @ 2006-07-15 20:19 UTC (permalink / raw)
  To: netfilter-devel

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.

Paul C. Diem
PCDiem@FoxValley.net

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-07-20 16:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-15 20:19 Chain Sorting Paul C. Diem
2006-07-16 13:43 ` Pablo Neira Ayuso
2006-07-17  2:29   ` Paul C. Diem
2006-07-20 16:40     ` Patrick McHardy

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.