drivers/infiniband/hw/usnic/usnic_vnic.h
Source file repositories/reference/linux-study-clean/drivers/infiniband/hw/usnic/usnic_vnic.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/infiniband/hw/usnic/usnic_vnic.h- Extension
.h- Size
- 4244 bytes
- Lines
- 119
- Domain
- Driver Families
- Bucket
- drivers/infiniband
- 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/pci.hvnic_dev.h
Detected Declarations
struct usnic_vnic_resstruct usnic_vnic_res_chunkstruct usnic_vnic_res_descstruct usnic_vnic_res_specenum usnic_vnic_res_type
Annotated Snippet
struct usnic_vnic_res {
enum usnic_vnic_res_type type;
unsigned int vnic_idx;
struct usnic_vnic *vnic;
void __iomem *ctrl;
void *owner;
};
struct usnic_vnic_res_chunk {
enum usnic_vnic_res_type type;
int cnt;
int free_cnt;
struct usnic_vnic_res **res;
struct usnic_vnic *vnic;
};
struct usnic_vnic_res_desc {
enum usnic_vnic_res_type type;
uint16_t cnt;
};
struct usnic_vnic_res_spec {
struct usnic_vnic_res_desc resources[USNIC_VNIC_RES_TYPE_MAX];
};
const char *usnic_vnic_res_type_to_str(enum usnic_vnic_res_type res_type);
const char *usnic_vnic_pci_name(struct usnic_vnic *vnic);
int usnic_vnic_dump(struct usnic_vnic *vnic, char *buf, int buf_sz,
void *hdr_obj,
int (*printtitle)(void *, char*, int),
int (*printcols)(char *, int),
int (*printrow)(void *, char *, int));
void usnic_vnic_res_spec_update(struct usnic_vnic_res_spec *spec,
enum usnic_vnic_res_type trgt_type,
u16 cnt);
int usnic_vnic_res_spec_satisfied(const struct usnic_vnic_res_spec *min_spec,
struct usnic_vnic_res_spec *res_spec);
int usnic_vnic_spec_dump(char *buf, int buf_sz,
struct usnic_vnic_res_spec *res_spec);
int usnic_vnic_check_room(struct usnic_vnic *vnic,
struct usnic_vnic_res_spec *res_spec);
int usnic_vnic_res_cnt(struct usnic_vnic *vnic,
enum usnic_vnic_res_type type);
int usnic_vnic_res_free_cnt(struct usnic_vnic *vnic,
enum usnic_vnic_res_type type);
struct usnic_vnic_res_chunk *
usnic_vnic_get_resources(struct usnic_vnic *vnic,
enum usnic_vnic_res_type type,
int cnt,
void *owner);
void usnic_vnic_put_resources(struct usnic_vnic_res_chunk *chunk);
struct pci_dev *usnic_vnic_get_pdev(struct usnic_vnic *vnic);
struct vnic_dev_bar *usnic_vnic_get_bar(struct usnic_vnic *vnic,
int bar_num);
struct usnic_vnic *usnic_vnic_alloc(struct pci_dev *pdev);
void usnic_vnic_free(struct usnic_vnic *vnic);
u16 usnic_vnic_get_index(struct usnic_vnic *vnic);
#endif /*!USNIC_VNIC_H_*/
Annotation
- Immediate include surface: `linux/pci.h`, `vnic_dev.h`.
- Detected declarations: `struct usnic_vnic_res`, `struct usnic_vnic_res_chunk`, `struct usnic_vnic_res_desc`, `struct usnic_vnic_res_spec`, `enum usnic_vnic_res_type`.
- Atlas domain: Driver Families / drivers/infiniband.
- 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.