All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Nicholas Basker" <nbasker@india.tejasnetworks.com>
To: netfilter@lists.netfilter.org
Subject: Performance effect on using multiple (500) MARK target rules
Date: Tue, 13 Dec 2005 23:09:07 +0530	[thread overview]
Message-ID: <GHEPLFGLHNDOFLBPNPOBAEBDECAA.nbasker@india.tejasnetworks.com> (raw)

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.




                 reply	other threads:[~2005-12-13 17:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=GHEPLFGLHNDOFLBPNPOBAEBDECAA.nbasker@india.tejasnetworks.com \
    --to=nbasker@india.tejasnetworks.com \
    --cc=netfilter@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.