drivers/net/ethernet/intel/ice/virt/rss.c
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/intel/ice/virt/rss.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/intel/ice/virt/rss.c- Extension
.c- Size
- 59924 bytes
- Lines
- 1923
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
rss.hice_vf_lib_private.hice.h
Detected Declarations
struct ice_vc_hdr_match_typestruct ice_vc_hash_field_match_typestruct ice_gtpu_ctx_actionfunction ice_vc_rss_hash_updatefunction ice_vc_validate_patternfunction ice_vc_parse_rss_cfgfunction ice_vf_adv_rss_offload_enafunction ice_is_hash_cfg_validfunction ice_hash_cfg_resetfunction ice_hash_cfg_recordfunction ice_hash_moveoutfunction ice_hash_movebackfunction ice_hash_removefunction orderfunction ice_add_rss_cfg_pre_ipfunction headersfunction ice_map_ip_ctx_idxfunction ice_add_rss_cfg_prefunction ice_add_rss_cfg_post_gtpufunction ice_add_rss_cfg_postfunction ice_rem_rss_cfg_postfunction ice_rem_rss_cfg_wrapfunction ice_add_rss_cfg_wrapfunction ice_parse_raw_rss_patternfunction ice_add_raw_rss_cfgfunction ice_rem_raw_rss_cfgfunction ice_vc_handle_rss_cfgfunction ice_vc_config_rss_keyfunction ice_vc_config_rss_lutfunction ice_vc_config_rss_hfuncfunction ice_vc_get_rss_hashcfgfunction ice_vc_set_rss_hashcfg
Annotated Snippet
struct ice_vc_hdr_match_type {
u32 vc_hdr; /* virtchnl headers (VIRTCHNL_PROTO_HDR_XXX) */
u32 ice_hdr; /* ice headers (ICE_FLOW_SEG_HDR_XXX) */
};
static const struct ice_vc_hdr_match_type ice_vc_hdr_list[] = {
{VIRTCHNL_PROTO_HDR_NONE, ICE_FLOW_SEG_HDR_NONE},
{VIRTCHNL_PROTO_HDR_ETH, ICE_FLOW_SEG_HDR_ETH},
{VIRTCHNL_PROTO_HDR_S_VLAN, ICE_FLOW_SEG_HDR_VLAN},
{VIRTCHNL_PROTO_HDR_C_VLAN, ICE_FLOW_SEG_HDR_VLAN},
{VIRTCHNL_PROTO_HDR_IPV4, ICE_FLOW_SEG_HDR_IPV4 |
ICE_FLOW_SEG_HDR_IPV_OTHER},
{VIRTCHNL_PROTO_HDR_IPV6, ICE_FLOW_SEG_HDR_IPV6 |
ICE_FLOW_SEG_HDR_IPV_OTHER},
{VIRTCHNL_PROTO_HDR_TCP, ICE_FLOW_SEG_HDR_TCP},
{VIRTCHNL_PROTO_HDR_UDP, ICE_FLOW_SEG_HDR_UDP},
{VIRTCHNL_PROTO_HDR_SCTP, ICE_FLOW_SEG_HDR_SCTP},
{VIRTCHNL_PROTO_HDR_PPPOE, ICE_FLOW_SEG_HDR_PPPOE},
{VIRTCHNL_PROTO_HDR_GTPU_IP, ICE_FLOW_SEG_HDR_GTPU_IP},
{VIRTCHNL_PROTO_HDR_GTPU_EH, ICE_FLOW_SEG_HDR_GTPU_EH},
{VIRTCHNL_PROTO_HDR_GTPU_EH_PDU_DWN,
ICE_FLOW_SEG_HDR_GTPU_DWN},
{VIRTCHNL_PROTO_HDR_GTPU_EH_PDU_UP,
ICE_FLOW_SEG_HDR_GTPU_UP},
{VIRTCHNL_PROTO_HDR_L2TPV3, ICE_FLOW_SEG_HDR_L2TPV3},
{VIRTCHNL_PROTO_HDR_ESP, ICE_FLOW_SEG_HDR_ESP},
{VIRTCHNL_PROTO_HDR_AH, ICE_FLOW_SEG_HDR_AH},
{VIRTCHNL_PROTO_HDR_PFCP, ICE_FLOW_SEG_HDR_PFCP_SESSION},
{VIRTCHNL_PROTO_HDR_GTPC, ICE_FLOW_SEG_HDR_GTPC},
{VIRTCHNL_PROTO_HDR_L2TPV2, ICE_FLOW_SEG_HDR_L2TPV2},
{VIRTCHNL_PROTO_HDR_IPV4_FRAG, ICE_FLOW_SEG_HDR_IPV_FRAG},
{VIRTCHNL_PROTO_HDR_IPV6_EH_FRAG, ICE_FLOW_SEG_HDR_IPV_FRAG},
{VIRTCHNL_PROTO_HDR_GRE, ICE_FLOW_SEG_HDR_GRE},
};
struct ice_vc_hash_field_match_type {
u32 vc_hdr; /* virtchnl headers
* (VIRTCHNL_PROTO_HDR_XXX)
*/
u32 vc_hash_field; /* virtchnl hash fields selector
* FIELD_SELECTOR((VIRTCHNL_PROTO_HDR_ETH_XXX))
*/
u64 ice_hash_field; /* ice hash fields
* (BIT_ULL(ICE_FLOW_FIELD_IDX_XXX))
*/
};
static const struct
ice_vc_hash_field_match_type ice_vc_hash_field_list[] = {
{VIRTCHNL_PROTO_HDR_ETH, FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_ETH_SRC),
BIT_ULL(ICE_FLOW_FIELD_IDX_ETH_SA)},
{VIRTCHNL_PROTO_HDR_ETH, FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_ETH_DST),
BIT_ULL(ICE_FLOW_FIELD_IDX_ETH_DA)},
{VIRTCHNL_PROTO_HDR_ETH, FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_ETH_SRC) |
FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_ETH_DST),
ICE_FLOW_HASH_ETH},
{VIRTCHNL_PROTO_HDR_ETH,
FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_ETH_ETHERTYPE),
BIT_ULL(ICE_FLOW_FIELD_IDX_ETH_TYPE)},
{VIRTCHNL_PROTO_HDR_S_VLAN,
FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_S_VLAN_ID),
BIT_ULL(ICE_FLOW_FIELD_IDX_S_VLAN)},
{VIRTCHNL_PROTO_HDR_C_VLAN,
FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_C_VLAN_ID),
BIT_ULL(ICE_FLOW_FIELD_IDX_C_VLAN)},
{VIRTCHNL_PROTO_HDR_IPV4, FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_SRC),
BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_SA)},
{VIRTCHNL_PROTO_HDR_IPV4, FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_DST),
BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_DA)},
{VIRTCHNL_PROTO_HDR_IPV4, FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_SRC) |
FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_DST),
ICE_FLOW_HASH_IPV4},
{VIRTCHNL_PROTO_HDR_IPV4, FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_SRC) |
FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_PROT),
BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_SA) |
BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_PROT)},
{VIRTCHNL_PROTO_HDR_IPV4, FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_DST) |
FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_PROT),
BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_DA) |
BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_PROT)},
{VIRTCHNL_PROTO_HDR_IPV4, FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_SRC) |
FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_DST) |
FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_PROT),
ICE_FLOW_HASH_IPV4 | BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_PROT)},
{VIRTCHNL_PROTO_HDR_IPV4,
FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_FRAG_PKID),
BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_ID)},
{VIRTCHNL_PROTO_HDR_IPV4,
FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_CHKSUM),
BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_CHKSUM)},
Annotation
- Immediate include surface: `rss.h`, `ice_vf_lib_private.h`, `ice.h`.
- Detected declarations: `struct ice_vc_hdr_match_type`, `struct ice_vc_hash_field_match_type`, `struct ice_gtpu_ctx_action`, `function ice_vc_rss_hash_update`, `function ice_vc_validate_pattern`, `function ice_vc_parse_rss_cfg`, `function ice_vf_adv_rss_offload_ena`, `function ice_is_hash_cfg_valid`, `function ice_hash_cfg_reset`, `function ice_hash_cfg_record`.
- 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.