Lines Matching full:item
12 * ice_parser_sect_item_get - parse an item from a section
15 * @index: index of the item to get
18 * Return: a pointer to the item or NULL.
80 * ice_parser_create_table - create an item table from a section
83 * @item_size: item size in bytes
85 * @parse_item: the function to parse the item
94 void *item, void *data, in ice_parser_create_table() argument
99 void *table, *data, *item; in ice_parser_create_table() local
120 item = (void *)((uintptr_t)table + idx * item_size); in ice_parser_create_table()
121 parse_item(hw, idx, item, data, item_size); in ice_parser_create_table()
207 * ice_imem_dump - dump an imem item info
209 * @item: imem item to dump
211 static void ice_imem_dump(struct ice_hw *hw, struct ice_imem_item *item) in ice_imem_dump() argument
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()
390 * @item: item of IMEM entry
394 static void ice_imem_parse_item(struct ice_hw *hw, u16 idx, void *item, in ice_imem_parse_item() argument
397 struct ice_imem_item *ii = item; in ice_imem_parse_item()
446 * ice_metainit_dump - dump an metainit item info
448 * @item: metainit item to dump
450 static void ice_metainit_dump(struct ice_hw *hw, struct ice_metainit_item *item) in ice_metainit_dump() argument
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()
530 * @item: item of Metadata Init entry
534 static void ice_metainit_parse_item(struct ice_hw *hw, u16 idx, void *item, in ice_metainit_parse_item() argument
537 struct ice_metainit_item *mi = item; in ice_metainit_parse_item()
601 * ice_bst_tcam_search - find a TCAM item with specific type
607 * Return: a pointer to the matching BOOST TCAM item or NULL.
681 * @item: parse graph cam to dump
683 static void ice_pg_cam_dump(struct ice_hw *hw, struct ice_pg_cam_item *item) in ice_pg_cam_dump() argument
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()
693 * @item: parse graph no match cam to dump
696 struct ice_pg_nm_cam_item *item) in ice_pg_nm_cam_dump() argument
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()
814 * @item: item of Parse Graph CAM Entry
818 static void ice_pg_cam_parse_item(struct ice_hw *hw, u16 idx, void *item, in ice_pg_cam_parse_item() argument
821 struct ice_pg_cam_item *ci = item; in ice_pg_cam_parse_item()
843 * @item: item of Parse Graph Spill CAM Entry
847 static void ice_pg_sp_cam_parse_item(struct ice_hw *hw, u16 idx, void *item, in ice_pg_sp_cam_parse_item() argument
850 struct ice_pg_cam_item *ci = item; in ice_pg_sp_cam_parse_item()
873 * @item: item of Parse Graph NoMatch CAM Entry
877 static void ice_pg_nm_cam_parse_item(struct ice_hw *hw, u16 idx, void *item, in ice_pg_nm_cam_parse_item() argument
880 struct ice_pg_nm_cam_item *ci = item; in ice_pg_nm_cam_parse_item()
905 * @item: item of Parse Graph NoMatch Spill CAM Entry
910 void *item, void *data, in ice_pg_nm_sp_cam_parse_item() argument
913 struct ice_pg_nm_cam_item *ci = item; in ice_pg_nm_sp_cam_parse_item()
986 static bool __ice_pg_cam_match(struct ice_pg_cam_item *item, in __ice_pg_cam_match() argument
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()
993 static bool __ice_pg_nm_cam_match(struct ice_pg_nm_cam_item *item, in __ice_pg_nm_cam_match() argument
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()
1006 * Return: a pointer to the matching PG CAM item or NULL.
1014 struct ice_pg_cam_item *item = &table[i]; in ice_pg_cam_match() local
1016 if (__ice_pg_cam_match(item, key)) in ice_pg_cam_match()
1017 return item; in ice_pg_cam_match()
1029 * Return: a pointer to the matching PG No Match CAM item or NULL.
1038 struct ice_pg_nm_cam_item *item = &table[i]; in ice_pg_nm_cam_match() local
1040 if (__ice_pg_nm_cam_match(item, key)) in ice_pg_nm_cam_match()
1041 return item; in ice_pg_nm_cam_match()
1143 * @item: boost tcam to dump
1145 static void ice_bst_tcam_dump(struct ice_hw *hw, struct ice_bst_tcam_item *item) in ice_bst_tcam_dump() argument
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()
1175 static void ice_lbl_dump(struct ice_hw *hw, struct ice_lbl_item *item) in ice_lbl_dump() argument
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()
1320 * @item: item of Boost TCAM entry
1324 static void ice_bst_parse_item(struct ice_hw *hw, u16 idx, void *item, in ice_bst_parse_item() argument
1327 struct ice_bst_tcam_item *ti = item; in ice_bst_parse_item()
1369 static void ice_parse_lbl_item(struct ice_hw *hw, u16 idx, void *item, in ice_parse_lbl_item() argument
1372 struct ice_lbl_item *lbl_item = item; in ice_parse_lbl_item()
1412 * Return: a pointer to the matching Boost TCAM item or NULL.
1420 struct ice_bst_tcam_item *item = &tcam_table[i]; in ice_bst_tcam_match() local
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()
1426 return item; in ice_bst_tcam_match()
1436 * @item: ptype marker tcam to dump
1439 struct ice_ptype_mk_tcam_item *item) in ice_ptype_mk_tcam_dump() argument
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()
1461 void *item, void *data, int size) in ice_parse_ptype_mk_tcam_item() argument
1463 memcpy(item, data, size); in ice_parse_ptype_mk_tcam_item()
1467 (struct ice_ptype_mk_tcam_item *)item); in ice_parse_ptype_mk_tcam_item()
1491 * Return: a pointer to the matching Marker PType item or NULL.
1500 struct ice_ptype_mk_tcam_item *item = &table[i]; in ice_ptype_mk_tcam_match() local
1502 if (ice_ternary_match(item->key, item->key_inv, pat, len)) in ice_ptype_mk_tcam_match()
1503 return item; in ice_ptype_mk_tcam_match()
1511 * ice_mk_grp_dump - dump an marker group item info
1513 * @item: marker group item to dump
1515 static void ice_mk_grp_dump(struct ice_hw *hw, struct ice_mk_grp_item *item) in ice_mk_grp_dump() argument
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()
1529 static void ice_mk_grp_parse_item(struct ice_hw *hw, u16 idx, void *item, in ice_mk_grp_parse_item() argument
1532 struct ice_mk_grp_item *grp = item; in ice_mk_grp_parse_item()
1572 * ice_proto_grp_dump - dump a proto group item info
1574 * @item: proto group item to dump
1577 struct ice_proto_grp_item *item) in ice_proto_grp_dump() argument
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()
1607 * @item: item of Protocol Group Table entry
1611 static void ice_proto_grp_parse_item(struct ice_hw *hw, u16 idx, void *item, in ice_proto_grp_parse_item() argument
1614 struct ice_proto_grp_item *grp = item; in ice_proto_grp_parse_item()
1649 * ice_flg_rd_dump - dump a flag redirect item info
1651 * @item: flag redirect item to dump
1653 static void ice_flg_rd_dump(struct ice_hw *hw, struct ice_flg_rd_item *item) in ice_flg_rd_dump() argument
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()
1669 * @item: item of Flag Redirect Table entry
1673 static void ice_flg_rd_parse_item(struct ice_hw *hw, u16 idx, void *item, in ice_flg_rd_parse_item() argument
1676 struct ice_flg_rd_item *rdi = item; in ice_flg_rd_parse_item()
1714 struct ice_flg_rd_item *item = &table[i]; in ice_flg_redirect() local
1716 if (!item->expose) in ice_flg_redirect()
1719 if (psr_flg & BIT(item->intr_flg_id)) in ice_flg_redirect()
2187 struct ice_bst_tcam_item *item; in ice_bst_dvm_set() local
2190 item = ice_bst_tcam_search(psr->bst_tcam_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()
2221 struct ice_bst_tcam_item *item; in ice_tunnel_port_set() local
2223 item = ice_bst_tcam_search(psr->bst_tcam_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()
2239 item->key[ICE_BT_TUN_PORT_OFF_H] = 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()