drivers/net/ethernet/intel/ice/ice_vf_lib.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/intel/ice/ice_vf_lib.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/intel/ice/ice_vf_lib.h- Extension
.h- Size
- 10948 bytes
- Lines
- 401
- 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/types.hlinux/hashtable.hlinux/bitmap.hlinux/mutex.hlinux/pci.hnet/devlink.hlinux/avf/virtchnl.hice_type.hice_flow.hvirt/fdir.hice_vsi_vlan_ops.h
Detected Declarations
struct ice_pfstruct ice_vfstruct ice_virtchnl_opsstruct ice_time_macstruct ice_mdd_vf_eventsstruct ice_vf_hash_ip_ctxstruct ice_vf_hash_gtpu_ctxstruct ice_vf_hash_ctxstruct ice_fdir_prof_infostruct ice_vf_qs_bwstruct ice_rss_prof_infostruct ice_vf_opsstruct ice_vfsstruct ice_vfenum ice_virtchnl_capenum ice_vf_statesenum ice_hash_ip_ctx_typeenum ice_hash_gtpu_ctx_typeenum ice_vf_reset_flagsfunction ice_vf_get_port_vlan_idfunction ice_vf_get_port_vlan_priofunction ice_vf_is_port_vlan_enafunction ice_vf_get_port_vlan_tpidfunction ice_vf_is_lldp_enafunction ice_put_vffunction ice_get_num_vfsfunction ice_is_vf_disabledfunction ice_check_vf_ready_for_cfgfunction ice_set_vf_state_disfunction ice_vf_set_vsi_promiscfunction ice_vf_clear_vsi_promiscfunction ice_reset_vffunction ice_reset_all_vfs
Annotated Snippet
struct ice_time_mac {
unsigned long time_modified;
u8 addr[ETH_ALEN];
};
/* VF MDD events print structure */
struct ice_mdd_vf_events {
u16 count; /* total count of Rx|Tx events */
/* count number of the last printed event */
u16 last_printed;
};
enum ice_hash_ip_ctx_type {
ICE_HASH_IP_CTX_IP = 0,
ICE_HASH_IP_CTX_IP_ESP,
ICE_HASH_IP_CTX_IP_UDP_ESP,
ICE_HASH_IP_CTX_IP_AH,
ICE_HASH_IP_CTX_IP_PFCP,
ICE_HASH_IP_CTX_IP_UDP,
ICE_HASH_IP_CTX_IP_TCP,
ICE_HASH_IP_CTX_IP_SCTP,
ICE_HASH_IP_CTX_MAX,
};
struct ice_vf_hash_ip_ctx {
struct ice_rss_hash_cfg ctx[ICE_HASH_IP_CTX_MAX];
};
enum ice_hash_gtpu_ctx_type {
ICE_HASH_GTPU_CTX_EH_IP = 0,
ICE_HASH_GTPU_CTX_EH_IP_UDP,
ICE_HASH_GTPU_CTX_EH_IP_TCP,
ICE_HASH_GTPU_CTX_UP_IP,
ICE_HASH_GTPU_CTX_UP_IP_UDP,
ICE_HASH_GTPU_CTX_UP_IP_TCP,
ICE_HASH_GTPU_CTX_DW_IP,
ICE_HASH_GTPU_CTX_DW_IP_UDP,
ICE_HASH_GTPU_CTX_DW_IP_TCP,
ICE_HASH_GTPU_CTX_MAX,
};
struct ice_vf_hash_gtpu_ctx {
struct ice_rss_hash_cfg ctx[ICE_HASH_GTPU_CTX_MAX];
};
struct ice_vf_hash_ctx {
struct ice_vf_hash_ip_ctx v4;
struct ice_vf_hash_ip_ctx v6;
struct ice_vf_hash_gtpu_ctx ipv4;
struct ice_vf_hash_gtpu_ctx ipv6;
};
/* Structure to store fdir fv entry */
struct ice_fdir_prof_info {
struct ice_parser_profile prof;
u64 fdir_active_cnt;
};
struct ice_vf_qs_bw {
u32 committed;
u32 peak;
u16 queue_id;
u8 tc;
};
/* Structure to store RSS field vector entry */
struct ice_rss_prof_info {
struct ice_parser_profile prof;
bool symm;
};
/* VF operations */
struct ice_vf_ops {
enum ice_disq_rst_src reset_type;
void (*free)(struct ice_vf *vf);
void (*clear_reset_state)(struct ice_vf *vf);
void (*clear_mbx_register)(struct ice_vf *vf);
void (*trigger_reset_register)(struct ice_vf *vf, bool is_vflr);
bool (*poll_reset_status)(struct ice_vf *vf);
void (*clear_reset_trigger)(struct ice_vf *vf);
void (*irq_close)(struct ice_vf *vf);
void (*post_vsi_rebuild)(struct ice_vf *vf);
};
/* Virtchnl/SR-IOV config info */
struct ice_vfs {
DECLARE_HASHTABLE(table, 8); /* table of VF entries */
struct mutex table_lock; /* Lock for protecting the hash table */
u16 num_supported; /* max supported VFs on this PF */
u16 num_qps_per; /* number of queue pairs per VF */
Annotation
- Immediate include surface: `linux/types.h`, `linux/hashtable.h`, `linux/bitmap.h`, `linux/mutex.h`, `linux/pci.h`, `net/devlink.h`, `linux/avf/virtchnl.h`, `ice_type.h`.
- Detected declarations: `struct ice_pf`, `struct ice_vf`, `struct ice_virtchnl_ops`, `struct ice_time_mac`, `struct ice_mdd_vf_events`, `struct ice_vf_hash_ip_ctx`, `struct ice_vf_hash_gtpu_ctx`, `struct ice_vf_hash_ctx`, `struct ice_fdir_prof_info`, `struct ice_vf_qs_bw`.
- 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.