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.

Dependency Surface

Detected Declarations

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

Implementation Notes