xref: /linux/drivers/net/ethernet/stmicro/stmmac/stmmac_xdp.h (revision 8c994eff8fcfe8ecb1f1dbebed25b4d7bb75be12)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright (c) 2021, Intel Corporation. */
3 
4 #ifndef _STMMAC_XDP_H_
5 #define _STMMAC_XDP_H_
6 
7 #define STMMAC_MAX_RX_BUF_SIZE(num)	(((num) * PAGE_SIZE) - XDP_PACKET_HEADROOM)
8 #define STMMAC_RX_DMA_ATTR	(DMA_ATTR_SKIP_CPU_SYNC | DMA_ATTR_WEAK_ORDERING)
9 
10 int stmmac_xdp_setup_pool(struct stmmac_priv *priv, struct xsk_buff_pool *pool,
11 			  u16 queue);
12 int stmmac_xdp_set_prog(struct stmmac_priv *priv, struct bpf_prog *prog,
13 			struct netlink_ext_ack *extack);
14 
15 #endif /* _STMMAC_XDP_H_ */
16