drivers/net/ethernet/intel/igc/igc.h

Source file repositories/reference/linux-study-clean/drivers/net/ethernet/intel/igc/igc.h

File Facts

System
Linux kernel
Corpus path
drivers/net/ethernet/intel/igc/igc.h
Extension
.h
Size
22963 bytes
Lines
805
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 igc_fpe_t {
	struct ethtool_mmsv mmsv;
	u32 tx_min_frag_size;
	bool tx_enabled;
};

enum igc_mac_filter_type {
	IGC_MAC_FILTER_TYPE_DST = 0,
	IGC_MAC_FILTER_TYPE_SRC
};

struct igc_tx_queue_stats {
	u64 packets;
	u64 bytes;
	u64 restart_queue;
	u64 restart_queue2;
};

struct igc_rx_queue_stats {
	u64 packets;
	u64 bytes;
	u64 drops;
	u64 csum_err;
	u64 alloc_failed;
};

struct igc_rx_packet_stats {
	u64 ipv4_packets;      /* IPv4 headers processed */
	u64 ipv4e_packets;     /* IPv4E headers with extensions processed */
	u64 ipv6_packets;      /* IPv6 headers processed */
	u64 ipv6e_packets;     /* IPv6E headers with extensions processed */
	u64 tcp_packets;       /* TCP headers processed */
	u64 udp_packets;       /* UDP headers processed */
	u64 sctp_packets;      /* SCTP headers processed */
	u64 nfs_packets;       /* NFS headers processe */
	u64 other_packets;
};

enum igc_tx_buffer_type {
	IGC_TX_BUFFER_TYPE_SKB,
	IGC_TX_BUFFER_TYPE_XDP,
	IGC_TX_BUFFER_TYPE_XSK,
};

/* wrapper around a pointer to a socket buffer,
 * so a DMA handle can be stored along with the buffer
 */
struct igc_tx_buffer {
	union igc_adv_tx_desc *next_to_watch;
	unsigned long time_stamp;
	enum igc_tx_buffer_type type;
	union {
		struct sk_buff *skb;
		struct xdp_frame *xdpf;
	};
	unsigned int bytecount;
	u16 gso_segs;
	__be16 protocol;

	DEFINE_DMA_UNMAP_ADDR(dma);
	DEFINE_DMA_UNMAP_LEN(len);
	u32 tx_flags;
	bool xsk_pending_ts;
};

struct igc_tx_timestamp_request {
	union {                /* reference to the packet being timestamped */
		struct sk_buff *skb;
		struct igc_tx_buffer *xsk_tx_buffer;
	};
	enum igc_tx_buffer_type buffer_type;
	unsigned long start;   /* when the tstamp request started (jiffies) */
	u32 mask;              /* _TSYNCTXCTL_TXTT_{X} bit for this request */
	u32 regl;              /* which TXSTMPL_{X} register should be used */
	u32 regh;              /* which TXSTMPH_{X} register should be used */
	u32 flags;             /* flags that should be added to the tx_buffer */
	u8 xsk_queue_index;    /* Tx queue which requesting timestamp */
	struct xsk_tx_metadata_compl xsk_meta;	/* ref to xsk Tx metadata */
};

struct igc_inline_rx_tstamps {
	/* Timestamps are saved in little endian at the beginning of the packet
	 * buffer following the layout:
	 *
	 * DWORD: | 0              | 1              | 2              | 3              |
	 * Field: | Timer1 SYSTIML | Timer1 SYSTIMH | Timer0 SYSTIML | Timer0 SYSTIMH |
	 *
	 * SYSTIML holds the nanoseconds part while SYSTIMH holds the seconds
	 * part of the timestamp.
	 *

Annotation

Implementation Notes