drivers/net/ethernet/amazon/ena/ena_netdev.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/amazon/ena/ena_netdev.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/amazon/ena/ena_netdev.h- Extension
.h- Size
- 11809 bytes
- Lines
- 470
- 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
linux/bitops.hlinux/dim.hlinux/etherdevice.hlinux/if_vlan.hlinux/inetdevice.hlinux/interrupt.hlinux/netdevice.hlinux/skbuff.hnet/xdp.huapi/linux/bpf.hnet/devlink.hena_com.hena_eth_com.h
Detected Declarations
struct ena_phc_infostruct ena_irqstruct ena_napistruct ena_tx_bufferstruct ena_rx_bufferstruct ena_stats_txstruct ena_stats_rxstruct ena_ringstruct ena_stats_devstruct ena_adapterenum ena_flags_tfunction ena_reset_devicefunction ena_increase_statfunction ena_ring_tx_doorbell
Annotated Snippet
struct ena_irq {
irq_handler_t handler;
void *data;
int cpu;
u32 vector;
cpumask_t affinity_hint_mask;
char name[ENA_IRQNAME_SIZE];
};
struct ena_napi {
u8 first_interrupt ____cacheline_aligned;
u8 interrupts_masked;
struct napi_struct napi;
struct ena_ring *tx_ring;
struct ena_ring *rx_ring;
u32 qid;
struct dim dim;
};
struct ena_tx_buffer {
union {
struct sk_buff *skb;
/* XDP buffer structure which is used for sending packets in
* the xdp queues
*/
struct xdp_frame *xdpf;
};
/* num of ena desc for this specific skb
* (includes data desc and metadata desc)
*/
u32 tx_descs;
/* num of buffers used by this skb */
u32 num_of_bufs;
/* Total size of all buffers in bytes */
u32 total_tx_size;
/* Indicate if bufs[0] map the linear data of the skb. */
u8 map_linear_data;
/* Used for detect missing tx packets to limit the number of prints */
u8 print_once;
/* Save the last jiffies to detect missing tx packets
*
* sets to non zero value on ena_start_xmit and set to zero on
* napi and timer_Service_routine.
*
* while this value is not protected by lock,
* a given packet is not expected to be handled by ena_start_xmit
* and by napi/timer_service at the same time.
*/
unsigned long last_jiffies;
struct ena_com_buf bufs[ENA_PKT_MAX_BUFS];
} ____cacheline_aligned;
struct ena_rx_buffer {
struct sk_buff *skb;
struct page *page;
dma_addr_t dma_addr;
u32 page_offset;
u32 buf_offset;
struct ena_com_buf ena_buf;
} ____cacheline_aligned;
struct ena_stats_tx {
u64 cnt;
u64 bytes;
u64 queue_stop;
u64 prepare_ctx_err;
u64 queue_wakeup;
u64 dma_mapping_err;
u64 linearize;
u64 linearize_failed;
u64 napi_comp;
u64 tx_poll;
u64 doorbells;
u64 bad_req_id;
u64 llq_buffer_copy;
u64 missed_tx;
u64 unmask_interrupt;
u64 last_napi_jiffies;
};
struct ena_stats_rx {
u64 cnt;
u64 bytes;
u64 rx_copybreak_pkt;
u64 csum_good;
u64 refil_partial;
u64 csum_bad;
Annotation
- Immediate include surface: `linux/bitops.h`, `linux/dim.h`, `linux/etherdevice.h`, `linux/if_vlan.h`, `linux/inetdevice.h`, `linux/interrupt.h`, `linux/netdevice.h`, `linux/skbuff.h`.
- Detected declarations: `struct ena_phc_info`, `struct ena_irq`, `struct ena_napi`, `struct ena_tx_buffer`, `struct ena_rx_buffer`, `struct ena_stats_tx`, `struct ena_stats_rx`, `struct ena_ring`, `struct ena_stats_dev`, `struct ena_adapter`.
- 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.