netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Leblond <eric@inl.fr>
To: netfilter-devel@vger.kernel.org
Subject: Re: Bug in Netfiler_queue when using small packets in 100Mb traffic
Date: Sat, 03 Jan 2009 16:32:39 +0100	[thread overview]
Message-ID: <1230996759.28326.101.camel@ice-age> (raw)
In-Reply-To: <d579762c0901030638k3ddcac6dy8ee175244eaddbe9@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 987 bytes --]

Hi,

Le samedi 03 janvier 2009 à 15:38 +0100, VPF a écrit :
> Hi, I encountered a problem with the example nfqnl_test.c when I sent
> 100Mb/s of <200ko packets. The program stopped running quickly and
> printed "unbinding from queue 0". It appears that the call recv(fd,
> buf, sizeof(buf), 0) returns an error after a few packets. (errno 105
> : No buffer space available).
> 
> Do you see any solution to this problem?

This problem is well known. This is linked with the size of the
nfnetlink buffer. The buffer is too small to contains the data when
trafic is high. A typical workaround is to increase this size. 

It can be done by using the nfnl_rcvbufsiz(). The code should looks
like:
 nfnl_rcvbufsiz(nfq_nfnlh(h), SIZE);

This workaround may not be sufficient and in this case a unbinding,
rebinding of the queue is needed.

BR,
-- 
Eric Leblond <eleblond@inl.fr>
INL: http://www.inl.fr/
NuFW: http://www.nufw.org/
EdenWall: http://www.edenwall.com/

[-- Attachment #2: Ceci est une partie de message numériquement signée --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

      parent reply	other threads:[~2009-01-03 15:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-03 14:38 Bug in Netfiler_queue when using small packets in 100Mb traffic VPF
2009-01-03 15:31 ` Eric Leblond
2009-01-03 15:32 ` Eric Leblond [this message]

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=1230996759.28326.101.camel@ice-age \
    --to=eric@inl.fr \
    --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;
as well as URLs for NNTP newsgroup(s).