drivers/net/ethernet/intel/ice/ice_parser_rt.c
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/intel/ice/ice_parser_rt.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/intel/ice/ice_parser_rt.c- Extension
.c- Size
- 22006 bytes
- Lines
- 860
- 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
ice_common.h
Detected Declarations
function ice_rt_tsr_setfunction ice_rt_ho_setfunction ice_rt_np_setfunction ice_rt_nn_setfunction ice_rt_flag_setfunction ice_rt_gpr_setfunction ice_rt_err_setfunction ice_parser_rt_resetfunction ice_parser_rt_pktbuf_setfunction ice_bst_key_initfunction ice_bit_rev_u16function ice_bit_rev_u32function ice_hv_bit_selfunction ice_pk_buildfunction ice_flag_getfunction ice_imem_pgk_initfunction ice_imem_alu0_setfunction ice_imem_alu1_setfunction ice_imem_alu2_setfunction ice_imem_pgp_setfunction ice_bst_pgk_initfunction ice_bst_alu0_setfunction ice_bst_alu1_setfunction ice_bst_alu2_setfunction ice_bst_pgp_setfunction ice_gpr_addfunction ice_pg_exefunction ice_flg_addfunction ice_flg_updatefunction ice_po_updatefunction ice_reg_bit_selfunction ice_err_addfunction ice_dst_reg_bit_setfunction ice_alu_exefunction ice_alu0_exefunction ice_alu1_exefunction ice_alu2_exefunction ice_pu_exefunction ice_alu_pg_exefunction ice_proto_off_updatefunction ice_marker_setfunction ice_marker_updatefunction ice_ptype_resolvefunction ice_proto_off_resolvefunction ice_result_resolvefunction ice_parser_rt_execute
Annotated Snippet
if (alu->dst_start >= ICE_PARSER_ERR_NUM) {
ice_debug(rt->psr->hw, ICE_DBG_PARSER, "Invalid error %d\n",
alu->dst_start);
return;
}
ice_err_add(rt, alu->dst_start, val);
} else if (alu->dst_reg_id >= ICE_GPR_FLG_IDX) {
flg_idx = (u16)(((alu->dst_reg_id - ICE_GPR_FLG_IDX) << 4) +
alu->dst_start);
if (flg_idx >= ICE_PARSER_FLG_NUM) {
ice_debug(rt->psr->hw, ICE_DBG_PARSER, "Invalid flag %d\n",
flg_idx);
return;
}
ice_flg_add(rt, flg_idx, val);
} else {
ice_debug(rt->psr->hw, ICE_DBG_PARSER, "Unexpected Dest Register Bit set, RegisterID %d Start %d\n",
alu->dst_reg_id, alu->dst_start);
}
}
static void ice_alu_exe(struct ice_parser_rt *rt, struct ice_alu *alu)
{
u16 dst, src, shift, imm;
if (alu->shift_xlate_sel) {
ice_debug(rt->psr->hw, ICE_DBG_PARSER, "shift_xlate_sel != 0 is not expected\n");
return;
}
ice_po_update(rt, alu);
ice_flg_update(rt, alu);
dst = rt->gpr[alu->dst_reg_id];
src = ice_reg_bit_sel(rt, alu->src_reg_id,
alu->src_start, alu->src_len);
shift = alu->shift_xlate_key;
imm = alu->imm;
switch (alu->opc) {
case ICE_ALU_PARK:
break;
case ICE_ALU_MOV_ADD:
dst = (src << shift) + imm;
ice_gpr_add(rt, alu->dst_reg_id, dst);
break;
case ICE_ALU_ADD:
dst += (src << shift) + imm;
ice_gpr_add(rt, alu->dst_reg_id, dst);
break;
case ICE_ALU_ORLT:
if (src < imm)
ice_dst_reg_bit_set(rt, alu, true);
ice_gpr_add(rt, ICE_GPR_NP_IDX, alu->branch_addr);
break;
case ICE_ALU_OREQ:
if (src == imm)
ice_dst_reg_bit_set(rt, alu, true);
ice_gpr_add(rt, ICE_GPR_NP_IDX, alu->branch_addr);
break;
case ICE_ALU_SETEQ:
ice_dst_reg_bit_set(rt, alu, src == imm);
ice_gpr_add(rt, ICE_GPR_NP_IDX, alu->branch_addr);
break;
case ICE_ALU_MOV_XOR:
dst = (src << shift) ^ imm;
ice_gpr_add(rt, alu->dst_reg_id, dst);
break;
default:
ice_debug(rt->psr->hw, ICE_DBG_PARSER, "Unsupported ALU instruction %d\n",
alu->opc);
break;
}
}
static void ice_alu0_exe(struct ice_parser_rt *rt)
{
ice_debug(rt->psr->hw, ICE_DBG_PARSER, "Executing ALU0 ...\n");
ice_alu_exe(rt, rt->alu0);
ice_debug(rt->psr->hw, ICE_DBG_PARSER, "Executing ALU0 done.\n");
}
static void ice_alu1_exe(struct ice_parser_rt *rt)
{
ice_debug(rt->psr->hw, ICE_DBG_PARSER, "Executing ALU1 ...\n");
ice_alu_exe(rt, rt->alu1);
ice_debug(rt->psr->hw, ICE_DBG_PARSER, "Executing ALU1 done.\n");
}
Annotation
- Immediate include surface: `ice_common.h`.
- Detected declarations: `function ice_rt_tsr_set`, `function ice_rt_ho_set`, `function ice_rt_np_set`, `function ice_rt_nn_set`, `function ice_rt_flag_set`, `function ice_rt_gpr_set`, `function ice_rt_err_set`, `function ice_parser_rt_reset`, `function ice_parser_rt_pktbuf_set`, `function ice_bst_key_init`.
- 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.