]> granicus.if.org Git - libnl/commit
src/nf-queue.c: cleanup and improve performance of test program for NF_QUEUE
authorKarl Hiramoto <karl@hiramoto.org>
Thu, 18 Mar 2010 16:50:20 +0000 (17:50 +0100)
committerThomas Graf <tgraf@suug.ch>
Mon, 19 Apr 2010 10:58:39 +0000 (12:58 +0200)
commitd378220c96c3c8b6f27dca33e7d8ba03318f9c2d
treeac737ab0e50a06f4518a26024eebe99d0e652b97
parentd966a3ecf780aa27f3f63fc41ecf8e4549d408e7
src/nf-queue.c: cleanup and improve performance of test program for NF_QUEUE

* Fix filename in file header

* If the kernel or netlink socket becomes over loaded,
  the kernel starts printing error messages like:

nf_queue: full at 1024 entries, dropping packets(s). Dropped: 1
nf_queue: full at 1024 entries, dropping packets(s). Dropped: 2
nf_queue: full at 1024 entries, dropping packets(s). Dropped: 3

So detect out of order packet ID's and set the NF_ACCEPT verdictÂ,
so they will be removed from the kernel queue.

* increase socket buffer to improve performance

without these changes sending more than 100 KB/s over tcp HTTP lo(localhost)
was difficult on my core2 duo machine, due to so many dropped packets.
After these changes over 150 MB/s was easy.

* improve help text

Signed-off-by: Karl Hiramoto <karl@hiramoto.org>
src/nf-queue.c