summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-05-30 17:13:50 +0200
committerDaniel Borkmann <dborkman@redhat.com>2013-05-30 17:20:52 +0200
commitb5f3cae9359583bdb8c2580d19f656aa0a35db68 (patch)
tree3782682f845318b78110d37e23cd685eb4c9d6ee
parent1b32f3d1d33bf02d5e10ef3178075421c592b5f6 (diff)
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 <dborkman@redhat.com>
-rw-r--r--ring.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/ring.h b/ring.h
index 0ef42d1..9737862 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);
}