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