summaryrefslogtreecommitdiff
path: root/ring_rx.c
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-05-31 15:07:15 +0200
committerDaniel Borkmann <dborkman@redhat.com>2013-05-31 15:07:15 +0200
commitd8cdc6ab87550de9c93b1f6763ea6015f292d7fb (patch)
treee45481799a4436a4c5cb091151e2475e4da7df5c /ring_rx.c
parentcacb34f95fb7937e81b1fe8add7b5dca91e3a4c5 (diff)
ring: netsniff-ng: migrate capture only to TPACKET_V3
Lets migrate capturing to TPACKET_V3, since it will bring a better performance due to fewer page cache misses caused by a higher density of packets, since now they are contigous placed in the ring buffer. It is said that TPACKET_V3 brings the following benefits: *) ~15 - 20% reduction in CPU-usage *) ~20% increase in packet capture rate *) ~2x increase in packet density *) Port aggregation analysis *) Non static frame size to capture entire packet payload Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Diffstat (limited to 'ring_rx.c')
-rw-r--r--ring_rx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ring_rx.c b/ring_rx.c
index 0d1f828..ae8ce0a 100644
--- a/ring_rx.c
+++ b/ring_rx.c
@@ -59,7 +59,7 @@ void setup_rx_ring_layout(int sock, struct ring *ring, unsigned int size,
sizeof(struct tpacket_req) !=
offsetof(struct tpacket_req3, tp_retire_blk_tov));
- ring->layout3.tp_retire_blk_tov = 0;
+ ring->layout3.tp_retire_blk_tov = 100; /* 0: let kernel decide */
ring->layout3.tp_sizeof_priv = 0;
ring->layout3.tp_feature_req_word = 0;