netfilter.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* libnetfilter_queue issues
@ 2013-01-12 12:43 dorian
  2013-01-12 13:23 ` Felix
  0 siblings, 1 reply; 12+ messages in thread
From: dorian @ 2013-01-12 12:43 UTC (permalink / raw)
  To: netfilter

Hi all,
Sorry if the queries has been answered yet but I can't find the reliable
informations about issues concerned with libnetfilter_queue.

I need to run a program which would firstly fork let's say 10 times (or
creates 10 threads) and next each child-process (or thread) will include

   while ((rv = recv(fd, buf, sizeof(buf), 0)) && rv >= 0) {
      nfq_handle_packet(h, buf, rv);
   }

sequence.

The fork/multiple threads reason usage is that for some packets the
processing time will be relatively long.
So I would like to handle next packets in "the meantime" using another
process (or thread)

But I have 2 doubts which I would like to clarify.

1. - - - - - -
Is it possible to handle concurrently several packets with several
processes ?
i.e. if the process1 is handling a packet will the process2 receive the
next existing packet?

The essence of my doubt is:
if process1 receives the packet1 but the verdict is not issued  will
next recv() (in process2) be successful and not hold process2 until
verdict for packet1 is made?

Please confirm.


2. - - - - - -
Let's assume that we have process1 which handles packet 1, process 2
which handles packet 2, etc
Let's say verdict for packet2 is issued before verdict for packet1

Will packet2 leave the queue or has it to "wait" for verdict for packet1 ?

The essence of my doubt is:
can packet2 leave the queue before packet1 ?

In other words can we change the packets order leaving system ?

Or, maybe, although verdict for packet2 is done it has to wait for
verdict for packet1 and next both leave the queue in original order?

I would be obliged if you clarify above two matter

Best Regards,
Dorian


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2013-01-14 14:24 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-12 12:43 libnetfilter_queue issues dorian
2013-01-12 13:23 ` Felix
2013-01-12 19:04   ` Eric Leblond
2013-01-12 19:00     ` Felix
2013-01-12 21:16     ` dorian
2013-01-12 22:12       ` Eric Leblond
2013-01-12 22:34         ` dorian
2013-01-13 11:29     ` Pablo Neira Ayuso
2013-01-13 22:46       ` Eric Leblond
2013-01-13 22:49         ` [libnetfilter_queue PATCH 1/2] doxygen: improve fail-open documentation Eric Leblond
2013-01-13 22:49           ` [libnetfilter_queue PATCH 2/2] doxygen: improve documentation Eric Leblond
2013-01-14 14:24         ` libnetfilter_queue issues dorian

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).