-/*
- * Process the identifier list in the generic table.
- * Extract the ident from the generic table entry and
- * write it to the reg file.
- */
-static int32_t
-ulp_mapper_gen_tbl_ident_scan(struct bnxt_ulp_mapper_parms *parms,
- struct bnxt_ulp_mapper_tbl_info *tbl,
- struct ulp_mapper_gen_tbl_entry *gen_tbl_ent)
-{
- struct bnxt_ulp_mapper_ident_info *idents;
- uint32_t i, idx, num_idents = 0;
- int32_t rc = 0;
-
- /* Get the ident list */
- idents = ulp_mapper_ident_fields_get(parms, tbl, &num_idents);
-
- for (i = 0; i < num_idents; i++) {
- /* Extract the index from the result byte data array */
- rc = ulp_mapper_gen_tbl_entry_data_get(gen_tbl_ent,
- idents[i].ident_bit_pos,
- idents[i].ident_bit_size,
- (uint8_t *)&idx,
- sizeof(idx));
-
- /* validate the extraction */
- if (rc) {
- BNXT_TF_DBG(ERR, "failed to read %s:%x:%x\n",
- idents[i].description,
- idents[i].ident_bit_pos,
- idents[i].ident_bit_size);
- return -EINVAL;
- }
-
- /* Write it to the regfile */
- if (!ulp_regfile_write(parms->regfile,
- idents[i].regfile_idx, idx)) {
- BNXT_TF_DBG(ERR, "Regfile[%d] write failed.\n",
- idents[i].regfile_idx);
- return -EINVAL;
- }
- }
- return 0;
-}
-
-/*
- * Process the identifier list in the generic table.
- * Write the ident to the generic table entry
- */
-static int32_t
-ulp_mapper_gen_tbl_ident_write(struct bnxt_ulp_mapper_parms *parms,
- struct bnxt_ulp_mapper_tbl_info *tbl,
- struct ulp_mapper_gen_tbl_entry *gen_tbl_ent)
-{
- struct bnxt_ulp_mapper_ident_info *idents;
- uint32_t i, num_idents = 0;
- uint64_t idx;
-
- /* Get the ident list */
- idents = ulp_mapper_ident_fields_get(parms, tbl, &num_idents);
-
- for (i = 0; i < num_idents; i++) {
- /* read from the regfile */
- if (!ulp_regfile_read(parms->regfile, idents[i].regfile_idx,
- &idx)) {
- BNXT_TF_DBG(ERR, "Regfile[%d] write failed.\n",
- idents[i].regfile_idx);
- return -EINVAL;
- }
-
- /* Update the gen tbl entry with the new data */
- ulp_mapper_gen_tbl_entry_data_set(gen_tbl_ent,
- idents[i].ident_bit_pos,
- idents[i].ident_bit_size,
- (uint8_t *)&idx);
- }
- return 0;
-}
-