Skip to content

Instantly share code, notes, and snippets.

@valarauca
Created May 13, 2017 21:59
Show Gist options
  • Save valarauca/7f81002aacacf6476972806e3051fb6f to your computer and use it in GitHub Desktop.
Save valarauca/7f81002aacacf6476972806e3051fb6f to your computer and use it in GitHub Desktop.
tp_block_size= 4096
tp_frame_size= 2048
tp_block_nr = 4
tp_frame_nr = 8
we will get the following buffer structure:
block #1 block #2
+---------+---------+ +---------+---------+
| frame 1 | frame 2 | | frame 3 | frame 4 |
+---------+---------+ +---------+---------+
block #3 block #4
+---------+---------+ +---------+---------+
| frame 5 | frame 6 | | frame 7 | frame 8 |
+---------+---------+ +---------+---------+
Huge thank you to:
Ulisses Alonso Camaró <[email protected]>
Johann Baudy <[email protected]>
Jesse Brandeburg
See their orginal manual here: https://www.kernel.org/doc/Documentation/networking/packet_mmap.txt
(All links internally are dead, hence this post)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment