summaryrefslogtreecommitdiff
path: root/net/xdp/xsk_queue.c
diff options
context:
space:
mode:
authorMagnus Karlsson <magnus.karlsson@intel.com>2018-08-31 14:40:02 +0300
committerDaniel Borkmann <daniel@iogearbox.net>2018-09-01 02:38:16 +0300
commit93ee30f3e8b412c5fc2d2f7d9d002529d9a209ad (patch)
tree6e4d21960cc9532238731eecc6e483059ae06d6f /net/xdp/xsk_queue.c
parentcf484f9f91f702e61eb47f7b142de6edc33a4a88 (diff)
downloadlinux-93ee30f3e8b412c5fc2d2f7d9d002529d9a209ad.tar.xz
xsk: i40e: get rid of useless struct xdp_umem_props
This commit gets rid of the structure xdp_umem_props. It was there to be able to break a dependency at one point, but this is no longer needed. The values in the struct are instead stored directly in the xdp_umem structure. This simplifies the xsk code as well as af_xdp zero-copy drivers and as a bonus gets rid of one internal header file. The i40e driver is also adapted to the new interface in this commit. Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'net/xdp/xsk_queue.c')
-rw-r--r--net/xdp/xsk_queue.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/xdp/xsk_queue.c b/net/xdp/xsk_queue.c
index 6c32e92e98fc..2dc1384d9f27 100644
--- a/net/xdp/xsk_queue.c
+++ b/net/xdp/xsk_queue.c
@@ -7,12 +7,13 @@
#include "xsk_queue.h"
-void xskq_set_umem(struct xsk_queue *q, struct xdp_umem_props *umem_props)
+void xskq_set_umem(struct xsk_queue *q, u64 size, u64 chunk_mask)
{
if (!q)
return;
- q->umem_props = *umem_props;
+ q->size = size;
+ q->chunk_mask = chunk_mask;
}
static u32 xskq_umem_get_ring_size(struct xsk_queue *q)