summaryrefslogtreecommitdiff
path: root/ring_tx.c
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-05-31 12:11:09 +0200
committerDaniel Borkmann <dborkman@redhat.com>2013-05-31 12:11:09 +0200
commitcacb34f95fb7937e81b1fe8add7b5dca91e3a4c5 (patch)
tree607d72816c4d810050996f37f2acef583757cd8b /ring_tx.c
parent0f765f49ac231d99f493f00c0f0986fbeff2615d (diff)
ring: setup frame structure for v2/v3 in a generic way
Prepare TPACKET_V3 for allowing to transparently setting up the frame structure such that we do not need to change much in the netsniff-ng/trafgen code. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Diffstat (limited to 'ring_tx.c')
-rw-r--r--ring_tx.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ring_tx.c b/ring_tx.c
index 18216ac..549f89c 100644
--- a/ring_tx.c
+++ b/ring_tx.c
@@ -100,9 +100,10 @@ void mmap_tx_ring(int sock, struct ring *ring)
mmap_ring_generic(sock, ring);
}
-void alloc_tx_ring_frames(struct ring *ring)
+void alloc_tx_ring_frames(int sock __maybe_unused, struct ring *ring)
{
- alloc_ring_frames_generic(ring);
+ alloc_ring_frames_generic(ring, ring->layout.tp_frame_nr,
+ ring->layout.tp_frame_size);
}
void bind_tx_ring(int sock, struct ring *ring, int ifindex)