netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* can we use nfq_set_verdict to accept packets more than once with one packet_id?
@ 2011-08-29 14:03 ZOU YOUTAO
  2011-08-30 12:48 ` Patrick McHardy
  0 siblings, 1 reply; 2+ messages in thread
From: ZOU YOUTAO @ 2011-08-29 14:03 UTC (permalink / raw)
  To: netfilter-devel


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?

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?

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

* Re: can we use nfq_set_verdict to accept packets more than once with one packet_id?
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Patrick McHardy @ 2011-08-30 12:48 UTC (permalink / raw)
  To: ZOU YOUTAO; +Cc: netfilter-devel

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.

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

end of thread, other threads:[~2011-08-30 12:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).