* [PATCH 2.6.20 01/10] nfnetlink_log: don't count max(a,b) twice
@ 2007-02-12 0:37 Michał Mirosław
2007-02-13 12:46 ` Patrick McHardy
0 siblings, 1 reply; 2+ messages in thread
From: Michał Mirosław @ 2007-02-12 0:37 UTC (permalink / raw)
To: netfilter-devel; +Cc: linux-kernel
We don't need local nlbufsiz (skb size) as nfulnl_alloc_skb() takes
the maximum anyway.
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
--- linux-2.6.20/net/netfilter/nfnetlink_log.c.orig 2007-02-10 18:25:14.000000000 +0100
+++ linux-2.6.20/net/netfilter/nfnetlink_log.c 2007-02-11 20:20:27.000000000 +0100
@@ -596,7 +596,6 @@ nfulnl_log_packet(unsigned int pf,
struct nfulnl_instance *inst;
const struct nf_loginfo *li;
unsigned int qthreshold;
- unsigned int nlbufsiz;
unsigned int plen;
if (li_user && li_user->type == NF_LOG_TYPE_ULOG)
@@ -672,13 +671,8 @@ nfulnl_log_packet(unsigned int pf,
return;
}
- if (size > inst->nlbufsiz)
- nlbufsiz = size;
- else
- nlbufsiz = inst->nlbufsiz;
-
if (!inst->skb) {
- if (!(inst->skb = nfulnl_alloc_skb(nlbufsiz, size))) {
+ if (!(inst->skb = nfulnl_alloc_skb(inst->nlbufsiz, size))) {
UDEBUG("error in nfulnl_alloc_skb(%u, %u)\n",
inst->nlbufsiz, size);
goto alloc_failure;
@@ -691,7 +685,7 @@ nfulnl_log_packet(unsigned int pf,
__nfulnl_send(inst);
- if (!(inst->skb = nfulnl_alloc_skb(nlbufsiz, size))) {
+ if (!(inst->skb = nfulnl_alloc_skb(inst->nlbufsiz, size))) {
UDEBUG("error in nfulnl_alloc_skb(%u, %u)\n",
inst->nlbufsiz, size);
goto alloc_failure;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 2.6.20 01/10] nfnetlink_log: don't count max(a,b) twice
2007-02-12 0:37 [PATCH 2.6.20 01/10] nfnetlink_log: don't count max(a,b) twice Michał Mirosław
@ 2007-02-13 12:46 ` Patrick McHardy
0 siblings, 0 replies; 2+ messages in thread
From: Patrick McHardy @ 2007-02-13 12:46 UTC (permalink / raw)
To: Michał Mirosław; +Cc: netfilter-devel, linux-kernel
Micha³ Miros³aw wrote:
> We don't need local nlbufsiz (skb size) as nfulnl_alloc_skb() takes
> the maximum anyway.
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-02-13 12:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-12 0:37 [PATCH 2.6.20 01/10] nfnetlink_log: don't count max(a,b) twice Michał Mirosław
2007-02-13 12:46 ` Patrick McHardy
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.