drivers/net/ethernet/cavium/liquidio/octeon_network.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/cavium/liquidio/octeon_network.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/cavium/liquidio/octeon_network.h- Extension
.h- Size
- 15012 bytes
- Lines
- 627
- 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/ptp_clock_kernel.h
Detected Declarations
struct liquidio_if_cfg_respstruct octnic_gatherstruct oct_nic_stats_respstruct oct_nic_vf_stats_respstruct oct_nic_stats_ctrlstruct oct_nic_seapi_respstruct liofunction recv_buffer_recyclefunction recv_buffer_destroyfunction recv_buffer_freefunction recv_buffer_fast_freefunction tx_buffer_freefunction lio_map_ringfunction lio_unmap_ringfunction octeon_fast_packet_nextfunction ifstate_checkfunction ifstate_setfunction ifstate_resetfunction wait_for_pending_requestsfunction stop_txqsfunction wake_txqsfunction start_txqsfunction skb_iq
Annotated Snippet
struct liquidio_if_cfg_resp {
u64 rh;
struct liquidio_if_cfg_info cfg_info;
u64 status;
};
#define LIO_IFCFG_WAIT_TIME 3000 /* In milli seconds */
#define LIQUIDIO_NDEV_STATS_POLL_TIME_MS 200
/* Structure of a node in list of gather components maintained by
* NIC driver for each network device.
*/
struct octnic_gather {
/* List manipulation. Next and prev pointers. */
struct list_head list;
/* Size of the gather component at sg in bytes. */
int sg_size;
/* Number of bytes that sg was adjusted to make it 8B-aligned. */
int adjust;
/* Gather component that can accommodate max sized fragment list
* received from the IP layer.
*/
struct octeon_sg_entry *sg;
dma_addr_t sg_dma_ptr;
};
struct oct_nic_stats_resp {
u64 rh;
struct oct_link_stats stats;
u64 status;
};
struct oct_nic_vf_stats_resp {
u64 rh;
u64 spoofmac_cnt;
u64 status;
};
struct oct_nic_stats_ctrl {
struct completion complete;
struct net_device *netdev;
};
struct oct_nic_seapi_resp {
u64 rh;
union {
u32 fec_setting;
u32 speed;
};
u64 status;
};
/** LiquidIO per-interface network private data */
struct lio {
/** State of the interface. Rx/Tx happens only in the RUNNING state. */
atomic_t ifstate;
/** Octeon Interface index number. This device will be represented as
* oct<ifidx> in the system.
*/
int ifidx;
/** Octeon Input queue to use to transmit for this network interface. */
int txq;
/** Octeon Output queue from which pkts arrive
* for this network interface.
*/
int rxq;
/** Guards each glist */
spinlock_t *glist_lock;
/** Array of gather component linked lists */
struct list_head *glist;
void **glists_virt_base;
dma_addr_t *glists_dma_base;
u32 glist_entry_size;
/** Pointer to the NIC properties for the Octeon device this network
* interface is associated with.
*/
struct octdev_props *octprops;
/** Pointer to the octeon device structure. */
struct octeon_device *oct_dev;
Annotation
- Immediate include surface: `linux/ptp_clock_kernel.h`.
- Detected declarations: `struct liquidio_if_cfg_resp`, `struct octnic_gather`, `struct oct_nic_stats_resp`, `struct oct_nic_vf_stats_resp`, `struct oct_nic_stats_ctrl`, `struct oct_nic_seapi_resp`, `struct lio`, `function recv_buffer_recycle`, `function recv_buffer_destroy`, `function recv_buffer_free`.
- 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.