1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 /* Copyright (C) 2025 Intel Corporation */ 3 4 #ifndef __LIBETH_PRIV_H 5 #define __LIBETH_PRIV_H 6 7 #include <linux/types.h> 8 9 /* XDP */ 10 11 enum xdp_action; 12 struct libeth_xdp_buff; 13 struct libeth_xdp_tx_frame; 14 struct skb_shared_info; 15 struct xdp_frame_bulk; 16 17 extern const struct xsk_tx_metadata_ops libeth_xsktmo_slow; 18 19 void libeth_xsk_tx_return_bulk(const struct libeth_xdp_tx_frame *bq, 20 u32 count); 21 u32 libeth_xsk_prog_exception(struct libeth_xdp_buff *xdp, enum xdp_action act, 22 int ret); 23 24 struct libeth_xdp_ops { 25 void (*bulk)(const struct skb_shared_info *sinfo, 26 struct xdp_frame_bulk *bq, bool frags); 27 void (*xsk)(struct libeth_xdp_buff *xdp); 28 }; 29 30 void libeth_attach_xdp(const struct libeth_xdp_ops *ops); 31 libeth_detach_xdp(void)32static inline void libeth_detach_xdp(void) 33 { 34 libeth_attach_xdp(NULL); 35 } 36 37 #endif /* __LIBETH_PRIV_H */ 38