From 9a40de458b3884d9f526172110392501f075bd87 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Fri, 9 May 2014 15:46:38 +0200 Subject: ring: Merge common ring_{rx,tx} initialization into own function Instead of having to perform the individual steps to initialize a ring and open coding them in multiple places, provide convenience functions to do all at once. This has the nice side effect of allowing to make most of these *_{rx,tx}_ring() functions static in their respective module. Signed-off-by: Tobias Klauser --- ring_rx.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'ring_rx.h') diff --git a/ring_rx.h b/ring_rx.h index 24bd806..02c65bc 100644 --- a/ring_rx.h +++ b/ring_rx.h @@ -11,13 +11,10 @@ #include "ring.h" +extern void ring_rx_setup(struct ring *ring, int sock, size_t size, int ifindex, + struct pollfd *poll, bool v3, bool jumbo_support, + bool verbose); extern void destroy_rx_ring(int sock, struct ring *ring); -extern void create_rx_ring(int sock, struct ring *ring, bool verbose); -extern void mmap_rx_ring(int sock, struct ring *ring); -extern void alloc_rx_ring_frames(int sock, struct ring *ring); -extern void bind_rx_ring(int sock, struct ring *ring, int ifindex); -extern void setup_rx_ring_layout(int sock, struct ring *ring, size_t size, - bool jumbo_support, bool v3); extern void sock_rx_net_stats(int sock, unsigned long seen); static inline int user_may_pull_from_rx(struct tpacket2_hdr *hdr) -- cgit v1.2.3-54-g00ecf