Björn Töpel | dac09149 | 2018-05-18 14:00:21 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | /* XDP user-space packet buffer |
Björn Töpel | c0c77d8 | 2018-05-02 13:01:23 +0200 | [diff] [blame] | 3 | * Copyright(c) 2018 Intel Corporation. |
Björn Töpel | c0c77d8 | 2018-05-02 13:01:23 +0200 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #ifndef XDP_UMEM_H_ |
| 7 | #define XDP_UMEM_H_ |
| 8 | |
Björn Töpel | e61e62b9 | 2018-06-04 14:05:51 +0200 | [diff] [blame] | 9 | #include <net/xdp_sock.h> |
Björn Töpel | c0c77d8 | 2018-05-02 13:01:23 +0200 | [diff] [blame] | 10 | |
Björn Töpel | 173d3ad | 2018-06-04 14:05:55 +0200 | [diff] [blame] | 11 | int xdp_umem_assign_dev(struct xdp_umem *umem, struct net_device *dev, |
Magnus Karlsson | c9b47cc | 2018-10-01 14:51:34 +0200 | [diff] [blame] | 12 | u16 queue_id, u16 flags); |
Ilya Maximets | 455302d | 2019-06-28 11:04:07 +0300 | [diff] [blame] | 13 | void xdp_umem_clear_dev(struct xdp_umem *umem); |
Magnus Karlsson | 965a990 | 2018-05-02 13:01:26 +0200 | [diff] [blame] | 14 | bool xdp_umem_validate_queues(struct xdp_umem *umem); |
Björn Töpel | c0c77d8 | 2018-05-02 13:01:23 +0200 | [diff] [blame] | 15 | void xdp_get_umem(struct xdp_umem *umem); |
| 16 | void xdp_put_umem(struct xdp_umem *umem); |
Magnus Karlsson | ac98d8a | 2018-06-04 14:05:57 +0200 | [diff] [blame] | 17 | void xdp_add_sk_umem(struct xdp_umem *umem, struct xdp_sock *xs); |
| 18 | void xdp_del_sk_umem(struct xdp_umem *umem, struct xdp_sock *xs); |
Björn Töpel | a49049e | 2018-05-22 09:35:02 +0200 | [diff] [blame] | 19 | struct xdp_umem *xdp_umem_create(struct xdp_umem_reg *mr); |
Björn Töpel | c0c77d8 | 2018-05-02 13:01:23 +0200 | [diff] [blame] | 20 | |
| 21 | #endif /* XDP_UMEM_H_ */ |