summaryrefslogtreecommitdiff
path: root/ring_tx.h
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2014-05-09 15:46:38 +0200
committerTobias Klauser <tklauser@distanz.ch>2014-05-09 15:46:38 +0200
commit9a40de458b3884d9f526172110392501f075bd87 (patch)
treeff621d506b408a74a0ccea32e5f3f97b5ad0a210 /ring_tx.h
parent61a233a283171832a1ac5d580cf9487f9b7aec0a (diff)
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 <tklauser@distanz.ch>
Diffstat (limited to 'ring_tx.h')
-rw-r--r--ring_tx.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/ring_tx.h b/ring_tx.h
index ba8407a..eaff414 100644
--- a/ring_tx.h
+++ b/ring_tx.h
@@ -14,14 +14,9 @@
/* Give userland 10 us time to push packets to the ring */
#define TX_KERNEL_PULL_INT 10
+void ring_tx_setup(struct ring *ring, int sock, size_t size, int ifindex,
+ bool jumbo_support, bool verbose);
extern void destroy_tx_ring(int sock, struct ring *ring);
-extern void create_tx_ring(int sock, struct ring *ring, bool verbose);
-extern void mmap_tx_ring(int sock, struct ring *ring);
-extern void alloc_tx_ring_frames(int sock, struct ring *ring);
-extern void bind_tx_ring(int sock, struct ring *ring, int ifindex);
-extern void setup_tx_ring_layout(int sock, struct ring *ring, size_t size,
- bool jumbo_support);
-extern void set_packet_loss_discard(int sock);
static inline int user_may_pull_from_tx(struct tpacket2_hdr *hdr)
{