From 9be74e71213ab2a8d449d1cc6cfa4d533fce0d0f Mon Sep 17 00:00:00 2001 From: Daniel Borkmann Date: Thu, 30 May 2013 18:11:08 +0200 Subject: ring: prepare setup_rx_ring_layout for support in v2/v3 Prepare setup_rx_ring_layout for both, v2 and v3. Also do some checks during compile time if offsets stay the same as we operate on different union mappings. Signed-off-by: Daniel Borkmann --- ring_tx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'ring_tx.c') diff --git a/ring_tx.c b/ring_tx.c index f91f7f7..b7cde7e 100644 --- a/ring_tx.c +++ b/ring_tx.c @@ -61,9 +61,7 @@ void setup_tx_ring_layout(int sock, struct ring *ring, unsigned int size, ring->layout.tp_frame_size * ring->layout.tp_block_nr; - bug_on(ring->layout.tp_block_size < ring->layout.tp_frame_size); - bug_on((ring->layout.tp_block_size % ring->layout.tp_frame_size) != 0); - bug_on((ring->layout.tp_block_size % getpagesize()) != 0); + ring_verify_layout(ring); } void create_tx_ring(int sock, struct ring *ring, int verbose) -- cgit v1.2.3-54-g00ecf