drivers/net/ethernet/ti/icssg/icssg_prueth.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/ti/icssg/icssg_prueth.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/ti/icssg/icssg_prueth.h- Extension
.h- Size
- 16408 bytes
- Lines
- 528
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- 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/bpf.hlinux/bpf_trace.hlinux/etherdevice.hlinux/genalloc.hlinux/if_vlan.hlinux/if_hsr.hlinux/interrupt.hlinux/kernel.hlinux/mfd/syscon.hlinux/module.hlinux/mutex.hlinux/net_tstamp.hlinux/of.hlinux/of_irq.hlinux/of_mdio.hlinux/of_net.hlinux/of_platform.hlinux/phy.hlinux/remoteproc/pruss.hlinux/pruss_driver.hlinux/ptp_clock_kernel.hlinux/remoteproc.hlinux/dma-mapping.hlinux/dma/ti-cppi5.hlinux/dma/k3-udma-glue.hnet/devlink.hnet/xdp.hnet/page_pool/helpers.hnet/xsk_buff_pool.hnet/xdp_sock_drv.hicssg_config.hicss_iep.h
Detected Declarations
struct prueth_tx_chnstruct prueth_rx_chnstruct prueth_swdatastruct prueth_emacstruct prueth_pdatastruct icssg_firmwaresstruct pruethstruct emac_tx_ts_responsestruct emac_tx_ts_response_sr1enum prueth_portenum prueth_macenum prueth_swdata_typeenum prueth_tx_buff_typefunction prueth_emac_slicefunction icssg_read_timefunction prueth_xdp_is_enabled
Annotated Snippet
struct prueth_tx_chn {
struct device *dma_dev;
struct napi_struct napi_tx;
struct k3_cppi_desc_pool *desc_pool;
struct k3_udma_glue_tx_channel *tx_chn;
struct prueth_emac *emac;
u32 id;
u32 descs_num;
unsigned int irq;
char name[32];
struct hrtimer tx_hrtimer;
unsigned long tx_pace_timeout_ns;
struct xsk_buff_pool *xsk_pool;
bool irq_disabled;
};
struct prueth_rx_chn {
struct device *dev;
struct device *dma_dev;
struct k3_cppi_desc_pool *desc_pool;
struct k3_udma_glue_rx_channel *rx_chn;
u32 descs_num;
unsigned int irq[ICSSG_MAX_RFLOWS]; /* separate irq per flow */
char name[32];
struct page_pool *pg_pool;
struct xdp_rxq_info xdp_rxq;
struct xsk_buff_pool *xsk_pool;
bool irq_disabled;
};
enum prueth_swdata_type {
PRUETH_SWDATA_INVALID = 0,
PRUETH_SWDATA_SKB,
PRUETH_SWDATA_PAGE,
PRUETH_SWDATA_CMD,
PRUETH_SWDATA_XDPF,
PRUETH_SWDATA_XSK,
};
enum prueth_tx_buff_type {
PRUETH_TX_BUFF_TYPE_XDP_TX,
PRUETH_TX_BUFF_TYPE_XDP_NDO,
};
struct prueth_swdata {
enum prueth_swdata_type type;
union prueth_data {
struct sk_buff *skb;
struct page *page;
u32 cmd;
struct xdp_frame *xdpf;
struct xdp_buff *xdp;
} data;
};
/* There are 4 Tx DMA channels, but the highest priority is CH3 (thread 3)
* and lower three are lower priority channels or threads.
*/
#define PRUETH_MAX_TX_QUEUES 4
#define PRUETH_MAX_TX_TS_REQUESTS 50 /* Max simultaneous TX_TS requests */
/* XDP BPF state */
#define ICSSG_XDP_PASS 0
#define ICSSG_XDP_CONSUMED BIT(0)
#define ICSSG_XDP_TX BIT(1)
#define ICSSG_XDP_REDIR BIT(2)
/* Minimum coalesce time in usecs for both Tx and Rx */
#define ICSSG_MIN_COALESCE_USECS 20
/* data for each emac port */
struct prueth_emac {
bool is_sr1;
struct prueth *prueth;
struct net_device *ndev;
u8 mac_addr[6];
struct napi_struct napi_rx;
u32 msg_enable;
int link;
int speed;
int duplex;
const char *phy_id;
struct device_node *phy_node;
phy_interface_t phy_if;
enum prueth_port port_id;
struct icss_iep *iep;
unsigned int rx_ts_enabled : 1;
Annotation
- Immediate include surface: `linux/bpf.h`, `linux/bpf_trace.h`, `linux/etherdevice.h`, `linux/genalloc.h`, `linux/if_vlan.h`, `linux/if_hsr.h`, `linux/interrupt.h`, `linux/kernel.h`.
- Detected declarations: `struct prueth_tx_chn`, `struct prueth_rx_chn`, `struct prueth_swdata`, `struct prueth_emac`, `struct prueth_pdata`, `struct icssg_firmwares`, `struct prueth`, `struct emac_tx_ts_response`, `struct emac_tx_ts_response_sr1`, `enum prueth_port`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- 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.