All of lore.kernel.org
 help / color / mirror / Atom feed
* Performance effect on using multiple (500) MARK target rules
@ 2005-12-13 17:39 Nicholas Basker
  0 siblings, 0 replies; only message in thread
From: Nicholas Basker @ 2005-12-13 17:39 UTC (permalink / raw)
  To: netfilter

Hello:

I am planning to use the following MARK rule.

iptables -t mangle -A POSTROUTING -d <ipaddr>/<netmask> -j MARK --set-mark
<mark-id>

In my application, there may be around 500 mark rules like above. They can
change dynamically which means that some mark rule may be removed and new
ones can be added. So at a given time there may be around 500 such rules in
the system.

I have the following questions on the MARK rule. It would be helpful if you
could point me to the code to understand better.

01. With around 500 rules, there shall be 500 ipaddr/netmask that need to be
matched for every packet. Will this be significant performance degradation?.

02. How does the matching for destination ipaddr/netmask happen? Is there an
efficient hash scheme used. It would be helpful if you can point me to the
code where this happens.

03. Is the skbuff->nfmark field used to store the mark value. This is
available with the skbuff even at the L2 driver layer. For example
ethernet-driver or anyother layer2 driver. Is my assumption correct.

I very much appreciate your response. Thanks for your time,
Nicholas.




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-12-13 17:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-13 17:39 Performance effect on using multiple (500) MARK target rules Nicholas Basker

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.