drivers/net/ethernet/qlogic/qed/qed_cxt.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/qlogic/qed/qed_cxt.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/qlogic/qed/qed_cxt.h- Extension
.h- Size
- 8521 bytes
- Lines
- 368
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hlinux/slab.hlinux/qed/qed_if.hqed_hsi.hqed.h
Detected Declarations
struct qed_cxt_infostruct qed_tid_memstruct qed_tid_segstruct qed_conn_type_cfgstruct ilt_cfg_pairstruct qed_ilt_cli_blkstruct qed_ilt_client_cfgstruct qed_cid_acquired_mapstruct qed_src_t2struct qed_cxt_mngrenum qed_cxt_elem_type
Annotated Snippet
struct qed_cxt_info {
void *p_cxt;
u32 iid;
enum protocol_type type;
};
#define MAX_TID_BLOCKS 512
struct qed_tid_mem {
u32 tid_size;
u32 num_tids_per_block;
u32 waste;
u8 *blocks[MAX_TID_BLOCKS]; /* 4K */
};
/**
* qed_cxt_get_cid_info(): Returns the context info for a specific cidi.
*
* @p_hwfn: HW device data.
* @p_info: In/out.
*
* Return: Int.
*/
int qed_cxt_get_cid_info(struct qed_hwfn *p_hwfn,
struct qed_cxt_info *p_info);
/**
* qed_cxt_get_tid_mem_info(): Returns the tid mem info.
*
* @p_hwfn: HW device data.
* @p_info: in/out.
*
* Return: int.
*/
int qed_cxt_get_tid_mem_info(struct qed_hwfn *p_hwfn,
struct qed_tid_mem *p_info);
#define QED_CXT_TCP_ULP_TID_SEG PROTOCOLID_TCP_ULP
#define QED_CXT_ROCE_TID_SEG PROTOCOLID_ROCE
#define QED_CXT_FCOE_TID_SEG PROTOCOLID_FCOE
enum qed_cxt_elem_type {
QED_ELEM_CXT,
QED_ELEM_SRQ,
QED_ELEM_TASK,
QED_ELEM_XRC_SRQ,
};
u32 qed_cxt_get_proto_cid_count(struct qed_hwfn *p_hwfn,
enum protocol_type type, u32 *vf_cid);
/**
* qed_cxt_set_pf_params(): Set the PF params for cxt init.
*
* @p_hwfn: HW device data.
* @rdma_tasks: Requested maximum.
*
* Return: int.
*/
int qed_cxt_set_pf_params(struct qed_hwfn *p_hwfn, u32 rdma_tasks);
/**
* qed_cxt_cfg_ilt_compute(): Compute ILT init parameters.
*
* @p_hwfn: HW device data.
* @last_line: Last_line.
*
* Return: Int
*/
int qed_cxt_cfg_ilt_compute(struct qed_hwfn *p_hwfn, u32 *last_line);
/**
* qed_cxt_cfg_ilt_compute_excess(): How many lines can be decreased.
*
* @p_hwfn: HW device data.
* @used_lines: Used lines.
*
* Return: Int.
*/
u32 qed_cxt_cfg_ilt_compute_excess(struct qed_hwfn *p_hwfn, u32 used_lines);
/**
* qed_cxt_mngr_alloc(): Allocate and init the context manager struct.
*
* @p_hwfn: HW device data.
*
* Return: Int.
*/
int qed_cxt_mngr_alloc(struct qed_hwfn *p_hwfn);
/**
* qed_cxt_mngr_free() - Context manager free.
Annotation
- Immediate include surface: `linux/types.h`, `linux/slab.h`, `linux/qed/qed_if.h`, `qed_hsi.h`, `qed.h`.
- Detected declarations: `struct qed_cxt_info`, `struct qed_tid_mem`, `struct qed_tid_seg`, `struct qed_conn_type_cfg`, `struct ilt_cfg_pair`, `struct qed_ilt_cli_blk`, `struct qed_ilt_client_cfg`, `struct qed_cid_acquired_map`, `struct qed_src_t2`, `struct qed_cxt_mngr`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
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.