drivers/net/ethernet/qlogic/qed/qed_sriov.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/qlogic/qed/qed_sriov.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/qlogic/qed/qed_sriov.h- Extension
.h- Size
- 12411 bytes
- Lines
- 502
- 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.hqed_vf.h
Detected Declarations
struct qed_public_vf_infostruct qed_iov_vf_init_paramsstruct qed_hw_sriov_infostruct qed_iov_vf_mbxstruct qed_vf_queue_cidstruct qed_vf_queuestruct qed_vf_vlan_shadowstruct qed_vf_shadow_configstruct qed_vf_infostruct qed_pf_iovenum qed_iov_vport_update_flagenum vf_stateenum qed_iov_wq_flagfunction qed_iov_is_valid_vfidfunction qed_iov_get_next_active_vffunction qed_iov_bulletin_set_udp_portsfunction qed_iov_allocfunction qed_iov_setupfunction qed_iov_wq_stopfunction qed_schedule_iovfunction qed_inform_vf_link_state
Annotated Snippet
struct qed_public_vf_info {
/* These copies will later be reflected in the bulletin board,
* but this copy should be newer.
*/
u8 forced_mac[ETH_ALEN];
u16 forced_vlan;
u8 mac[ETH_ALEN];
/* IFLA_VF_LINK_STATE_<X> */
int link_state;
/* Currently configured Tx rate in MB/sec. 0 if unconfigured */
int tx_rate;
/* Trusted VFs can configure promiscuous mode.
* Also store shadow promisc configuration if needed.
*/
bool is_trusted_configured;
bool is_trusted_request;
u8 rx_accept_mode;
u8 tx_accept_mode;
bool accept_any_vlan;
};
struct qed_iov_vf_init_params {
u16 rel_vf_id;
/* Number of requested Queues; Currently, don't support different
* number of Rx/Tx queues.
*/
u16 num_queues;
/* Allow the client to choose which qzones to use for Rx/Tx,
* and which queue_base to use for Tx queues on a per-queue basis.
* Notice values should be relative to the PF resources.
*/
u16 req_rx_queue[QED_MAX_VF_CHAINS_PER_PF];
u16 req_tx_queue[QED_MAX_VF_CHAINS_PER_PF];
};
/* This struct is part of qed_dev and contains data relevant to all hwfns;
* Initialized only if SR-IOV cpabability is exposed in PCIe config space.
*/
struct qed_hw_sriov_info {
int pos; /* capability position */
int nres; /* number of resources */
u32 cap; /* SR-IOV Capabilities */
u16 ctrl; /* SR-IOV Control */
u16 total_vfs; /* total VFs associated with the PF */
u16 num_vfs; /* number of vfs that have been started */
u16 initial_vfs; /* initial VFs associated with the PF */
u16 nr_virtfn; /* number of VFs available */
u16 offset; /* first VF Routing ID offset */
u16 stride; /* following VF stride */
u16 vf_device_id; /* VF device id */
u32 pgsz; /* page size for BAR alignment */
u8 link; /* Function Dependency Link */
u32 first_vf_in_pf;
};
/* This mailbox is maintained per VF in its PF contains all information
* required for sending / receiving a message.
*/
struct qed_iov_vf_mbx {
union vfpf_tlvs *req_virt;
dma_addr_t req_phys;
union pfvf_tlvs *reply_virt;
dma_addr_t reply_phys;
/* Address in VF where a pending message is located */
dma_addr_t pending_req;
/* Message from VF awaits handling */
bool b_pending_msg;
u8 *offset;
/* saved VF request header */
struct vfpf_first_tlv first_tlv;
};
#define QED_IOV_LEGACY_QID_RX (0)
#define QED_IOV_LEGACY_QID_TX (1)
#define QED_IOV_QID_INVALID (0xFE)
struct qed_vf_queue_cid {
bool b_is_tx;
struct qed_queue_cid *p_cid;
Annotation
- Immediate include surface: `linux/types.h`, `qed_vf.h`.
- Detected declarations: `struct qed_public_vf_info`, `struct qed_iov_vf_init_params`, `struct qed_hw_sriov_info`, `struct qed_iov_vf_mbx`, `struct qed_vf_queue_cid`, `struct qed_vf_queue`, `struct qed_vf_vlan_shadow`, `struct qed_vf_shadow_config`, `struct qed_vf_info`, `struct qed_pf_iov`.
- 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.