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.
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
tsnep_hw.hlinux/platform_device.hlinux/dma-mapping.hlinux/etherdevice.hlinux/phy.hlinux/ethtool.hlinux/net_tstamp.hlinux/ptp_clock_kernel.hlinux/miscdevice.hnet/xdp.h
Detected Declarations
struct tsnep_gclstruct tsnep_rxnfc_filterstruct tsnep_rxnfc_rulestruct tsnep_tx_entrystruct tsnep_txstruct tsnep_rx_entrystruct tsnep_rxstruct tsnep_queuestruct tsnep_adapterenum tsnep_rxnfc_filter_typefunction tsnep_ethtool_get_test_countfunction tsnep_ethtool_get_test_strings
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
- Immediate include surface: `tsnep_hw.h`, `linux/platform_device.h`, `linux/dma-mapping.h`, `linux/etherdevice.h`, `linux/phy.h`, `linux/ethtool.h`, `linux/net_tstamp.h`, `linux/ptp_clock_kernel.h`.
- Detected declarations: `struct tsnep_gcl`, `struct tsnep_rxnfc_filter`, `struct tsnep_rxnfc_rule`, `struct tsnep_tx_entry`, `struct tsnep_tx`, `struct tsnep_rx_entry`, `struct tsnep_rx`, `struct tsnep_queue`, `struct tsnep_adapter`, `enum tsnep_rxnfc_filter_type`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.