From b5f3cae9359583bdb8c2580d19f656aa0a35db68 Mon Sep 17 00:00:00 2001 From: Daniel Borkmann Date: Thu, 30 May 2013 17:13:50 +0200 Subject: [PATCH] ring: minor: remove define since only used once We only use it once and nowhere else, so just replace the correct value right away. Signed-off-by: Daniel Borkmann --- ring.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ring.h b/ring.h index 0ef42d1a..97378620 100644 --- a/ring.h +++ b/ring.h @@ -44,8 +44,6 @@ static inline void next_rnd_slot(unsigned int *it, struct ring *ring) *it = rand() % ring->layout.tp_frame_nr; } -#define RING_SIZE_FALLBACK (1 << 26) - static inline unsigned int ring_size(char *ifname, unsigned int size) { if (size > 0) @@ -65,7 +63,7 @@ static inline unsigned int ring_size(char *ifname, unsigned int size) size = (size * 1000000) / 8; size = size * 2; if (size == 0) - size = RING_SIZE_FALLBACK; + size = 1 << 26; return round_up_cacheline(size); } -- 2.11.4.GIT