summaryrefslogtreecommitdiff
path: root/ring.h
diff options
context:
space:
mode:
Diffstat (limited to 'ring.h')
-rw-r--r--ring.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/ring.h b/ring.h
index 6517a80..4153b9c 100644
--- a/ring.h
+++ b/ring.h
@@ -145,6 +145,14 @@ static inline void ring_verify_layout(struct ring *ring)
bug_on((ring->layout.tp_block_size % RUNTIME_PAGE_SIZE) != 0);
}
+static inline void shrink_ring_layout_generic(struct ring *ring)
+{
+ ring->layout.tp_block_nr >>= 1;
+ ring->layout.tp_frame_nr = ring->layout.tp_block_size /
+ ring->layout.tp_frame_size *
+ ring->layout.tp_block_nr;
+}
+
static inline void tpacket_hdr_clone(struct tpacket2_hdr *thdrd,
struct tpacket2_hdr *thdrs)
{