xdp_sock.h (90fed9c94625718a3a10db7d1e8e4efe093bbf5f) xdp_sock.h (e61e62b9e2cc14b336f330f37f517f9d373ff31e)
1/* SPDX-License-Identifier: GPL-2.0 */
2/* AF_XDP internal functions
3 * Copyright(c) 2018 Intel Corporation.
4 */
5
6#ifndef _LINUX_XDP_SOCK_H
7#define _LINUX_XDP_SOCK_H
8
1/* SPDX-License-Identifier: GPL-2.0 */
2/* AF_XDP internal functions
3 * Copyright(c) 2018 Intel Corporation.
4 */
5
6#ifndef _LINUX_XDP_SOCK_H
7#define _LINUX_XDP_SOCK_H
8
9#include <linux/workqueue.h>
10#include <linux/if_xdp.h>
9#include <linux/mutex.h>
11#include <linux/mutex.h>
12#include <linux/mm.h>
10#include <net/sock.h>
11
12struct net_device;
13struct xsk_queue;
13#include <net/sock.h>
14
15struct net_device;
16struct xsk_queue;
14struct xdp_umem;
15
17
18struct xdp_umem_props {
19 u64 chunk_mask;
20 u64 size;
21};
22
23struct xdp_umem {
24 struct xsk_queue *fq;
25 struct xsk_queue *cq;
26 struct page **pgs;
27 struct xdp_umem_props props;
28 u32 headroom;
29 u32 chunk_size_nohr;
30 struct user_struct *user;
31 struct pid *pid;
32 unsigned long address;
33 refcount_t users;
34 struct work_struct work;
35 u32 npgs;
36};
37
16struct xdp_sock {
17 /* struct sock must be the first member of struct xdp_sock */
18 struct sock sk;
19 struct xsk_queue *rx;
20 struct net_device *dev;
21 struct xdp_umem *umem;
22 struct list_head flush_node;
23 u16 queue_id;

--- 34 unchanged lines hidden ---
38struct xdp_sock {
39 /* struct sock must be the first member of struct xdp_sock */
40 struct sock sk;
41 struct xsk_queue *rx;
42 struct net_device *dev;
43 struct xdp_umem *umem;
44 struct list_head flush_node;
45 u16 queue_id;

--- 34 unchanged lines hidden ---