9 #include <linux/export.h>
10 #include <linux/slab.h>
22 unsigned int count,
unsigned int packet_size,
25 unsigned int packets_per_page,
pages;
37 packets_per_page =
PAGE_SIZE / packet_size;
38 if (
WARN_ON(!packets_per_page)) {
49 for (i = 0; i <
count; ++
i) {
50 page_index = i / packets_per_page;
52 offset_in_page = (i % packets_per_page) * packet_size;