The attachment is the patch. On Mon, Jul 7, 2008 at 7:24 PM, Patrick McHardy <kaber@xxxxxxxxx> wrote: > Changli Gao wrote: >> >> On Mon, Jun 30, 2008 at 8:54 PM, Patrick McHardy <kaber@xxxxxxxxx> wrote: >>> >>> Changli Gao wrote: >>>> >>>> ---------- Forwarded message ---------- >>>> From: Changli Gao <xiaosuo@xxxxxxxxx> >>>> 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@xxxxxxxxxxxxxxxxxxx >>>> Cc: Changli Gao <xiaosuo@xxxxxxxxx> >>>> >>>> >>>> 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. > > OK, but it does not apply cleanly because of whitespace mangling. > Please resend as attachment. > -- Regards, Changli Gao(xiaosuo@xxxxxxxxx)
Attachment:
nf_nat_core_opt.diff
Description: Binary data