summaryrefslogtreecommitdiff
path: root/net/xdp/xdp_umem.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 /net/xdp/xdp_umem.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 'net/xdp/xdp_umem.h')
-rw-r--r--net/xdp/xdp_umem.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/xdp/xdp_umem.h b/net/xdp/xdp_umem.h
index 9433e8af650a..40e8fa4a92af 100644
--- a/net/xdp/xdp_umem.h
+++ b/net/xdp/xdp_umem.h
@@ -10,8 +10,7 @@
static inline char *xdp_umem_get_data(struct xdp_umem *umem, u64 addr)
{
- return page_address(umem->pgs[addr >> PAGE_SHIFT]) +
- (addr & (PAGE_SIZE - 1));
+ return umem->pages[addr >> PAGE_SHIFT].addr + (addr & (PAGE_SIZE - 1));
}
bool xdp_umem_validate_queues(struct xdp_umem *umem);