Lines Matching +full:cam +full:- +full:if
1 // SPDX-License-Identifier: GPL-2.0
12 * ice_parser_sect_item_get - parse an item from a section
27 if (!section) in ice_parser_sect_item_get()
73 if (index >= le16_to_cpu(hdr->count)) in ice_parser_sect_item_get()
80 * ice_parser_create_table - create an item table from a section
98 struct ice_seg *seg = hw->seg; in ice_parser_create_table()
102 if (!seg) in ice_parser_create_table()
103 return ERR_PTR(-EINVAL); in ice_parser_create_table()
106 if (!table) in ice_parser_create_table()
107 return ERR_PTR(-ENOMEM); in ice_parser_create_table()
113 if (data) { in ice_parser_create_table()
116 if (!no_offset) in ice_parser_create_table()
117 idx = le16_to_cpu(hdr->offset) + in ice_parser_create_table()
123 if (no_offset) in ice_parser_create_table()
137 dev_info(dev, "\talu0 = %d\n", bm->alu0); in ice_imem_bst_bm_dump()
138 dev_info(dev, "\talu1 = %d\n", bm->alu1); in ice_imem_bst_bm_dump()
139 dev_info(dev, "\talu2 = %d\n", bm->alu2); in ice_imem_bst_bm_dump()
140 dev_info(dev, "\tpg = %d\n", bm->pg); in ice_imem_bst_bm_dump()
149 dev_info(dev, "\tpriority = %d\n", kb->prio); in ice_imem_bst_kb_dump()
150 dev_info(dev, "\ttsr_ctrl = %d\n", kb->tsr_ctrl); in ice_imem_bst_kb_dump()
159 dev_info(dev, "\topc = %d\n", kb->opc); in ice_imem_np_kb_dump()
160 dev_info(dev, "\tstart_or_reg0 = %d\n", kb->start_reg0); in ice_imem_np_kb_dump()
161 dev_info(dev, "\tlen_or_reg1 = %d\n", kb->len_reg1); in ice_imem_np_kb_dump()
170 dev_info(dev, "\tflag0_ena = %d\n", kb->flag0_ena); in ice_imem_pg_kb_dump()
171 dev_info(dev, "\tflag1_ena = %d\n", kb->flag1_ena); in ice_imem_pg_kb_dump()
172 dev_info(dev, "\tflag2_ena = %d\n", kb->flag2_ena); in ice_imem_pg_kb_dump()
173 dev_info(dev, "\tflag3_ena = %d\n", kb->flag3_ena); in ice_imem_pg_kb_dump()
174 dev_info(dev, "\tflag0_idx = %d\n", kb->flag0_idx); in ice_imem_pg_kb_dump()
175 dev_info(dev, "\tflag1_idx = %d\n", kb->flag1_idx); in ice_imem_pg_kb_dump()
176 dev_info(dev, "\tflag2_idx = %d\n", kb->flag2_idx); in ice_imem_pg_kb_dump()
177 dev_info(dev, "\tflag3_idx = %d\n", kb->flag3_idx); in ice_imem_pg_kb_dump()
178 dev_info(dev, "\talu_reg_idx = %d\n", kb->alu_reg_idx); in ice_imem_pg_kb_dump()
187 dev_info(dev, "\topc = %d\n", alu->opc); in ice_imem_alu_dump()
188 dev_info(dev, "\tsrc_start = %d\n", alu->src_start); in ice_imem_alu_dump()
189 dev_info(dev, "\tsrc_len = %d\n", alu->src_len); in ice_imem_alu_dump()
190 dev_info(dev, "\tshift_xlate_sel = %d\n", alu->shift_xlate_sel); in ice_imem_alu_dump()
191 dev_info(dev, "\tshift_xlate_key = %d\n", alu->shift_xlate_key); in ice_imem_alu_dump()
192 dev_info(dev, "\tsrc_reg_id = %d\n", alu->src_reg_id); in ice_imem_alu_dump()
193 dev_info(dev, "\tdst_reg_id = %d\n", alu->dst_reg_id); in ice_imem_alu_dump()
194 dev_info(dev, "\tinc0 = %d\n", alu->inc0); in ice_imem_alu_dump()
195 dev_info(dev, "\tinc1 = %d\n", alu->inc1); in ice_imem_alu_dump()
196 dev_info(dev, "\tproto_offset_opc = %d\n", alu->proto_offset_opc); in ice_imem_alu_dump()
197 dev_info(dev, "\tproto_offset = %d\n", alu->proto_offset); in ice_imem_alu_dump()
198 dev_info(dev, "\tbranch_addr = %d\n", alu->branch_addr); in ice_imem_alu_dump()
199 dev_info(dev, "\timm = %d\n", alu->imm); in ice_imem_alu_dump()
200 dev_info(dev, "\tdst_start = %d\n", alu->dst_start); in ice_imem_alu_dump()
201 dev_info(dev, "\tdst_len = %d\n", alu->dst_len); in ice_imem_alu_dump()
202 dev_info(dev, "\tflags_extr_imm = %d\n", alu->flags_extr_imm); in ice_imem_alu_dump()
203 dev_info(dev, "\tflags_start_imm= %d\n", alu->flags_start_imm); in ice_imem_alu_dump()
207 * ice_imem_dump - dump an imem item info
215 dev_info(dev, "index = %d\n", item->idx); in ice_imem_dump()
216 ice_imem_bst_bm_dump(hw, &item->b_m); in ice_imem_dump()
217 ice_imem_bst_kb_dump(hw, &item->b_kb); in ice_imem_dump()
218 dev_info(dev, "pg priority = %d\n", item->pg_prio); in ice_imem_dump()
219 ice_imem_np_kb_dump(hw, &item->np_kb); in ice_imem_dump()
220 ice_imem_pg_kb_dump(hw, &item->pg_kb); in ice_imem_dump()
221 ice_imem_alu_dump(hw, &item->alu0, 0); in ice_imem_dump()
222 ice_imem_alu_dump(hw, &item->alu1, 1); in ice_imem_dump()
223 ice_imem_alu_dump(hw, &item->alu2, 2); in ice_imem_dump()
232 * ice_imem_bm_init - parse 4 bits of Boost Main
238 bm->alu0 = FIELD_GET(ICE_IM_BM_ALU0, data); in ice_imem_bm_init()
239 bm->alu1 = FIELD_GET(ICE_IM_BM_ALU1, data); in ice_imem_bm_init()
240 bm->alu2 = FIELD_GET(ICE_IM_BM_ALU2, data); in ice_imem_bm_init()
241 bm->pg = FIELD_GET(ICE_IM_BM_PG, data); in ice_imem_bm_init()
248 * ice_imem_bkb_init - parse 10 bits of Boost Main Build
254 bkb->prio = FIELD_GET(ICE_IM_BKB_PRIO, data); in ice_imem_bkb_init()
255 bkb->tsr_ctrl = FIELD_GET(ICE_IM_BKB_TSR_CTRL, data); in ice_imem_bkb_init()
263 * ice_imem_npkb_init - parse 18 bits of Next Protocol Key Build
269 kb->opc = FIELD_GET(ICE_IM_NPKB_OPC, data); in ice_imem_npkb_init()
270 kb->start_reg0 = FIELD_GET(ICE_IM_NPKB_S_R0, data); in ice_imem_npkb_init()
271 kb->len_reg1 = FIELD_GET(ICE_IM_NPKB_L_R1, data); in ice_imem_npkb_init()
285 * ice_imem_pgkb_init - parse 35 bits of Parse Graph Key Build
291 kb->flag0_ena = FIELD_GET(ICE_IM_PGKB_F0_ENA, data); in ice_imem_pgkb_init()
292 kb->flag0_idx = FIELD_GET(ICE_IM_PGKB_F0_IDX, data); in ice_imem_pgkb_init()
293 kb->flag1_ena = FIELD_GET(ICE_IM_PGKB_F1_ENA, data); in ice_imem_pgkb_init()
294 kb->flag1_idx = FIELD_GET(ICE_IM_PGKB_F1_IDX, data); in ice_imem_pgkb_init()
295 kb->flag2_ena = FIELD_GET(ICE_IM_PGKB_F2_ENA, data); in ice_imem_pgkb_init()
296 kb->flag2_idx = FIELD_GET(ICE_IM_PGKB_F2_IDX, data); in ice_imem_pgkb_init()
297 kb->flag3_ena = FIELD_GET(ICE_IM_PGKB_F3_ENA, data); in ice_imem_pgkb_init()
298 kb->flag3_idx = FIELD_GET(ICE_IM_PGKB_F3_IDX, data); in ice_imem_pgkb_init()
299 kb->alu_reg_idx = FIELD_GET(ICE_IM_PGKB_AR_IDX, data); in ice_imem_pgkb_init()
313 #define ICE_IM_ALU_BA_S 50 /* offset for the 2nd 64-bits field */
314 #define ICE_IM_ALU_BA GENMASK_ULL(57 - ICE_IM_ALU_BA_S, \
315 50 - ICE_IM_ALU_BA_S)
316 #define ICE_IM_ALU_IMM GENMASK_ULL(73 - ICE_IM_ALU_BA_S, \
317 58 - ICE_IM_ALU_BA_S)
318 #define ICE_IM_ALU_DFE BIT_ULL(74 - ICE_IM_ALU_BA_S)
319 #define ICE_IM_ALU_DS GENMASK_ULL(80 - ICE_IM_ALU_BA_S, \
320 75 - ICE_IM_ALU_BA_S)
321 #define ICE_IM_ALU_DL GENMASK_ULL(86 - ICE_IM_ALU_BA_S, \
322 81 - ICE_IM_ALU_BA_S)
323 #define ICE_IM_ALU_FEI BIT_ULL(87 - ICE_IM_ALU_BA_S)
324 #define ICE_IM_ALU_FSI GENMASK_ULL(95 - ICE_IM_ALU_BA_S, \
325 88 - ICE_IM_ALU_BA_S)
328 * ice_imem_alu_init - parse 96 bits of ALU entry
340 alu->opc = FIELD_GET(ICE_IM_ALU_OPC, d64); in ice_imem_alu_init()
341 alu->src_start = FIELD_GET(ICE_IM_ALU_SS, d64); in ice_imem_alu_init()
342 alu->src_len = FIELD_GET(ICE_IM_ALU_SL, d64); in ice_imem_alu_init()
343 alu->shift_xlate_sel = FIELD_GET(ICE_IM_ALU_SXS, d64); in ice_imem_alu_init()
344 alu->shift_xlate_key = FIELD_GET(ICE_IM_ALU_SXK, d64); in ice_imem_alu_init()
345 alu->src_reg_id = FIELD_GET(ICE_IM_ALU_SRID, d64); in ice_imem_alu_init()
346 alu->dst_reg_id = FIELD_GET(ICE_IM_ALU_DRID, d64); in ice_imem_alu_init()
347 alu->inc0 = FIELD_GET(ICE_IM_ALU_INC0, d64); in ice_imem_alu_init()
348 alu->inc1 = FIELD_GET(ICE_IM_ALU_INC1, d64); in ice_imem_alu_init()
349 alu->proto_offset_opc = FIELD_GET(ICE_IM_ALU_POO, d64); in ice_imem_alu_init()
350 alu->proto_offset = FIELD_GET(ICE_IM_ALU_PO, d64); in ice_imem_alu_init()
356 alu->branch_addr = FIELD_GET(ICE_IM_ALU_BA, d64); in ice_imem_alu_init()
357 alu->imm = FIELD_GET(ICE_IM_ALU_IMM, d64); in ice_imem_alu_init()
358 alu->dedicate_flags_ena = FIELD_GET(ICE_IM_ALU_DFE, d64); in ice_imem_alu_init()
359 alu->dst_start = FIELD_GET(ICE_IM_ALU_DS, d64); in ice_imem_alu_init()
360 alu->dst_len = FIELD_GET(ICE_IM_ALU_DL, d64); in ice_imem_alu_init()
361 alu->flags_extr_imm = FIELD_GET(ICE_IM_ALU_FEI, d64); in ice_imem_alu_init()
362 alu->flags_start_imm = FIELD_GET(ICE_IM_ALU_FSI, d64); in ice_imem_alu_init()
387 * ice_imem_parse_item - parse 384 bits of IMEM entry
400 ii->idx = idx; in ice_imem_parse_item()
402 ice_imem_bm_init(&ii->b_m, *(u8 *)buf); in ice_imem_parse_item()
403 ice_imem_bkb_init(&ii->b_kb, in ice_imem_parse_item()
407 ii->pg_prio = FIELD_GET(ICE_IMEM_PGP, *(u16 *)buf); in ice_imem_parse_item()
409 ice_imem_npkb_init(&ii->np_kb, in ice_imem_parse_item()
412 ice_imem_pgkb_init(&ii->pg_kb, in ice_imem_parse_item()
416 ice_imem_alu_init(&ii->alu0, in ice_imem_parse_item()
419 ice_imem_alu_init(&ii->alu1, in ice_imem_parse_item()
422 ice_imem_alu_init(&ii->alu2, in ice_imem_parse_item()
426 if (hw->debug_mask & ICE_DBG_PARSER) in ice_imem_parse_item()
431 * ice_imem_table_get - create an imem table
446 * ice_metainit_dump - dump an metainit item info
454 dev_info(dev, "index = %d\n", item->idx); in ice_metainit_dump()
456 dev_info(dev, "tsr = %d\n", item->tsr); in ice_metainit_dump()
457 dev_info(dev, "ho = %d\n", item->ho); in ice_metainit_dump()
458 dev_info(dev, "pc = %d\n", item->pc); in ice_metainit_dump()
459 dev_info(dev, "pg_rn = %d\n", item->pg_rn); in ice_metainit_dump()
460 dev_info(dev, "cd = %d\n", item->cd); in ice_metainit_dump()
462 dev_info(dev, "gpr_a_ctrl = %d\n", item->gpr_a_ctrl); in ice_metainit_dump()
463 dev_info(dev, "gpr_a_data_mdid = %d\n", item->gpr_a_data_mdid); in ice_metainit_dump()
464 dev_info(dev, "gpr_a_data_start = %d\n", item->gpr_a_data_start); in ice_metainit_dump()
465 dev_info(dev, "gpr_a_data_len = %d\n", item->gpr_a_data_len); in ice_metainit_dump()
466 dev_info(dev, "gpr_a_id = %d\n", item->gpr_a_id); in ice_metainit_dump()
468 dev_info(dev, "gpr_b_ctrl = %d\n", item->gpr_b_ctrl); in ice_metainit_dump()
469 dev_info(dev, "gpr_b_data_mdid = %d\n", item->gpr_b_data_mdid); in ice_metainit_dump()
470 dev_info(dev, "gpr_b_data_start = %d\n", item->gpr_b_data_start); in ice_metainit_dump()
471 dev_info(dev, "gpr_b_data_len = %d\n", item->gpr_b_data_len); in ice_metainit_dump()
472 dev_info(dev, "gpr_b_id = %d\n", item->gpr_b_id); in ice_metainit_dump()
474 dev_info(dev, "gpr_c_ctrl = %d\n", item->gpr_c_ctrl); in ice_metainit_dump()
475 dev_info(dev, "gpr_c_data_mdid = %d\n", item->gpr_c_data_mdid); in ice_metainit_dump()
476 dev_info(dev, "gpr_c_data_start = %d\n", item->gpr_c_data_start); in ice_metainit_dump()
477 dev_info(dev, "gpr_c_data_len = %d\n", item->gpr_c_data_len); in ice_metainit_dump()
478 dev_info(dev, "gpr_c_id = %d\n", item->gpr_c_id); in ice_metainit_dump()
480 dev_info(dev, "gpr_d_ctrl = %d\n", item->gpr_d_ctrl); in ice_metainit_dump()
481 dev_info(dev, "gpr_d_data_mdid = %d\n", item->gpr_d_data_mdid); in ice_metainit_dump()
482 dev_info(dev, "gpr_d_data_start = %d\n", item->gpr_d_data_start); in ice_metainit_dump()
483 dev_info(dev, "gpr_d_data_len = %d\n", item->gpr_d_data_len); in ice_metainit_dump()
484 dev_info(dev, "gpr_d_id = %d\n", item->gpr_d_id); in ice_metainit_dump()
486 dev_info(dev, "flags = 0x%llx\n", (unsigned long long)(item->flags)); in ice_metainit_dump()
500 #define ICE_MI_GBDM_S 61 /* offset for the 2nd 64-bits field */
505 GENMASK_ULL((high) - ICE_MI_GBDM_S, (low) - ICE_MI_GBDM_S)
510 #define ICE_MI_GCC BIT_ULL(81 - ICE_MI_GBDM_S)
515 #define ICE_MI_GDC BIT_ULL(102 - ICE_MI_GBDM_S)
520 #define ICE_MI_FLAG_S 123 /* offset for the 3rd 64-bits field */
523 #define ICE_MI_FLAG GENMASK_ULL(186 - ICE_MI_FLAG_S, \
524 123 - ICE_MI_FLAG_S)
527 * ice_metainit_parse_item - parse 192 bits of Metadata Init entry
541 mi->idx = idx; in ice_metainit_parse_item()
545 mi->tsr = FIELD_GET(ICE_MI_TSR, d64); in ice_metainit_parse_item()
546 mi->ho = FIELD_GET(ICE_MI_HO, d64); in ice_metainit_parse_item()
547 mi->pc = FIELD_GET(ICE_MI_PC, d64); in ice_metainit_parse_item()
548 mi->pg_rn = FIELD_GET(ICE_MI_PGRN, d64); in ice_metainit_parse_item()
549 mi->cd = FIELD_GET(ICE_MI_CD, d64); in ice_metainit_parse_item()
551 mi->gpr_a_ctrl = FIELD_GET(ICE_MI_GAC, d64); in ice_metainit_parse_item()
552 mi->gpr_a_data_mdid = FIELD_GET(ICE_MI_GADM, d64); in ice_metainit_parse_item()
553 mi->gpr_a_data_start = FIELD_GET(ICE_MI_GADS, d64); in ice_metainit_parse_item()
554 mi->gpr_a_data_len = FIELD_GET(ICE_MI_GADL, d64); in ice_metainit_parse_item()
555 mi->gpr_a_id = FIELD_GET(ICE_MI_GAI, d64); in ice_metainit_parse_item()
557 mi->gpr_b_ctrl = FIELD_GET(ICE_MI_GBC, d64); in ice_metainit_parse_item()
561 mi->gpr_b_data_mdid = FIELD_GET(ICE_MI_GBDM, d64); in ice_metainit_parse_item()
562 mi->gpr_b_data_start = FIELD_GET(ICE_MI_GBDS, d64); in ice_metainit_parse_item()
563 mi->gpr_b_data_len = FIELD_GET(ICE_MI_GBDL, d64); in ice_metainit_parse_item()
564 mi->gpr_b_id = FIELD_GET(ICE_MI_GBI, d64); in ice_metainit_parse_item()
566 mi->gpr_c_ctrl = FIELD_GET(ICE_MI_GCC, d64); in ice_metainit_parse_item()
567 mi->gpr_c_data_mdid = FIELD_GET(ICE_MI_GCDM, d64); in ice_metainit_parse_item()
568 mi->gpr_c_data_start = FIELD_GET(ICE_MI_GCDS, d64); in ice_metainit_parse_item()
569 mi->gpr_c_data_len = FIELD_GET(ICE_MI_GCDL, d64); in ice_metainit_parse_item()
570 mi->gpr_c_id = FIELD_GET(ICE_MI_GCI, d64); in ice_metainit_parse_item()
572 mi->gpr_d_ctrl = FIELD_GET(ICE_MI_GDC, d64); in ice_metainit_parse_item()
573 mi->gpr_d_data_mdid = FIELD_GET(ICE_MI_GDDM, d64); in ice_metainit_parse_item()
574 mi->gpr_d_data_start = FIELD_GET(ICE_MI_GDDS, d64); in ice_metainit_parse_item()
575 mi->gpr_d_data_len = FIELD_GET(ICE_MI_GDDL, d64); in ice_metainit_parse_item()
576 mi->gpr_d_id = FIELD_GET(ICE_MI_GDI, d64); in ice_metainit_parse_item()
580 mi->flags = FIELD_GET(ICE_MI_FLAG, d64); in ice_metainit_parse_item()
582 if (hw->debug_mask & ICE_DBG_PARSER) in ice_metainit_parse_item()
587 * ice_metainit_table_get - create a metainit table
601 * ice_bst_tcam_search - find a TCAM item with specific type
617 if (lbl_table[i].type == type) { in ice_bst_tcam_search()
634 dev_info(dev, "\tvalid = %d\n", key->valid); in ice_pg_cam_key_dump()
635 dev_info(dev, "\tnode_id = %d\n", key->node_id); in ice_pg_cam_key_dump()
636 dev_info(dev, "\tflag0 = %d\n", key->flag0); in ice_pg_cam_key_dump()
637 dev_info(dev, "\tflag1 = %d\n", key->flag1); in ice_pg_cam_key_dump()
638 dev_info(dev, "\tflag2 = %d\n", key->flag2); in ice_pg_cam_key_dump()
639 dev_info(dev, "\tflag3 = %d\n", key->flag3); in ice_pg_cam_key_dump()
640 dev_info(dev, "\tboost_idx = %d\n", key->boost_idx); in ice_pg_cam_key_dump()
641 dev_info(dev, "\talu_reg = 0x%04x\n", key->alu_reg); in ice_pg_cam_key_dump()
642 dev_info(dev, "\tnext_proto = 0x%08x\n", key->next_proto); in ice_pg_cam_key_dump()
651 dev_info(dev, "\tvalid = %d\n", key->valid); in ice_pg_nm_cam_key_dump()
652 dev_info(dev, "\tnode_id = %d\n", key->node_id); in ice_pg_nm_cam_key_dump()
653 dev_info(dev, "\tflag0 = %d\n", key->flag0); in ice_pg_nm_cam_key_dump()
654 dev_info(dev, "\tflag1 = %d\n", key->flag1); in ice_pg_nm_cam_key_dump()
655 dev_info(dev, "\tflag2 = %d\n", key->flag2); in ice_pg_nm_cam_key_dump()
656 dev_info(dev, "\tflag3 = %d\n", key->flag3); in ice_pg_nm_cam_key_dump()
657 dev_info(dev, "\tboost_idx = %d\n", key->boost_idx); in ice_pg_nm_cam_key_dump()
658 dev_info(dev, "\talu_reg = 0x%04x\n", key->alu_reg); in ice_pg_nm_cam_key_dump()
667 dev_info(dev, "\tnext_node = %d\n", action->next_node); in ice_pg_cam_action_dump()
668 dev_info(dev, "\tnext_pc = %d\n", action->next_pc); in ice_pg_cam_action_dump()
669 dev_info(dev, "\tis_pg = %d\n", action->is_pg); in ice_pg_cam_action_dump()
670 dev_info(dev, "\tproto_id = %d\n", action->proto_id); in ice_pg_cam_action_dump()
671 dev_info(dev, "\tis_mg = %d\n", action->is_mg); in ice_pg_cam_action_dump()
672 dev_info(dev, "\tmarker_id = %d\n", action->marker_id); in ice_pg_cam_action_dump()
673 dev_info(dev, "\tis_last_round = %d\n", action->is_last_round); in ice_pg_cam_action_dump()
674 dev_info(dev, "\tho_polarity = %d\n", action->ho_polarity); in ice_pg_cam_action_dump()
675 dev_info(dev, "\tho_inc = %d\n", action->ho_inc); in ice_pg_cam_action_dump()
679 * ice_pg_cam_dump - dump an parse graph cam info
681 * @item: parse graph cam to dump
685 dev_info(ice_hw_to_dev(hw), "index = %d\n", item->idx); in ice_pg_cam_dump()
686 ice_pg_cam_key_dump(hw, &item->key); in ice_pg_cam_dump()
687 ice_pg_cam_action_dump(hw, &item->action); in ice_pg_cam_dump()
691 * ice_pg_nm_cam_dump - dump an parse graph no match cam info
693 * @item: parse graph no match cam to dump
698 dev_info(ice_hw_to_dev(hw), "index = %d\n", item->idx); in ice_pg_nm_cam_dump()
699 ice_pg_nm_cam_key_dump(hw, &item->key); in ice_pg_nm_cam_dump()
700 ice_pg_cam_action_dump(hw, &item->action); in ice_pg_nm_cam_dump()
714 * ice_pg_cam_action_init - parse 55 bits of Parse Graph CAM Action
715 * @action: pointer to the Parse Graph CAM Action structure
716 * @data: Parse Graph CAM Action data to be parsed
720 action->next_node = FIELD_GET(ICE_PGCA_NN, data); in ice_pg_cam_action_init()
721 action->next_pc = FIELD_GET(ICE_PGCA_NPC, data); in ice_pg_cam_action_init()
722 action->is_pg = FIELD_GET(ICE_PGCA_IPG, data); in ice_pg_cam_action_init()
723 action->proto_id = FIELD_GET(ICE_PGCA_PID, data); in ice_pg_cam_action_init()
724 action->is_mg = FIELD_GET(ICE_PGCA_IMG, data); in ice_pg_cam_action_init()
725 action->marker_id = FIELD_GET(ICE_PGCA_MID, data); in ice_pg_cam_action_init()
726 action->is_last_round = FIELD_GET(ICE_PGCA_ILR, data); in ice_pg_cam_action_init()
727 action->ho_polarity = FIELD_GET(ICE_PGCA_HOP, data); in ice_pg_cam_action_init()
728 action->ho_inc = FIELD_GET(ICE_PGCA_HOI, data); in ice_pg_cam_action_init()
742 * ice_pg_nm_cam_key_init - parse 41 bits of Parse Graph NoMatch CAM Key
743 * @key: pointer to the Parse Graph NoMatch CAM Key structure
744 * @data: Parse Graph NoMatch CAM Key data to be parsed
748 key->valid = FIELD_GET(ICE_PGNCK_VLD, data); in ice_pg_nm_cam_key_init()
749 key->node_id = FIELD_GET(ICE_PGNCK_NID, data); in ice_pg_nm_cam_key_init()
750 key->flag0 = FIELD_GET(ICE_PGNCK_F0, data); in ice_pg_nm_cam_key_init()
751 key->flag1 = FIELD_GET(ICE_PGNCK_F1, data); in ice_pg_nm_cam_key_init()
752 key->flag2 = FIELD_GET(ICE_PGNCK_F2, data); in ice_pg_nm_cam_key_init()
753 key->flag3 = FIELD_GET(ICE_PGNCK_F3, data); in ice_pg_nm_cam_key_init()
755 if (FIELD_GET(ICE_PGNCK_BH, data)) in ice_pg_nm_cam_key_init()
756 key->boost_idx = FIELD_GET(ICE_PGNCK_BI, data); in ice_pg_nm_cam_key_init()
758 key->boost_idx = 0; in ice_pg_nm_cam_key_init()
760 key->alu_reg = FIELD_GET(ICE_PGNCK_AR, data); in ice_pg_nm_cam_key_init()
772 #define ICE_PGCK_NPK_S 41 /* offset for the 2nd 64-bits field */
775 #define ICE_PGCK_NPK GENMASK_ULL(72 - ICE_PGCK_NPK_S, \
776 41 - ICE_PGCK_NPK_S)
779 * ice_pg_cam_key_init - parse 73 bits of Parse Graph CAM Key
780 * @key: pointer to the Parse Graph CAM Key structure
781 * @data: Parse Graph CAM Key data to be parsed
787 key->valid = FIELD_GET(ICE_PGCK_VLD, d64); in ice_pg_cam_key_init()
788 key->node_id = FIELD_GET(ICE_PGCK_NID, d64); in ice_pg_cam_key_init()
789 key->flag0 = FIELD_GET(ICE_PGCK_F0, d64); in ice_pg_cam_key_init()
790 key->flag1 = FIELD_GET(ICE_PGCK_F1, d64); in ice_pg_cam_key_init()
791 key->flag2 = FIELD_GET(ICE_PGCK_F2, d64); in ice_pg_cam_key_init()
792 key->flag3 = FIELD_GET(ICE_PGCK_F3, d64); in ice_pg_cam_key_init()
794 if (FIELD_GET(ICE_PGCK_BH, d64)) in ice_pg_cam_key_init()
795 key->boost_idx = FIELD_GET(ICE_PGCK_BI, d64); in ice_pg_cam_key_init()
797 key->boost_idx = 0; in ice_pg_cam_key_init()
799 key->alu_reg = FIELD_GET(ICE_PGCK_AR, d64); in ice_pg_cam_key_init()
803 key->next_proto = FIELD_GET(ICE_PGCK_NPK, d64); in ice_pg_cam_key_init()
811 * ice_pg_cam_parse_item - parse 128 bits of Parse Graph CAM Entry
813 * @idx: index of Parse Graph CAM Entry
814 * @item: item of Parse Graph CAM Entry
815 * @data: Parse Graph CAM Entry data to be parsed
816 * @size: size of Parse Graph CAM Entry
825 ci->idx = idx; in ice_pg_cam_parse_item()
827 ice_pg_cam_key_init(&ci->key, buf); in ice_pg_cam_parse_item()
830 ice_pg_cam_action_init(&ci->action, d64); in ice_pg_cam_parse_item()
832 if (hw->debug_mask & ICE_DBG_PARSER) in ice_pg_cam_parse_item()
840 * ice_pg_sp_cam_parse_item - parse 136 bits of Parse Graph Spill CAM Entry
842 * @idx: index of Parse Graph Spill CAM Entry
843 * @item: item of Parse Graph Spill CAM Entry
844 * @data: Parse Graph Spill CAM Entry data to be parsed
845 * @size: size of Parse Graph Spill CAM Entry
854 ci->idx = idx; in ice_pg_sp_cam_parse_item()
857 ice_pg_cam_action_init(&ci->action, d64); in ice_pg_sp_cam_parse_item()
859 ice_pg_cam_key_init(&ci->key, &buf[ICE_PG_SP_CAM_KEY_IDD]); in ice_pg_sp_cam_parse_item()
861 if (hw->debug_mask & ICE_DBG_PARSER) in ice_pg_sp_cam_parse_item()
870 * ice_pg_nm_cam_parse_item - parse 96 bits of Parse Graph NoMatch CAM Entry
872 * @idx: index of Parse Graph NoMatch CAM Entry
873 * @item: item of Parse Graph NoMatch CAM Entry
874 * @data: Parse Graph NoMatch CAM Entry data to be parsed
875 * @size: size of Parse Graph NoMatch CAM Entry
884 ci->idx = idx; in ice_pg_nm_cam_parse_item()
887 ice_pg_nm_cam_key_init(&ci->key, d64); in ice_pg_nm_cam_parse_item()
890 ice_pg_cam_action_init(&ci->action, d64); in ice_pg_nm_cam_parse_item()
892 if (hw->debug_mask & ICE_DBG_PARSER) in ice_pg_nm_cam_parse_item()
901 * ice_pg_nm_sp_cam_parse_item - parse 104 bits of Parse Graph NoMatch Spill
902 * CAM Entry
904 * @idx: index of Parse Graph NoMatch Spill CAM Entry
905 * @item: item of Parse Graph NoMatch Spill CAM Entry
906 * @data: Parse Graph NoMatch Spill CAM Entry data to be parsed
907 * @size: size of Parse Graph NoMatch Spill CAM Entry
917 ci->idx = idx; in ice_pg_nm_sp_cam_parse_item()
920 ice_pg_cam_action_init(&ci->action, d64); in ice_pg_nm_sp_cam_parse_item()
924 ice_pg_nm_cam_key_init(&ci->key, d64); in ice_pg_nm_sp_cam_parse_item()
926 if (hw->debug_mask & ICE_DBG_PARSER) in ice_pg_nm_sp_cam_parse_item()
931 * ice_pg_cam_table_get - create a parse graph cam table
934 * Return: a pointer to the allocated Parse Graph CAM table.
945 * ice_pg_sp_cam_table_get - create a parse graph spill cam table
948 * Return: a pointer to the allocated Parse Graph Spill CAM table.
959 * ice_pg_nm_cam_table_get - create a parse graph no match cam table
962 * Return: a pointer to the allocated Parse Graph No Match CAM table.
973 * ice_pg_nm_sp_cam_table_get - create a parse graph no match spill cam table
976 * Return: a pointer to the allocated Parse Graph No Match Spill CAM table.
989 return (item->key.valid && in __ice_pg_cam_match()
990 !memcmp(&item->key.val, &key->val, sizeof(key->val))); in __ice_pg_cam_match()
996 return (item->key.valid && in __ice_pg_nm_cam_match()
997 !memcmp(&item->key.val, &key->val, sizeof(item->key.val))); in __ice_pg_nm_cam_match()
1001 * ice_pg_cam_match - search parse graph cam table by key
1002 * @table: parse graph cam table to search
1003 * @size: cam table size
1006 * Return: a pointer to the matching PG CAM item or NULL.
1016 if (__ice_pg_cam_match(item, key)) in ice_pg_cam_match()
1024 * ice_pg_nm_cam_match - search parse graph no match cam table by key
1025 * @table: parse graph no match cam table to search
1026 * @size: cam table size
1029 * Return: a pointer to the matching PG No Match CAM item or NULL.
1040 if (__ice_pg_nm_cam_match(item, key)) in ice_pg_nm_cam_match()
1048 /* Perform a ternary match on a 1-byte pattern (@pat) given @key and @key_inv
1055 * Return: true if all bits match, false otherwise.
1067 if (bit_key != 0 && bit_key_inv != 0) in ice_ternary_match_byte()
1070 if ((bit_key == 0 && bit_key_inv == 0) || bit_key == bit_pat) in ice_ternary_match_byte()
1083 if (!ice_ternary_match_byte(key[i], key_inv[i], pat[i])) in ice_ternary_match()
1095 dev_info(dev, "\topc = %d\n", kb->opc); in ice_bst_np_kb_dump()
1096 dev_info(dev, "\tstart_reg0 = %d\n", kb->start_reg0); in ice_bst_np_kb_dump()
1097 dev_info(dev, "\tlen_reg1 = %d\n", kb->len_reg1); in ice_bst_np_kb_dump()
1105 dev_info(dev, "\tflag0_ena = %d\n", kb->flag0_ena); in ice_bst_pg_kb_dump()
1106 dev_info(dev, "\tflag1_ena = %d\n", kb->flag1_ena); in ice_bst_pg_kb_dump()
1107 dev_info(dev, "\tflag2_ena = %d\n", kb->flag2_ena); in ice_bst_pg_kb_dump()
1108 dev_info(dev, "\tflag3_ena = %d\n", kb->flag3_ena); in ice_bst_pg_kb_dump()
1109 dev_info(dev, "\tflag0_idx = %d\n", kb->flag0_idx); in ice_bst_pg_kb_dump()
1110 dev_info(dev, "\tflag1_idx = %d\n", kb->flag1_idx); in ice_bst_pg_kb_dump()
1111 dev_info(dev, "\tflag2_idx = %d\n", kb->flag2_idx); in ice_bst_pg_kb_dump()
1112 dev_info(dev, "\tflag3_idx = %d\n", kb->flag3_idx); in ice_bst_pg_kb_dump()
1113 dev_info(dev, "\talu_reg_idx = %d\n", kb->alu_reg_idx); in ice_bst_pg_kb_dump()
1121 dev_info(dev, "\topc = %d\n", alu->opc); in ice_bst_alu_dump()
1122 dev_info(dev, "\tsrc_start = %d\n", alu->src_start); in ice_bst_alu_dump()
1123 dev_info(dev, "\tsrc_len = %d\n", alu->src_len); in ice_bst_alu_dump()
1124 dev_info(dev, "\tshift_xlate_sel = %d\n", alu->shift_xlate_sel); in ice_bst_alu_dump()
1125 dev_info(dev, "\tshift_xlate_key = %d\n", alu->shift_xlate_key); in ice_bst_alu_dump()
1126 dev_info(dev, "\tsrc_reg_id = %d\n", alu->src_reg_id); in ice_bst_alu_dump()
1127 dev_info(dev, "\tdst_reg_id = %d\n", alu->dst_reg_id); in ice_bst_alu_dump()
1128 dev_info(dev, "\tinc0 = %d\n", alu->inc0); in ice_bst_alu_dump()
1129 dev_info(dev, "\tinc1 = %d\n", alu->inc1); in ice_bst_alu_dump()
1130 dev_info(dev, "\tproto_offset_opc = %d\n", alu->proto_offset_opc); in ice_bst_alu_dump()
1131 dev_info(dev, "\tproto_offset = %d\n", alu->proto_offset); in ice_bst_alu_dump()
1132 dev_info(dev, "\tbranch_addr = %d\n", alu->branch_addr); in ice_bst_alu_dump()
1133 dev_info(dev, "\timm = %d\n", alu->imm); in ice_bst_alu_dump()
1134 dev_info(dev, "\tdst_start = %d\n", alu->dst_start); in ice_bst_alu_dump()
1135 dev_info(dev, "\tdst_len = %d\n", alu->dst_len); in ice_bst_alu_dump()
1136 dev_info(dev, "\tflags_extr_imm = %d\n", alu->flags_extr_imm); in ice_bst_alu_dump()
1137 dev_info(dev, "\tflags_start_imm= %d\n", alu->flags_start_imm); in ice_bst_alu_dump()
1141 * ice_bst_tcam_dump - dump a boost tcam info
1150 dev_info(dev, "addr = %d\n", item->addr); in ice_bst_tcam_dump()
1154 dev_info(dev, "%02x ", item->key[i]); in ice_bst_tcam_dump()
1160 dev_info(dev, "%02x ", item->key_inv[i]); in ice_bst_tcam_dump()
1164 dev_info(dev, "hit_idx_grp = %d\n", item->hit_idx_grp); in ice_bst_tcam_dump()
1165 dev_info(dev, "pg_prio = %d\n", item->pg_prio); in ice_bst_tcam_dump()
1167 ice_bst_np_kb_dump(hw, &item->np_kb); in ice_bst_tcam_dump()
1168 ice_bst_pg_kb_dump(hw, &item->pg_kb); in ice_bst_tcam_dump()
1170 ice_bst_alu_dump(hw, &item->alu0, ICE_ALU0_IDX); in ice_bst_tcam_dump()
1171 ice_bst_alu_dump(hw, &item->alu1, ICE_ALU1_IDX); in ice_bst_tcam_dump()
1172 ice_bst_alu_dump(hw, &item->alu2, ICE_ALU2_IDX); in ice_bst_tcam_dump()
1179 dev_info(dev, "index = %u\n", item->idx); in ice_lbl_dump()
1180 dev_info(dev, "type = %u\n", item->type); in ice_lbl_dump()
1181 dev_info(dev, "label = %s\n", item->label); in ice_lbl_dump()
1195 #define ICE_BST_ALU_BA_S 50 /* offset for the 2nd 64-bits field */
1196 #define ICE_BST_ALU_BA GENMASK_ULL(57 - ICE_BST_ALU_BA_S, \
1197 50 - ICE_BST_ALU_BA_S)
1198 #define ICE_BST_ALU_IMM GENMASK_ULL(73 - ICE_BST_ALU_BA_S, \
1199 58 - ICE_BST_ALU_BA_S)
1200 #define ICE_BST_ALU_DFE BIT_ULL(74 - ICE_BST_ALU_BA_S)
1201 #define ICE_BST_ALU_DS GENMASK_ULL(80 - ICE_BST_ALU_BA_S, \
1202 75 - ICE_BST_ALU_BA_S)
1203 #define ICE_BST_ALU_DL GENMASK_ULL(86 - ICE_BST_ALU_BA_S, \
1204 81 - ICE_BST_ALU_BA_S)
1205 #define ICE_BST_ALU_FEI BIT_ULL(87 - ICE_BST_ALU_BA_S)
1206 #define ICE_BST_ALU_FSI GENMASK_ULL(95 - ICE_BST_ALU_BA_S, \
1207 88 - ICE_BST_ALU_BA_S)
1210 * ice_bst_alu_init - parse 96 bits of ALU entry
1222 alu->opc = FIELD_GET(ICE_BST_ALU_OPC, d64); in ice_bst_alu_init()
1223 alu->src_start = FIELD_GET(ICE_BST_ALU_SS, d64); in ice_bst_alu_init()
1224 alu->src_len = FIELD_GET(ICE_BST_ALU_SL, d64); in ice_bst_alu_init()
1225 alu->shift_xlate_sel = FIELD_GET(ICE_BST_ALU_SXS, d64); in ice_bst_alu_init()
1226 alu->shift_xlate_key = FIELD_GET(ICE_BST_ALU_SXK, d64); in ice_bst_alu_init()
1227 alu->src_reg_id = FIELD_GET(ICE_BST_ALU_SRID, d64); in ice_bst_alu_init()
1228 alu->dst_reg_id = FIELD_GET(ICE_BST_ALU_DRID, d64); in ice_bst_alu_init()
1229 alu->inc0 = FIELD_GET(ICE_BST_ALU_INC0, d64); in ice_bst_alu_init()
1230 alu->inc1 = FIELD_GET(ICE_BST_ALU_INC1, d64); in ice_bst_alu_init()
1231 alu->proto_offset_opc = FIELD_GET(ICE_BST_ALU_POO, d64); in ice_bst_alu_init()
1232 alu->proto_offset = FIELD_GET(ICE_BST_ALU_PO, d64); in ice_bst_alu_init()
1238 alu->branch_addr = FIELD_GET(ICE_BST_ALU_BA, d64); in ice_bst_alu_init()
1239 alu->imm = FIELD_GET(ICE_BST_ALU_IMM, d64); in ice_bst_alu_init()
1240 alu->dedicate_flags_ena = FIELD_GET(ICE_BST_ALU_DFE, d64); in ice_bst_alu_init()
1241 alu->dst_start = FIELD_GET(ICE_BST_ALU_DS, d64); in ice_bst_alu_init()
1242 alu->dst_len = FIELD_GET(ICE_BST_ALU_DL, d64); in ice_bst_alu_init()
1243 alu->flags_extr_imm = FIELD_GET(ICE_BST_ALU_FEI, d64); in ice_bst_alu_init()
1244 alu->flags_start_imm = FIELD_GET(ICE_BST_ALU_FSI, d64); in ice_bst_alu_init()
1258 * ice_bst_pgkb_init - parse 35 bits of Parse Graph Key Build
1264 kb->flag0_ena = FIELD_GET(ICE_BST_PGKB_F0_ENA, data); in ice_bst_pgkb_init()
1265 kb->flag0_idx = FIELD_GET(ICE_BST_PGKB_F0_IDX, data); in ice_bst_pgkb_init()
1266 kb->flag1_ena = FIELD_GET(ICE_BST_PGKB_F1_ENA, data); in ice_bst_pgkb_init()
1267 kb->flag1_idx = FIELD_GET(ICE_BST_PGKB_F1_IDX, data); in ice_bst_pgkb_init()
1268 kb->flag2_ena = FIELD_GET(ICE_BST_PGKB_F2_ENA, data); in ice_bst_pgkb_init()
1269 kb->flag2_idx = FIELD_GET(ICE_BST_PGKB_F2_IDX, data); in ice_bst_pgkb_init()
1270 kb->flag3_ena = FIELD_GET(ICE_BST_PGKB_F3_ENA, data); in ice_bst_pgkb_init()
1271 kb->flag3_idx = FIELD_GET(ICE_BST_PGKB_F3_IDX, data); in ice_bst_pgkb_init()
1272 kb->alu_reg_idx = FIELD_GET(ICE_BST_PGKB_AR_IDX, data); in ice_bst_pgkb_init()
1280 * ice_bst_npkb_init - parse 18 bits of Next Protocol Key Build
1286 kb->opc = FIELD_GET(ICE_BST_NPKB_OPC, data); in ice_bst_npkb_init()
1287 kb->start_reg0 = FIELD_GET(ICE_BST_NPKB_S_R0, data); in ice_bst_npkb_init()
1288 kb->len_reg1 = FIELD_GET(ICE_BST_NPKB_L_R1, data); in ice_bst_npkb_init()
1299 #define ICE_BT_PGP_M GENMASK(361 - ICE_BT_PGP_S, 360 - ICE_BT_PGP_S)
1317 * ice_bst_parse_item - parse 704 bits of Boost TCAM entry
1331 ti->addr = *(u16 *)buf; in ice_bst_parse_item()
1334 ti->key[i] = buf[ICE_BT_KEY_IDD + i]; in ice_bst_parse_item()
1335 ti->key_inv[i] = buf[ICE_BT_KIV_IDD + i]; in ice_bst_parse_item()
1337 ti->hit_idx_grp = buf[ICE_BT_HIG_IDD]; in ice_bst_parse_item()
1338 ti->pg_prio = buf[ICE_BT_PGP_IDD] & ICE_BT_PGP_M; in ice_bst_parse_item()
1340 ice_bst_npkb_init(&ti->np_kb, in ice_bst_parse_item()
1343 ice_bst_pgkb_init(&ti->pg_kb, in ice_bst_parse_item()
1347 ice_bst_alu_init(&ti->alu0, &buf[ICE_BT_ALU0_IDD], ICE_BT_ALU0_OFF); in ice_bst_parse_item()
1348 ice_bst_alu_init(&ti->alu1, &buf[ICE_BT_ALU1_IDD], ICE_BT_ALU1_OFF); in ice_bst_parse_item()
1349 ice_bst_alu_init(&ti->alu2, &buf[ICE_BT_ALU2_IDD], ICE_BT_ALU2_OFF); in ice_bst_parse_item()
1351 if (hw->debug_mask & ICE_DBG_PARSER) in ice_bst_parse_item()
1356 * ice_bst_tcam_table_get - create a boost tcam table
1375 lbl_item->idx = lbl_data->idx; in ice_parse_lbl_item()
1376 memcpy(lbl_item->label, lbl_data->label, sizeof(lbl_item->label)); in ice_parse_lbl_item()
1378 if (strstarts(lbl_item->label, ICE_LBL_BST_DVM)) in ice_parse_lbl_item()
1379 lbl_item->type = ICE_LBL_BST_TYPE_DVM; in ice_parse_lbl_item()
1380 else if (strstarts(lbl_item->label, ICE_LBL_BST_SVM)) in ice_parse_lbl_item()
1381 lbl_item->type = ICE_LBL_BST_TYPE_SVM; in ice_parse_lbl_item()
1382 else if (strstarts(lbl_item->label, ICE_LBL_TNL_VXLAN)) in ice_parse_lbl_item()
1383 lbl_item->type = ICE_LBL_BST_TYPE_VXLAN; in ice_parse_lbl_item()
1384 else if (strstarts(lbl_item->label, ICE_LBL_TNL_GENEVE)) in ice_parse_lbl_item()
1385 lbl_item->type = ICE_LBL_BST_TYPE_GENEVE; in ice_parse_lbl_item()
1386 else if (strstarts(lbl_item->label, ICE_LBL_TNL_UDP_ECPRI)) in ice_parse_lbl_item()
1387 lbl_item->type = ICE_LBL_BST_TYPE_UDP_ECPRI; in ice_parse_lbl_item()
1389 if (hw->debug_mask & ICE_DBG_PARSER) in ice_parse_lbl_item()
1394 * ice_bst_lbl_table_get - create a boost label table
1408 * ice_bst_tcam_match - match a pattern on the boost tcam table
1422 if (item->hit_idx_grp == 0) in ice_bst_tcam_match()
1424 if (ice_ternary_match(item->key, item->key_inv, pat, in ice_bst_tcam_match()
1434 * ice_ptype_mk_tcam_dump - dump an ptype marker tcam info
1444 dev_info(dev, "address = %d\n", item->address); in ice_ptype_mk_tcam_dump()
1445 dev_info(dev, "ptype = %d\n", item->ptype); in ice_ptype_mk_tcam_dump()
1449 dev_info(dev, "%02x ", item->key[i]); in ice_ptype_mk_tcam_dump()
1455 dev_info(dev, "%02x ", item->key_inv[i]); in ice_ptype_mk_tcam_dump()
1465 if (hw->debug_mask & ICE_DBG_PARSER) in ice_parse_ptype_mk_tcam_item()
1471 * ice_ptype_mk_tcam_table_get - create a ptype marker tcam table
1486 * ice_ptype_mk_tcam_match - match a pattern on a ptype marker tcam table
1502 if (ice_ternary_match(item->key, item->key_inv, pat, len)) in ice_ptype_mk_tcam_match()
1511 * ice_mk_grp_dump - dump an marker group item info
1520 dev_info(dev, "index = %d\n", item->idx); in ice_mk_grp_dump()
1524 dev_info(dev, "%d ", item->markers[i]); in ice_mk_grp_dump()
1536 grp->idx = idx; in ice_mk_grp_parse_item()
1539 grp->markers[i] = buf[i]; in ice_mk_grp_parse_item()
1541 if (hw->debug_mask & ICE_DBG_PARSER) in ice_mk_grp_parse_item()
1546 * ice_mk_grp_table_get - create a marker group table
1566 dev_info(dev, "\tpolarity = %d\n", po->polarity); in ice_proto_off_dump()
1567 dev_info(dev, "\tproto_id = %d\n", po->proto_id); in ice_proto_off_dump()
1568 dev_info(dev, "\toffset = %d\n", po->offset); in ice_proto_off_dump()
1572 * ice_proto_grp_dump - dump a proto group item info
1581 dev_info(ice_hw_to_dev(hw), "index = %d\n", item->idx); in ice_proto_grp_dump()
1584 ice_proto_off_dump(hw, &item->po[i], i); in ice_proto_grp_dump()
1592 * ice_proto_off_parse - parse 22 bits of Protocol entry
1598 po->polarity = FIELD_GET(ICE_PO_POL, data); in ice_proto_off_parse()
1599 po->proto_id = FIELD_GET(ICE_PO_PID, data); in ice_proto_off_parse()
1600 po->offset = FIELD_GET(ICE_PO_OFF, data); in ice_proto_off_parse()
1604 * ice_proto_grp_parse_item - parse 192 bits of Protocol Group Table entry
1620 grp->idx = idx; in ice_proto_grp_parse_item()
1626 ice_proto_off_parse(&grp->po[i], d32); in ice_proto_grp_parse_item()
1629 if (hw->debug_mask & ICE_DBG_PARSER) in ice_proto_grp_parse_item()
1634 * ice_proto_grp_table_get - create a proto group table
1649 * ice_flg_rd_dump - dump a flag redirect item info
1657 dev_info(dev, "index = %d\n", item->idx); in ice_flg_rd_dump()
1658 dev_info(dev, "expose = %d\n", item->expose); in ice_flg_rd_dump()
1659 dev_info(dev, "intr_flg_id = %d\n", item->intr_flg_id); in ice_flg_rd_dump()
1666 * ice_flg_rd_parse_item - parse 8 bits of Flag Redirect Table entry
1679 rdi->idx = idx; in ice_flg_rd_parse_item()
1680 rdi->expose = FIELD_GET(ICE_FRT_EXPO, d8); in ice_flg_rd_parse_item()
1681 rdi->intr_flg_id = FIELD_GET(ICE_FRT_IFID, d8); in ice_flg_rd_parse_item()
1683 if (hw->debug_mask & ICE_DBG_PARSER) in ice_flg_rd_parse_item()
1688 * ice_flg_rd_table_get - create a flag redirect table
1702 * ice_flg_redirect - redirect a parser flag to packet flag
1706 * Return: flag or 0 if @psr_flag = 0.
1716 if (!item->expose) in ice_flg_redirect()
1719 if (psr_flg & BIT(item->intr_flg_id)) in ice_flg_redirect()
1736 dev_info(dev, "\txlt1_ad_sel = %d\n", entry->xlt1_ad_sel); in ice_xlt_kb_entry_dump()
1737 dev_info(dev, "\txlt2_ad_sel = %d\n", entry->xlt2_ad_sel); in ice_xlt_kb_entry_dump()
1740 dev_info(dev, "\tflg%d_sel = %d\n", i, entry->flg0_14_sel[i]); in ice_xlt_kb_entry_dump()
1742 dev_info(dev, "\txlt1_md_sel = %d\n", entry->xlt1_md_sel); in ice_xlt_kb_entry_dump()
1743 dev_info(dev, "\txlt2_md_sel = %d\n", entry->xlt2_md_sel); in ice_xlt_kb_entry_dump()
1747 * ice_xlt_kb_dump - dump a xlt key build info
1756 dev_info(dev, "xlt1_pm = %d\n", kb->xlt1_pm); in ice_xlt_kb_dump()
1757 dev_info(dev, "xlt2_pm = %d\n", kb->xlt2_pm); in ice_xlt_kb_dump()
1758 dev_info(dev, "prof_id_pm = %d\n", kb->prof_id_pm); in ice_xlt_kb_dump()
1759 dev_info(dev, "flag15 lo = 0x%08x\n", (u32)kb->flag15); in ice_xlt_kb_dump()
1761 (u32)(kb->flag15 >> (sizeof(u32) * BITS_PER_BYTE))); in ice_xlt_kb_dump()
1764 ice_xlt_kb_entry_dump(hw, &kb->entries[i], i); in ice_xlt_kb_dump()
1767 #define ICE_XLT_KB_X1AS_S 32 /* offset for the 1st 64-bits field */
1770 #define ICE_XLT_KB_X1AS GENMASK_ULL(34 - ICE_XLT_KB_X1AS_S, \
1771 32 - ICE_XLT_KB_X1AS_S)
1772 #define ICE_XLT_KB_X2AS GENMASK_ULL(37 - ICE_XLT_KB_X1AS_S, \
1773 35 - ICE_XLT_KB_X1AS_S)
1774 #define ICE_XLT_KB_FL00 GENMASK_ULL(46 - ICE_XLT_KB_X1AS_S, \
1775 38 - ICE_XLT_KB_X1AS_S)
1776 #define ICE_XLT_KB_FL01 GENMASK_ULL(55 - ICE_XLT_KB_X1AS_S, \
1777 47 - ICE_XLT_KB_X1AS_S)
1778 #define ICE_XLT_KB_FL02 GENMASK_ULL(64 - ICE_XLT_KB_X1AS_S, \
1779 56 - ICE_XLT_KB_X1AS_S)
1780 #define ICE_XLT_KB_FL03 GENMASK_ULL(73 - ICE_XLT_KB_X1AS_S, \
1781 65 - ICE_XLT_KB_X1AS_S)
1782 #define ICE_XLT_KB_FL04 GENMASK_ULL(82 - ICE_XLT_KB_X1AS_S, \
1783 74 - ICE_XLT_KB_X1AS_S)
1784 #define ICE_XLT_KB_FL05 GENMASK_ULL(91 - ICE_XLT_KB_X1AS_S, \
1785 83 - ICE_XLT_KB_X1AS_S)
1786 #define ICE_XLT_KB_FL06_S 92 /* offset for the 2nd 64-bits field */
1789 #define ICE_XLT_KB_FL06 GENMASK_ULL(100 - ICE_XLT_KB_FL06_S, \
1790 92 - ICE_XLT_KB_FL06_S)
1791 #define ICE_XLT_KB_FL07 GENMASK_ULL(109 - ICE_XLT_KB_FL06_S, \
1792 101 - ICE_XLT_KB_FL06_S)
1793 #define ICE_XLT_KB_FL08 GENMASK_ULL(118 - ICE_XLT_KB_FL06_S, \
1794 110 - ICE_XLT_KB_FL06_S)
1795 #define ICE_XLT_KB_FL09 GENMASK_ULL(127 - ICE_XLT_KB_FL06_S, \
1796 119 - ICE_XLT_KB_FL06_S)
1797 #define ICE_XLT_KB_FL10 GENMASK_ULL(136 - ICE_XLT_KB_FL06_S, \
1798 128 - ICE_XLT_KB_FL06_S)
1799 #define ICE_XLT_KB_FL11 GENMASK_ULL(145 - ICE_XLT_KB_FL06_S, \
1800 137 - ICE_XLT_KB_FL06_S)
1801 #define ICE_XLT_KB_FL12_S 146 /* offset for the 3rd 64-bits field */
1804 #define ICE_XLT_KB_FL12 GENMASK_ULL(154 - ICE_XLT_KB_FL12_S, \
1805 146 - ICE_XLT_KB_FL12_S)
1806 #define ICE_XLT_KB_FL13 GENMASK_ULL(163 - ICE_XLT_KB_FL12_S, \
1807 155 - ICE_XLT_KB_FL12_S)
1808 #define ICE_XLT_KB_FL14 GENMASK_ULL(181 - ICE_XLT_KB_FL12_S, \
1809 164 - ICE_XLT_KB_FL12_S)
1810 #define ICE_XLT_KB_X1MS GENMASK_ULL(186 - ICE_XLT_KB_FL12_S, \
1811 182 - ICE_XLT_KB_FL12_S)
1812 #define ICE_XLT_KB_X2MS GENMASK_ULL(191 - ICE_XLT_KB_FL12_S, \
1813 187 - ICE_XLT_KB_FL12_S)
1816 * ice_kb_entry_init - parse 192 bits of XLT Key Builder entry
1827 entry->xlt1_ad_sel = FIELD_GET(ICE_XLT_KB_X1AS, d64); in ice_kb_entry_init()
1828 entry->xlt2_ad_sel = FIELD_GET(ICE_XLT_KB_X2AS, d64); in ice_kb_entry_init()
1830 entry->flg0_14_sel[i++] = FIELD_GET(ICE_XLT_KB_FL00, d64); in ice_kb_entry_init()
1831 entry->flg0_14_sel[i++] = FIELD_GET(ICE_XLT_KB_FL01, d64); in ice_kb_entry_init()
1832 entry->flg0_14_sel[i++] = FIELD_GET(ICE_XLT_KB_FL02, d64); in ice_kb_entry_init()
1833 entry->flg0_14_sel[i++] = FIELD_GET(ICE_XLT_KB_FL03, d64); in ice_kb_entry_init()
1834 entry->flg0_14_sel[i++] = FIELD_GET(ICE_XLT_KB_FL04, d64); in ice_kb_entry_init()
1835 entry->flg0_14_sel[i++] = FIELD_GET(ICE_XLT_KB_FL05, d64); in ice_kb_entry_init()
1839 entry->flg0_14_sel[i++] = FIELD_GET(ICE_XLT_KB_FL06, d64); in ice_kb_entry_init()
1840 entry->flg0_14_sel[i++] = FIELD_GET(ICE_XLT_KB_FL07, d64); in ice_kb_entry_init()
1841 entry->flg0_14_sel[i++] = FIELD_GET(ICE_XLT_KB_FL08, d64); in ice_kb_entry_init()
1842 entry->flg0_14_sel[i++] = FIELD_GET(ICE_XLT_KB_FL09, d64); in ice_kb_entry_init()
1843 entry->flg0_14_sel[i++] = FIELD_GET(ICE_XLT_KB_FL10, d64); in ice_kb_entry_init()
1844 entry->flg0_14_sel[i++] = FIELD_GET(ICE_XLT_KB_FL11, d64); in ice_kb_entry_init()
1848 entry->flg0_14_sel[i++] = FIELD_GET(ICE_XLT_KB_FL12, d64); in ice_kb_entry_init()
1849 entry->flg0_14_sel[i++] = FIELD_GET(ICE_XLT_KB_FL13, d64); in ice_kb_entry_init()
1850 entry->flg0_14_sel[i] = FIELD_GET(ICE_XLT_KB_FL14, d64); in ice_kb_entry_init()
1852 entry->xlt1_md_sel = FIELD_GET(ICE_XLT_KB_X1MS, d64); in ice_kb_entry_init()
1853 entry->xlt2_md_sel = FIELD_GET(ICE_XLT_KB_X2MS, d64); in ice_kb_entry_init()
1863 * ice_parse_kb_data - parse 204 bits of XLT Key Build Table
1874 kb->xlt1_pm = buf[ICE_XLT_KB_X1PM_OFF]; in ice_parse_kb_data()
1875 kb->xlt2_pm = buf[ICE_XLT_KB_X2PM_OFF]; in ice_parse_kb_data()
1876 kb->prof_id_pm = buf[ICE_XLT_KB_PIPM_OFF]; in ice_parse_kb_data()
1878 kb->flag15 = *(u64 *)&buf[ICE_XLT_KB_FL15_OFF]; in ice_parse_kb_data()
1880 ice_kb_entry_init(&kb->entries[i], in ice_parse_kb_data()
1884 if (hw->debug_mask & ICE_DBG_PARSER) in ice_parse_kb_data()
1891 struct ice_seg *seg = hw->seg; in ice_xlt_kb_get()
1895 if (!seg) in ice_xlt_kb_get()
1896 return ERR_PTR(-EINVAL); in ice_xlt_kb_get()
1899 if (!kb) in ice_xlt_kb_get()
1900 return ERR_PTR(-ENOMEM); in ice_xlt_kb_get()
1903 if (!data) { in ice_xlt_kb_get()
1907 return ERR_PTR(-EINVAL); in ice_xlt_kb_get()
1916 * ice_xlt_kb_get_sw - create switch xlt key build
1927 * ice_xlt_kb_get_acl - create acl xlt key build
1938 * ice_xlt_kb_get_fd - create fdir xlt key build
1949 * ice_xlt_kb_get_rss - create rss xlt key build
1962 * ice_xlt_kb_flag_get - aggregate 64 bits packet flag into 16 bits xlt flag
1966 * Return: XLT flag or 0 if @pkt_flag = 0.
1970 struct ice_xlt_kb_entry *entry = &kb->entries[0]; in ice_xlt_kb_flag_get()
1975 if (kb->flag15 & pkt_flag) in ice_xlt_kb_flag_get()
1978 /* check flag 0 - 14 */ in ice_xlt_kb_flag_get()
1981 u16 idx = entry->flg0_14_sel[i] & ICE_XLT_KB_MASK; in ice_xlt_kb_flag_get()
1983 if (pkt_flag & BIT(idx)) in ice_xlt_kb_flag_get()
1992 * ice_parser_create - create a parser instance
2004 if (!p) in ice_parser_create()
2005 return ERR_PTR(-ENOMEM); in ice_parser_create()
2007 p->hw = hw; in ice_parser_create()
2008 p->rt.psr = p; in ice_parser_create()
2010 p->imem_table = ice_imem_table_get(hw); in ice_parser_create()
2011 if (IS_ERR(p->imem_table)) { in ice_parser_create()
2012 err = p->imem_table; in ice_parser_create()
2016 p->mi_table = ice_metainit_table_get(hw); in ice_parser_create()
2017 if (IS_ERR(p->mi_table)) { in ice_parser_create()
2018 err = p->mi_table; in ice_parser_create()
2022 p->pg_cam_table = ice_pg_cam_table_get(hw); in ice_parser_create()
2023 if (IS_ERR(p->pg_cam_table)) { in ice_parser_create()
2024 err = p->pg_cam_table; in ice_parser_create()
2028 p->pg_sp_cam_table = ice_pg_sp_cam_table_get(hw); in ice_parser_create()
2029 if (IS_ERR(p->pg_sp_cam_table)) { in ice_parser_create()
2030 err = p->pg_sp_cam_table; in ice_parser_create()
2034 p->pg_nm_cam_table = ice_pg_nm_cam_table_get(hw); in ice_parser_create()
2035 if (IS_ERR(p->pg_nm_cam_table)) { in ice_parser_create()
2036 err = p->pg_nm_cam_table; in ice_parser_create()
2040 p->pg_nm_sp_cam_table = ice_pg_nm_sp_cam_table_get(hw); in ice_parser_create()
2041 if (IS_ERR(p->pg_nm_sp_cam_table)) { in ice_parser_create()
2042 err = p->pg_nm_sp_cam_table; in ice_parser_create()
2046 p->bst_tcam_table = ice_bst_tcam_table_get(hw); in ice_parser_create()
2047 if (IS_ERR(p->bst_tcam_table)) { in ice_parser_create()
2048 err = p->bst_tcam_table; in ice_parser_create()
2052 p->bst_lbl_table = ice_bst_lbl_table_get(hw); in ice_parser_create()
2053 if (IS_ERR(p->bst_lbl_table)) { in ice_parser_create()
2054 err = p->bst_lbl_table; in ice_parser_create()
2058 p->ptype_mk_tcam_table = ice_ptype_mk_tcam_table_get(hw); in ice_parser_create()
2059 if (IS_ERR(p->ptype_mk_tcam_table)) { in ice_parser_create()
2060 err = p->ptype_mk_tcam_table; in ice_parser_create()
2064 p->mk_grp_table = ice_mk_grp_table_get(hw); in ice_parser_create()
2065 if (IS_ERR(p->mk_grp_table)) { in ice_parser_create()
2066 err = p->mk_grp_table; in ice_parser_create()
2070 p->proto_grp_table = ice_proto_grp_table_get(hw); in ice_parser_create()
2071 if (IS_ERR(p->proto_grp_table)) { in ice_parser_create()
2072 err = p->proto_grp_table; in ice_parser_create()
2076 p->flg_rd_table = ice_flg_rd_table_get(hw); in ice_parser_create()
2077 if (IS_ERR(p->flg_rd_table)) { in ice_parser_create()
2078 err = p->flg_rd_table; in ice_parser_create()
2082 p->xlt_kb_sw = ice_xlt_kb_get_sw(hw); in ice_parser_create()
2083 if (IS_ERR(p->xlt_kb_sw)) { in ice_parser_create()
2084 err = p->xlt_kb_sw; in ice_parser_create()
2088 p->xlt_kb_acl = ice_xlt_kb_get_acl(hw); in ice_parser_create()
2089 if (IS_ERR(p->xlt_kb_acl)) { in ice_parser_create()
2090 err = p->xlt_kb_acl; in ice_parser_create()
2094 p->xlt_kb_fd = ice_xlt_kb_get_fd(hw); in ice_parser_create()
2095 if (IS_ERR(p->xlt_kb_fd)) { in ice_parser_create()
2096 err = p->xlt_kb_fd; in ice_parser_create()
2100 p->xlt_kb_rss = ice_xlt_kb_get_rss(hw); in ice_parser_create()
2101 if (IS_ERR(p->xlt_kb_rss)) { in ice_parser_create()
2102 err = p->xlt_kb_rss; in ice_parser_create()
2113 * ice_parser_destroy - destroy a parser instance
2118 kfree(psr->imem_table); in ice_parser_destroy()
2119 kfree(psr->mi_table); in ice_parser_destroy()
2120 kfree(psr->pg_cam_table); in ice_parser_destroy()
2121 kfree(psr->pg_sp_cam_table); in ice_parser_destroy()
2122 kfree(psr->pg_nm_cam_table); in ice_parser_destroy()
2123 kfree(psr->pg_nm_sp_cam_table); in ice_parser_destroy()
2124 kfree(psr->bst_tcam_table); in ice_parser_destroy()
2125 kfree(psr->bst_lbl_table); in ice_parser_destroy()
2126 kfree(psr->ptype_mk_tcam_table); in ice_parser_destroy()
2127 kfree(psr->mk_grp_table); in ice_parser_destroy()
2128 kfree(psr->proto_grp_table); in ice_parser_destroy()
2129 kfree(psr->flg_rd_table); in ice_parser_destroy()
2130 kfree(psr->xlt_kb_sw); in ice_parser_destroy()
2131 kfree(psr->xlt_kb_acl); in ice_parser_destroy()
2132 kfree(psr->xlt_kb_fd); in ice_parser_destroy()
2133 kfree(psr->xlt_kb_rss); in ice_parser_destroy()
2139 * ice_parser_run - parse on a packet in binary and return the result
2150 ice_parser_rt_reset(&psr->rt); in ice_parser_run()
2151 ice_parser_rt_pktbuf_set(&psr->rt, pkt_buf, pkt_len); in ice_parser_run()
2153 return ice_parser_rt_execute(&psr->rt, rslt); in ice_parser_run()
2157 * ice_parser_result_dump - dump a parser result info
2166 dev_info(dev, "ptype = %d\n", rslt->ptype); in ice_parser_result_dump()
2167 for (i = 0; i < rslt->po_num; i++) in ice_parser_result_dump()
2169 rslt->po[i].proto_id, rslt->po[i].offset); in ice_parser_result_dump()
2171 dev_info(dev, "flags_psr = 0x%016llx\n", rslt->flags_psr); in ice_parser_result_dump()
2172 dev_info(dev, "flags_pkt = 0x%016llx\n", rslt->flags_pkt); in ice_parser_result_dump()
2173 dev_info(dev, "flags_sw = 0x%04x\n", rslt->flags_sw); in ice_parser_result_dump()
2174 dev_info(dev, "flags_fd = 0x%04x\n", rslt->flags_fd); in ice_parser_result_dump()
2175 dev_info(dev, "flags_rss = 0x%04x\n", rslt->flags_rss); in ice_parser_result_dump()
2190 item = ice_bst_tcam_search(psr->bst_tcam_table, in ice_bst_dvm_set()
2191 psr->bst_lbl_table, in ice_bst_dvm_set()
2193 if (!item) in ice_bst_dvm_set()
2197 item->key[ICE_BT_VM_OFF] = key; in ice_bst_dvm_set()
2198 item->key_inv[ICE_BT_VM_OFF] = key; in ice_bst_dvm_set()
2204 * ice_parser_dvm_set - configure double vlan mode for parser
2223 item = ice_bst_tcam_search(psr->bst_tcam_table, in ice_tunnel_port_set()
2224 psr->bst_lbl_table, in ice_tunnel_port_set()
2226 if (!item) in ice_tunnel_port_set()
2230 if (on && item->key[ICE_BT_TUN_PORT_OFF_H] == ICE_BT_INV_KEY && in ice_tunnel_port_set()
2231 item->key_inv[ICE_BT_TUN_PORT_OFF_H] == ICE_BT_INV_KEY) { in ice_tunnel_port_set()
2232 item->key_inv[ICE_BT_TUN_PORT_OFF_L] = in ice_tunnel_port_set()
2234 item->key_inv[ICE_BT_TUN_PORT_OFF_H] = in ice_tunnel_port_set()
2237 item->key[ICE_BT_TUN_PORT_OFF_L] = in ice_tunnel_port_set()
2238 ICE_BT_VLD_KEY - buf[ICE_UDP_PORT_OFF_L]; in ice_tunnel_port_set()
2239 item->key[ICE_BT_TUN_PORT_OFF_H] = in ice_tunnel_port_set()
2240 ICE_BT_VLD_KEY - buf[ICE_UDP_PORT_OFF_H]; in ice_tunnel_port_set()
2244 } else if (!on && in ice_tunnel_port_set()
2245 (item->key_inv[ICE_BT_TUN_PORT_OFF_L] == in ice_tunnel_port_set()
2247 item->key_inv[ICE_BT_TUN_PORT_OFF_H] == in ice_tunnel_port_set()
2249 item->key_inv[ICE_BT_TUN_PORT_OFF_L] = ICE_BT_VLD_KEY; in ice_tunnel_port_set()
2250 item->key_inv[ICE_BT_TUN_PORT_OFF_H] = ICE_BT_INV_KEY; in ice_tunnel_port_set()
2252 item->key[ICE_BT_TUN_PORT_OFF_L] = ICE_BT_VLD_KEY; in ice_tunnel_port_set()
2253 item->key[ICE_BT_TUN_PORT_OFF_H] = ICE_BT_INV_KEY; in ice_tunnel_port_set()
2260 return -EINVAL; in ice_tunnel_port_set()
2264 * ice_parser_vxlan_tunnel_set - configure vxlan tunnel for parser
2278 * ice_parser_geneve_tunnel_set - configure geneve tunnel for parser
2292 * ice_parser_ecpri_tunnel_set - configure ecpri tunnel for parser
2307 * ice_nearest_proto_id - find nearest protocol ID
2316 * Return: if true, the protocol's ID and offset
2325 for (i = 0; i < rslt->po_num; i++) { in ice_nearest_proto_id()
2326 if (offset < rslt->po[i].offset) in ice_nearest_proto_id()
2328 if (offset - rslt->po[i].offset < dist) { in ice_nearest_proto_id()
2329 proto = rslt->po[i].proto_id; in ice_nearest_proto_id()
2330 dist = offset - rslt->po[i].offset; in ice_nearest_proto_id()
2334 if (dist % 2) in ice_nearest_proto_id()
2352 * ice_parser_profile_init - initialize a FXP profile based on parser result
2372 set_bit(rslt->ptype, prof->ptypes); in ice_parser_profile_init()
2373 if (blk == ICE_BLK_SW) { in ice_parser_profile_init()
2374 prof->flags = rslt->flags_sw; in ice_parser_profile_init()
2375 prof->flags_msk = ICE_KEYBUILD_FLAG_MASK_DEFAULT_SW; in ice_parser_profile_init()
2376 } else if (blk == ICE_BLK_ACL) { in ice_parser_profile_init()
2377 prof->flags = rslt->flags_acl; in ice_parser_profile_init()
2378 prof->flags_msk = ICE_KEYBUILD_FLAG_MASK_DEFAULT_ACL; in ice_parser_profile_init()
2379 } else if (blk == ICE_BLK_FD) { in ice_parser_profile_init()
2380 prof->flags = rslt->flags_fd; in ice_parser_profile_init()
2381 prof->flags_msk = ICE_KEYBUILD_FLAG_MASK_DEFAULT_FD; in ice_parser_profile_init()
2382 } else if (blk == ICE_BLK_RSS) { in ice_parser_profile_init()
2383 prof->flags = rslt->flags_rss; in ice_parser_profile_init()
2384 prof->flags_msk = ICE_KEYBUILD_FLAG_MASK_DEFAULT_RSS; in ice_parser_profile_init()
2386 return -EINVAL; in ice_parser_profile_init()
2389 for (off = 0; off < buf_len - 1; off++) { in ice_parser_profile_init()
2390 if (msk_buf[off] == 0 && msk_buf[off + 1] == 0) in ice_parser_profile_init()
2392 if (!ice_nearest_proto_id(rslt, off, &proto_id, &proto_off)) in ice_parser_profile_init()
2394 if (prof->fv_num >= ICE_PARSER_FV_MAX) in ice_parser_profile_init()
2395 return -EINVAL; in ice_parser_profile_init()
2397 prof->fv[prof->fv_num].proto_id = proto_id; in ice_parser_profile_init()
2398 prof->fv[prof->fv_num].offset = proto_off; in ice_parser_profile_init()
2399 prof->fv[prof->fv_num].spec = *(const u16 *)&pkt_buf[off]; in ice_parser_profile_init()
2400 prof->fv[prof->fv_num].msk = *(const u16 *)&msk_buf[off]; in ice_parser_profile_init()
2401 prof->fv_num++; in ice_parser_profile_init()
2408 * ice_parser_profile_dump - dump an FXP profile info
2420 if (test_bit(i, prof->ptypes)) in ice_parser_profile_dump()
2423 for (i = 0; i < prof->fv_num; i++) in ice_parser_profile_dump()
2425 prof->fv[i].proto_id, prof->fv[i].offset, in ice_parser_profile_dump()
2426 prof->fv[i].spec, prof->fv[i].msk); in ice_parser_profile_dump()
2428 dev_info(dev, "flags = 0x%04x\n", prof->flags); in ice_parser_profile_dump()
2429 dev_info(dev, "flags_msk = 0x%04x\n", prof->flags_msk); in ice_parser_profile_dump()