summaryrefslogtreecommitdiffstats
path: root/include/net
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
parente61e62b9e2cc14b336f330f37f517f9d373ff31e (diff)
downloadop-kernel-dev-8aef7340ae9695912a411886452ae9773206e845.zip
op-kernel-dev-8aef7340ae9695912a411886452ae9773206e845.tar.gz
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')
-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 3a6cd88..caf343a 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;
};
OpenPOWER on IntegriCloud