netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "john ye" <johny@asimco.com.cn>
To: <jengelh@computergmbh.de>, <netfilter-devel@vger.kernel.org>,
	<iceburgue@gmail.com>, "John Ye" <johny@asimco.com.cn>
Subject: Re: remarkably Increase iptables' speed on SMP system.
Date: Sat, 29 Sep 2007 21:23:06 +0800	[thread overview]
Message-ID: <008701c8029b$df6984c0$d6ddfea9@JOHNYE1> (raw)
In-Reply-To: 001201c80298$3509ac10$0201a8c0@ibmea4709fd199

Dear Everyone,

OK, I will send you the patch soon. I have though that a loadable module should be much better
than kernel patch, because you don't need to compile and rebuild the kernel.

The packet re-ordering can be avoided by hash CPU based on a simple and quick formula

cpu = iph->saddr + iph->daddr + skb->h.th->source + skb->h.th->dest. (for TCP).

so you can see, one TCP connection is always dispatched to one cpu.
This is a CONNTRACK similar issue, but we don't need that complicated as connection tracking,
a simple hash should be enough.

As I said in previous email, we have not considered reordering issue for other protocols
, such as UDP(snat), GRE, etc.

The key is to to hash a cpu(0 to nr_cpus) based on packet. it should be simple and quick hash.


John Ye

----- Original Message ----- 
From: "Jan Engelhardt" <jengelh@computergmbh.de>
To: "John Ye" <johny@asimco.com.cn>
Cc: <netfilter-devel@vger.kernel.org>; "YE QY" <iceburgue@gmail.com>
Sent: Friday, September 28, 2007 9:52 PM
Subject: Re: remarkably Increase iptables' speed on SMP system.



On Sep 28 2007 10:15, John Ye wrote:
>
>It can be viewed and downloaded from blog http://blog.chinaunix.net/u/12848/showart.php?id=389602
>You are welcome to review and test without patching and re-compiling the kerenl.

Well, send a patch. I have no idea what to make out of that single file,
which obviously even has some code that does not look nice.







       reply	other threads:[~2007-09-29 13:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <001201c80298$3509ac10$0201a8c0@ibmea4709fd199>
2007-09-29 13:23 ` john ye [this message]
2007-09-28  2:15 remarkably Increase iptables' speed on SMP system John Ye
2007-09-28 12:18 ` Amin Azez
2007-09-28 13:29   ` Henrik Nordstrom
2007-09-28 16:01   ` Rennie deGraaf
2007-09-29  9:52   ` John Ye
2007-10-01  7:21   ` john ye
2007-10-01 12:10     ` john ye
2007-10-08 12:04   ` john ye
2007-10-08 16:40     ` Patrick McHardy
2007-10-10  1:48       ` John Ye
2007-09-28 13:52 ` Jan Engelhardt

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='008701c8029b$df6984c0$d6ddfea9@JOHNYE1' \
    --to=johny@asimco.com.cn \
    --cc=iceburgue@gmail.com \
    --cc=jengelh@computergmbh.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).