summaryrefslogtreecommitdiff
path: root/dissector.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2015-10-29 15:58:05 +0100
committerTobias Klauser <tklauser@distanz.ch>2015-10-29 15:58:05 +0100
commit55274adedcabdc3f1e4d66b2c3b77b1612acf20d (patch)
tree0d6b5cd7315022b5dd543698a9dcdd51eb050fda /dissector.c
parentdbd83f04dfb4b4265a290bad6a1813825f7ab3c6 (diff)
ring: Simplify calculation of number of frames in a tpacket ring
The number of frames in a tpacket ring (ring->layout.tp_frame_nr) is currently calculated as: tp_frame_nr = tp_block_size / tp_frame_size * tp_block_nr Substituting tp_block_nr with 'size / tp_block_size' (as calculated in the line above), we get: tp_frame_nr = tp_block_size / tp_frame_size * (size / tp_block_size) and realize that we can omit tp_block_size as it cancels out, leading to: tp_frame_nr = 1 / tp_frame_size * (size / 1) = size / tp_frame_size Adjust the calculation in setup_ring_layout_generic() accordingly. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'dissector.c')
0 files changed, 0 insertions, 0 deletions
tioned in the pull the other day, a few more fixes for this round, all related to the bio op changes in this series. Two fixes, and then a cleanup, renaming bio->bi_rw to bio->bi_opf. I wanted to do that change right after or right before -rc1, so that risk of conflict was reduced. I just rebased the series on top of current master, and no new ->bi_rw usage has snuck in" * 'for-linus' of git://git.kernel.dk/linux-block: block: rename bio bi_rw to bi_opf target: iblock_execute_sync_cache() should use bio_set_op_attrs() mm: make __swap_writepage() use bio_set_op_attrs() block/mm: make bdev_ops->rw_page() take a bool for read/write
Diffstat (limited to 'Documentation/w1/masters')