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 struct libeth_xdp_buff; 12 struct libeth_xdp_tx_frame; 13 struct skb_shared_info; 14 struct xdp_frame_bulk; 15 16 void libeth_xsk_tx_return_bulk(const struct libeth_xdp_tx_frame *bq, 17 u32 count); 18 19 struct libeth_xdp_ops { 20 void (*bulk)(const struct skb_shared_info *sinfo, 21 struct xdp_frame_bulk *bq, bool frags); 22 void (*xsk)(struct libeth_xdp_buff *xdp); 23 }; 24 25 void libeth_attach_xdp(const struct libeth_xdp_ops *ops); 26 27 static inline void libeth_detach_xdp(void) 28 { 29 libeth_attach_xdp(NULL); 30 } 31 32 #endif /* __LIBETH_PRIV_H */ 33