2018-05-18 20:00:21 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
/* XDP user-space packet buffer
|
2018-05-02 19:01:23 +08:00
|
|
|
* Copyright(c) 2018 Intel Corporation.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef XDP_UMEM_H_
|
|
|
|
#define XDP_UMEM_H_
|
|
|
|
|
2020-05-21 03:20:51 +08:00
|
|
|
#include <net/xdp_sock_drv.h>
|
2018-05-02 19:01:23 +08:00
|
|
|
|
2018-06-04 20:05:55 +08:00
|
|
|
int xdp_umem_assign_dev(struct xdp_umem *umem, struct net_device *dev,
|
2018-10-01 20:51:34 +08:00
|
|
|
u16 queue_id, u16 flags);
|
2019-06-28 16:04:07 +08:00
|
|
|
void xdp_umem_clear_dev(struct xdp_umem *umem);
|
2018-05-02 19:01:26 +08:00
|
|
|
bool xdp_umem_validate_queues(struct xdp_umem *umem);
|
2018-05-02 19:01:23 +08:00
|
|
|
void xdp_get_umem(struct xdp_umem *umem);
|
|
|
|
void xdp_put_umem(struct xdp_umem *umem);
|
2018-06-04 20:05:57 +08:00
|
|
|
void xdp_add_sk_umem(struct xdp_umem *umem, struct xdp_sock *xs);
|
|
|
|
void xdp_del_sk_umem(struct xdp_umem *umem, struct xdp_sock *xs);
|
2018-05-22 15:35:02 +08:00
|
|
|
struct xdp_umem *xdp_umem_create(struct xdp_umem_reg *mr);
|
2018-05-02 19:01:23 +08:00
|
|
|
|
|
|
|
#endif /* XDP_UMEM_H_ */
|