summaryrefslogtreecommitdiff
path: root/include/net/xdp_sock.h
diff options
context:
space:
mode:
authorBjörn Töpel <bjorn.topel@intel.com>2018-06-04 14:05:52 +0200
committerDaniel Borkmann <daniel@iogearbox.net>2018-06-05 15:45:41 +0200
commit8aef7340ae9695912a411886452ae9773206e845 (patch)
treed6f66cf4c92cca441a6e39f3dfd09dce1c74e99b /include/net/xdp_sock.h
parente61e62b9e2cc14b336f330f37f517f9d373ff31e (diff)
xsk: introduce xdp_umem_page
The xdp_umem_page holds the address for a page. Trade memory for faster lookup. Later, we'll add DMA address here as well. Signed-off-by: Björn Töpel <bjorn.topel@intel.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'include/net/xdp_sock.h')
-rw-r--r--include/net/xdp_sock.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/net/xdp_sock.h b/include/net/xdp_sock.h
index 3a6cd88f179d..caf343a7e224 100644
--- a/include/net/xdp_sock.h
+++ b/include/net/xdp_sock.h
@@ -20,10 +20,14 @@ struct xdp_umem_props {
u64 size;
};
+struct xdp_umem_page {
+ void *addr;
+};
+
struct xdp_umem {
struct xsk_queue *fq;
struct xsk_queue *cq;
- struct page **pgs;
+ struct xdp_umem_page *pages;
struct xdp_umem_props props;
u32 headroom;
u32 chunk_size_nohr;
@@ -32,6 +36,7 @@ struct xdp_umem {
unsigned long address;
refcount_t users;
struct work_struct work;
+ struct page **pgs;
u32 npgs;
};