Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Victor Julien <lists@inliniac.net>
To: netfilter@vger.kernel.org
Subject: Re: nfqueue stuck on queue length >299
Date: Thu, 13 Oct 2011 11:35:24 +0200	[thread overview]
Message-ID: <4E96B0DC.7050605@inliniac.net> (raw)
In-Reply-To: <20111013122938.1535fcc9@wwwwww-701SD>

On 10/13/2011 02:29 PM, abirvalg@lavabit.com wrote:
> In my app one thread sends packets to NFQUEUE and another thread processes that NFQUEUE at the rate of 10 packets per second.
> I watch the state of NFQUEUEs using watch -n 1 'cat /proc/netnetfilter/nfnetlink_queue'
> I noticed that if I nfq_set_queue_maxlen to 299, then when the queue fills up to 299 (3rd column), the overflow gets dropped. As soon as new packets cease to arrive, dequeuing begins at the rate of 10 per second until the 3rd columnn reaches 0. All as expected.
> 
> But as soon as I set NFQUEUE maxlen to 300, the following happens - the overflow gets dropped; but when I stop generating new packets, no dequeuing is taking place, the 3rd column seems to be stuck on 299 and from then on packets for that NFQUEUE don't get queued anymore but are dropped instead. The NFQUEUE still processes packets at the rate of 10 per second, but instead of queuing the overflow, it simply drops it.
> 
> Is this a bug or a feature? Sure seems like a bug to me.

Are you using some form of lock (like a mutex) to protect your nfq
calls? In my experience you need those.

-- 
---------------------------------------------
Victor Julien
http://www.inliniac.net/
PGP: http://www.inliniac.net/victorjulien.asc
---------------------------------------------


  reply	other threads:[~2011-10-13  9:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-13 12:29 nfqueue stuck on queue length >299 abirvalg
2011-10-13  9:35 ` Victor Julien [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-10-13 13:27 abirvalg
2011-10-13 10:50 ` Victor Julien
2011-10-13 13:37 abirvalg
2011-10-13 14:05 aletum

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=4E96B0DC.7050605@inliniac.net \
    --to=lists@inliniac.net \
    --cc=netfilter@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