netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: ZOU YOUTAO <Youtao.Zou@alcatel-sbell.com.cn>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: can we use nfq_set_verdict to accept packets more than once with one packet_id?
Date: Tue, 30 Aug 2011 14:48:36 +0200	[thread overview]
Message-ID: <4E5CDC24.6050000@trash.net> (raw)
In-Reply-To: <D39C71B66797974C8687C6F5AC74A781069358FF@CNSHGSMBS01.ad4.ad.alcatel.com>

On 29.08.2011 16:03, ZOU YOUTAO wrote:
> 
> I need to develop an user space routing applcation.
> 
> My question is that I need to split an incoming udp packet to several
> small ones and forward them to different servers.
> Can I implement the requirement by  using libnetfilter_queue?

Not directly, each packet needs exactly one verdict and you can only
modify the contents once. You could split the packet, transmit all
but one using raw or packet sockets and issue a verdict for the
remaining one.

> another requirement is that the incoming packet is not forwarded
> immediately. A timer is set instead. The packet forwarding is performed
> in the timeout handler. So we cannot invoke nfq_set_verdict in the end
> of libnetfilter_queue callback function. We have to hold the packet_id
> for the timeout handler for forwarding.
> Does this introduce performance issue?

You just have to make sure your queue is sized approriately.

      reply	other threads:[~2011-08-30 12:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-29 14:03 can we use nfq_set_verdict to accept packets more than once with one packet_id? ZOU YOUTAO
2011-08-30 12:48 ` Patrick McHardy [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=4E5CDC24.6050000@trash.net \
    --to=kaber@trash.net \
    --cc=Youtao.Zou@alcatel-sbell.com.cn \
    --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).