drivers/net/ethernet/engleder/tsnep.h

Source file repositories/reference/linux-study-clean/drivers/net/ethernet/engleder/tsnep.h

File Facts

System
Linux kernel
Corpus path
drivers/net/ethernet/engleder/tsnep.h
Extension
.h
Size
6125 bytes
Lines
265
Domain
Driver Families
Bucket
drivers/net
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

struct tsnep_gcl {
	void __iomem *addr;

	u64 base_time;
	u64 cycle_time;
	u64 cycle_time_extension;

	struct tsnep_gcl_operation operation[TSNEP_GCL_COUNT];
	int count;

	u64 change_limit;

	u64 start_time;
	bool change;
};

enum tsnep_rxnfc_filter_type {
	TSNEP_RXNFC_ETHER_TYPE,
};

struct tsnep_rxnfc_filter {
	enum tsnep_rxnfc_filter_type type;
	union {
		u16 ether_type;
	};
};

struct tsnep_rxnfc_rule {
	struct list_head list;
	struct tsnep_rxnfc_filter filter;
	int queue_index;
	int location;
};

struct tsnep_tx_entry {
	struct tsnep_tx_desc *desc;
	struct tsnep_tx_desc_wb *desc_wb;
	dma_addr_t desc_dma;
	bool owner_user_flag;

	u32 properties;

	u32 type;
	union {
		struct sk_buff *skb;
		struct xdp_frame *xdpf;
		bool zc;
	};
	size_t len;
	DEFINE_DMA_UNMAP_ADDR(dma);
};

struct tsnep_tx {
	struct tsnep_adapter *adapter;
	void __iomem *addr;
	int queue_index;

	void *page[TSNEP_RING_PAGE_COUNT];
	dma_addr_t page_dma[TSNEP_RING_PAGE_COUNT];

	struct tsnep_tx_entry entry[TSNEP_RING_SIZE];
	int write;
	int read;
	u32 owner_counter;
	int increment_owner_counter;
	struct xsk_buff_pool *xsk_pool;

	u32 packets;
	u32 bytes;
	u32 dropped;
};

struct tsnep_rx_entry {
	struct tsnep_rx_desc *desc;
	struct tsnep_rx_desc_wb *desc_wb;
	dma_addr_t desc_dma;

	u32 properties;

	union {
		struct page *page;
		struct xdp_buff *xdp;
	};
	size_t len;
	dma_addr_t dma;
};

struct tsnep_rx {
	struct tsnep_adapter *adapter;
	void __iomem *addr;

Annotation

Implementation Notes