diff options
author | Björn Töpel | 2018-06-04 14:05:51 +0200 |
---|---|---|
committer | Daniel Borkmann | 2018-06-05 15:45:17 +0200 |
commit | e61e62b9e2cc14b336f330f37f517f9d373ff31e (patch) | |
tree | 8e01c17d6a4af2ec1347d2455863fb0bcb757e18 /include/net | |
parent | 763f9b414a0b92d6c0edc28030e80658f773634b (diff) |
xsk: moved struct xdp_umem definition
Moved struct xdp_umem to xdp_sock.h, in order to prepare for zero-copy
support.
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.h | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/include/net/xdp_sock.h b/include/net/xdp_sock.h index 7a647c56ec15..3a6cd88f179d 100644 --- a/include/net/xdp_sock.h +++ b/include/net/xdp_sock.h @@ -6,12 +6,34 @@ #ifndef _LINUX_XDP_SOCK_H #define _LINUX_XDP_SOCK_H +#include <linux/workqueue.h> +#include <linux/if_xdp.h> #include <linux/mutex.h> +#include <linux/mm.h> #include <net/sock.h> struct net_device; struct xsk_queue; -struct xdp_umem; + +struct xdp_umem_props { + u64 chunk_mask; + u64 size; +}; + +struct xdp_umem { + struct xsk_queue *fq; + struct xsk_queue *cq; + struct page **pgs; + struct xdp_umem_props props; + u32 headroom; + u32 chunk_size_nohr; + struct user_struct *user; + struct pid *pid; + unsigned long address; + refcount_t users; + struct work_struct work; + u32 npgs; +}; struct xdp_sock { /* struct sock must be the first member of struct xdp_sock */ |