Linux Netfilter development
 help / color / mirror / Atom feed
From: "Changli Gao" <xiaosuo@gmail.com>
To: "Patrick McHardy" <kaber@trash.net>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: Fwd: [PATCH] nf_nat_core: eliminate find_appropriate_src call if range is set IP_NAT_RANGE_PROTO_RANDOM bit on
Date: Mon, 30 Jun 2008 21:34:02 +0800	[thread overview]
Message-ID: <412e6f7f0806300634g1d82ffcewd3ba7ef0b951cd1a@mail.gmail.com> (raw)
In-Reply-To: <4868D76D.6050008@trash.net>

On Mon, Jun 30, 2008 at 8:54 PM, Patrick McHardy <kaber@trash.net> wrote:
> Changli Gao wrote:
>>
>> ---------- Forwarded message ----------
>> From: Changli Gao <xiaosuo@gmail.com>
>> Date: 2008/6/30
>> Subject: [PATCH] nf_nat_core: eliminate find_appropriate_src call if
>> range is set IP_NAT_RANGE_PROTO_RANDOM bit on
>> To: netfilter-devel@lists.netfilter.org
>> Cc: Changli Gao <xiaosuo@gmail.com>
>>
>>
>> Eliminate find_appropriate_src call if range is set
>> IP_NAT_RANGE_PROTO_RANDOM bit on.
>
> Please explain why the call isn't necessary.
>
In fact, my patch doesn't change the logic of the code, it just
eliminates the uesless call find_appropriate_src. Because the tuple
returned by find_appropriate is only useful when the
IP_NAT_RANGE_PROTO_RANDOM isn't set on.  instead of testing the bit
IP_NAT_RANGE_PROTO_RANDOM after calling find_appropriate_src, I do
that before it to eliminate the cost of calling find_appropriate_src.


-- 
Regards,
Changli Gao(xiaosuo@gmail.com)

  reply	other threads:[~2008-06-30 13:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <412e6f7f0806292132l18c747d6h982c64ce7c9d9c85@mail.gmail.com>
2008-06-30  8:00 ` Fwd: [PATCH] nf_nat_core: eliminate find_appropriate_src call if range is set IP_NAT_RANGE_PROTO_RANDOM bit on Changli Gao
2008-06-30 12:54   ` Patrick McHardy
2008-06-30 13:34     ` Changli Gao [this message]
2008-07-07 11:24       ` Patrick McHardy
2008-07-08  2:50         ` Changli Gao
2008-07-09 16:54           ` 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=412e6f7f0806300634g1d82ffcewd3ba7ef0b951cd1a@mail.gmail.com \
    --to=xiaosuo@gmail.com \
    --cc=kaber@trash.net \
    --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