drivers/net/ethernet/huawei/hinic/hinic_hw_qp.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/huawei/hinic/hinic_hw_qp.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/huawei/hinic/hinic_hw_qp.h- Extension
.h- Size
- 6799 bytes
- Lines
- 233
- 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/kernel.hlinux/types.hlinux/sizes.hlinux/pci.hlinux/skbuff.hhinic_common.hhinic_hw_if.hhinic_hw_wqe.hhinic_hw_wq.hhinic_hw_qp_ctxt.h
Detected Declarations
struct hinic_sqstruct hinic_rqstruct hinic_qpenum hinic_rx_buf_sz_idx
Annotated Snippet
struct hinic_sq {
struct hinic_hwif *hwif;
struct hinic_wq *wq;
u16 qid;
u32 irq;
u16 msix_entry;
void *hw_ci_addr;
dma_addr_t hw_ci_dma_addr;
void __iomem *db_base;
struct sk_buff **saved_skb;
struct hinic_debug_priv *dbg;
};
struct hinic_rq {
struct hinic_hwif *hwif;
struct hinic_wq *wq;
u16 qid;
struct cpumask affinity_mask;
u32 irq;
u16 msix_entry;
size_t buf_sz;
struct sk_buff **saved_skb;
struct hinic_rq_cqe **cqe;
dma_addr_t *cqe_dma;
u16 *pi_virt_addr;
dma_addr_t pi_dma_addr;
struct hinic_debug_priv *dbg;
};
struct hinic_qp {
struct hinic_sq sq;
struct hinic_rq rq;
u16 q_id;
};
void hinic_qp_prepare_header(struct hinic_qp_ctxt_header *qp_ctxt_hdr,
enum hinic_qp_ctxt_type ctxt_type,
u16 num_queues, u16 max_queues);
void hinic_sq_prepare_ctxt(struct hinic_sq_ctxt *sq_ctxt,
struct hinic_sq *sq, u16 global_qid);
void hinic_rq_prepare_ctxt(struct hinic_rq_ctxt *rq_ctxt,
struct hinic_rq *rq, u16 global_qid);
int hinic_init_sq(struct hinic_sq *sq, struct hinic_hwif *hwif,
struct hinic_wq *wq, struct msix_entry *entry, void *ci_addr,
dma_addr_t ci_dma_addr, void __iomem *db_base);
void hinic_clean_sq(struct hinic_sq *sq);
int hinic_init_rq(struct hinic_rq *rq, struct hinic_hwif *hwif,
struct hinic_wq *wq, struct msix_entry *entry);
void hinic_clean_rq(struct hinic_rq *rq);
int hinic_get_sq_free_wqebbs(struct hinic_sq *sq);
int hinic_get_rq_free_wqebbs(struct hinic_rq *rq);
void hinic_task_set_l2hdr(struct hinic_sq_task *task, u32 len);
void hinic_task_set_outter_l3(struct hinic_sq_task *task,
enum hinic_l3_offload_type l3_type,
u32 network_len);
void hinic_task_set_inner_l3(struct hinic_sq_task *task,
enum hinic_l3_offload_type l3_type,
u32 network_len);
void hinic_task_set_tunnel_l4(struct hinic_sq_task *task,
enum hinic_l4_tunnel_type l4_type,
u32 tunnel_len);
void hinic_set_cs_inner_l4(struct hinic_sq_task *task,
u32 *queue_info,
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/types.h`, `linux/sizes.h`, `linux/pci.h`, `linux/skbuff.h`, `hinic_common.h`, `hinic_hw_if.h`, `hinic_hw_wqe.h`.
- Detected declarations: `struct hinic_sq`, `struct hinic_rq`, `struct hinic_qp`, `enum hinic_rx_buf_sz_idx`.
- 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.