/* SPDX-License-Identifier: GPL-2.0-only */


#ifndef __LIBETH_TYPES_H
#define __LIBETH_TYPES_H

#include <linux/workqueue.h>




struct libeth_rq_napi_stats {
	union {
		struct {
							u32 packets;
							u32 bytes;
							u32 fragments;
							u32 hsplit;
		};
		DECLARE_FLEX_ARRAY(u32, raw);
	};
};


struct libeth_sq_napi_stats {
	union {
		struct {
							u32 packets;
							u32 bytes;
		};
		DECLARE_FLEX_ARRAY(u32, raw);
	};
};


struct libeth_xdpsq_napi_stats {
	union {
		struct {
							u32 packets;
							u32 bytes;
							u32 fragments;
		};
		DECLARE_FLEX_ARRAY(u32, raw);
	};
};








struct libeth_xdpsq_lock {
	spinlock_t			lock;
	bool				share;
};




struct libeth_xdpsq_timer {
	void				*xdpsq;
	struct libeth_xdpsq_lock	*lock;

	struct delayed_work		dwork;
};




struct libeth_xdp_buff_stash {
	void				*data;
	u16				headroom;
	u16				len;

	u32				frame_sz:24;
	u32				flags:8;
} __aligned_largest;

#endif 
