From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Andres Velasco Garcia <telecom.andresvelasco@hotmail.com>
Cc: netfilter@vger.kernel.org
Subject: Re: Meaning of NFQUEUE's --queue-balance option
Date: Mon, 16 Jan 2012 16:56:55 +0100 [thread overview]
Message-ID: <20120116155655.GB16285@1984> (raw)
In-Reply-To: <BLU162-W15434B55EC562304BCB753F6830@phx.gbl>
On Mon, Jan 16, 2012 at 12:01:43PM +0100, Andres Velasco Garcia wrote:
>
> I would like to understand how load is distributed across different queues using NFQUEUE's --queue-balance option.
>
> The only information I could find on the subject is in the iptables man page, where I read: "Packets belonging to the same connection are put into the same nfqueue"
It's a hash-based approach. You hash on the packet descriptors
(source/destination/...), thus, the load is distributed between
several user-space processes.
See recent version of linux/net/netfilter/xt_NFQUEUE.c for more information.
> I have two questions:
> 1- Would this be true also if NFQUEUE target is triggered within the "mangle" and not the "nat" table?
On the nat table, you will only see the first packet of the flow.
> 2- I would find useful for my application if all packets from/to the same IP address (not only "connection") would flow though the same queue always. Is this somehow ensured by queue-balance?
Yes.
prev parent reply other threads:[~2012-01-16 15:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-16 11:01 Meaning of NFQUEUE's --queue-balance option Andres Velasco Garcia
2012-01-16 15:56 ` Pablo Neira Ayuso [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=20120116155655.GB16285@1984 \
--to=pablo@netfilter.org \
--cc=netfilter@vger.kernel.org \
--cc=telecom.andresvelasco@hotmail.com \
/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).