blob: 27603227601bea74c92b77afde34d5df60635613 [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);
Magnus Karlsson965a9902018-05-02 13:01:26 +020013bool xdp_umem_validate_queues(struct xdp_umem *umem);
Björn Töpelc0c77d82018-05-02 13:01:23 +020014void xdp_get_umem(struct xdp_umem *umem);
15void xdp_put_umem(struct xdp_umem *umem);
Magnus Karlssonac98d8a2018-06-04 14:05:57 +020016void xdp_add_sk_umem(struct xdp_umem *umem, struct xdp_sock *xs);
17void xdp_del_sk_umem(struct xdp_umem *umem, struct xdp_sock *xs);
Björn Töpela49049e2018-05-22 09:35:02 +020018struct xdp_umem *xdp_umem_create(struct xdp_umem_reg *mr);
Björn Töpelc0c77d82018-05-02 13:01:23 +020019
20#endif /* XDP_UMEM_H_ */