blob: a63a9fb251f50dee8598d158b48331da8fb7dc82 [file] [log] [blame]
Björn Töpeldac091492018-05-18 14:00:21 +02001/* SPDX-License-Identifier: GPL-2.0 */
2/* XDP user-space packet buffer
Björn Töpelc0c77d82018-05-02 13:01:23 +02003 * Copyright(c) 2018 Intel Corporation.
Björn Töpelc0c77d82018-05-02 13:01:23 +02004 */
5
6#ifndef XDP_UMEM_H_
7#define XDP_UMEM_H_
8
Björn Töpele61e62b92018-06-04 14:05:51 +02009#include <net/xdp_sock.h>
Björn Töpelc0c77d82018-05-02 13:01:23 +020010
Björn Töpel173d3ad2018-06-04 14:05:55 +020011int xdp_umem_assign_dev(struct xdp_umem *umem, struct net_device *dev,
Magnus Karlssonc9b47cc2018-10-01 14:51:34 +020012 u16 queue_id, u16 flags);
Ilya Maximets455302d2019-06-28 11:04:07 +030013void xdp_umem_clear_dev(struct xdp_umem *umem);
Magnus Karlsson965a9902018-05-02 13:01:26 +020014bool xdp_umem_validate_queues(struct xdp_umem *umem);
Björn Töpelc0c77d82018-05-02 13:01:23 +020015void xdp_get_umem(struct xdp_umem *umem);
16void xdp_put_umem(struct xdp_umem *umem);
Magnus Karlssonac98d8a2018-06-04 14:05:57 +020017void xdp_add_sk_umem(struct xdp_umem *umem, struct xdp_sock *xs);
18void xdp_del_sk_umem(struct xdp_umem *umem, struct xdp_sock *xs);
Björn Töpela49049e2018-05-22 09:35:02 +020019struct xdp_umem *xdp_umem_create(struct xdp_umem_reg *mr);
Björn Töpelc0c77d82018-05-02 13:01:23 +020020
21#endif /* XDP_UMEM_H_ */