* [PATCH 2.6.22.3 2/5] nfnetlink_log: Flush queue early
@ 2007-09-21 16:48 Michał Mirosław
2007-09-24 12:30 ` Patrick McHardy
0 siblings, 1 reply; 2+ messages in thread
From: Michał Mirosław @ 2007-09-21 16:48 UTC (permalink / raw)
To: netfilter-devel
If queue is filled to its threshold, then flush it right away instead
of waiting for timer or next packet.
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
--- lq1/net/netfilter/nfnetlink_log.c 2007-09-21 13:27:28.000000000 +0200
+++ rechot/net/netfilter/nfnetlink_log.c 2007-09-20 15:14:04.000000000 +0200
@@ -644,8 +627,7 @@
goto unlock_and_release;
}
- if (inst->qlen >= qthreshold ||
- (inst->skb && size > skb_tailroom(inst->skb))) {
+ if (inst->skb && size > skb_tailroom(inst->skb)) {
/* either the queue len is too high or we don't have
* enough room in the skb left. flush to userspace. */
UDEBUG("flushing old skb\n");
@@ -665,9 +647,11 @@
__build_packet_message(inst, skb, data_len, pf,
hooknum, in, out, li, prefix, plen);
+ if (inst->qlen >= qthreshold)
+ __nfulnl_flush(inst);
/* timer_pending always called within inst->lock, so there
* is no chance of a race here */
- if (!timer_pending(&inst->timer)) {
+ else if (!timer_pending(&inst->timer)) {
instance_get(inst);
inst->timer.expires = jiffies + (inst->flushtimeout*HZ/100);
add_timer(&inst->timer);
-
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-09-24 12:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-21 16:48 [PATCH 2.6.22.3 2/5] nfnetlink_log: Flush queue early Michał Mirosław
2007-09-24 12:30 ` Patrick McHardy
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).