Lines Matching refs:free_idx
297 int i, free_idx; in bnxt_qplib_add_sgid() local
308 free_idx = sgid_tbl->max; in bnxt_qplib_add_sgid()
318 free_idx == sgid_tbl->max) { in bnxt_qplib_add_sgid()
319 free_idx = i; in bnxt_qplib_add_sgid()
322 if (free_idx == sgid_tbl->max) { in bnxt_qplib_add_sgid()
362 sgid_tbl->hw_id[free_idx] = le32_to_cpu(resp.xid); in bnxt_qplib_add_sgid()
365 memcpy(&sgid_tbl->tbl[free_idx], gid, sizeof(*gid)); in bnxt_qplib_add_sgid()
366 sgid_tbl->tbl[free_idx].vlan_id = vlan_id; in bnxt_qplib_add_sgid()
369 sgid_tbl->vlan[free_idx] = 1; in bnxt_qplib_add_sgid()
373 free_idx, sgid_tbl->hw_id[free_idx], sgid_tbl->active); in bnxt_qplib_add_sgid()
375 *index = free_idx; in bnxt_qplib_add_sgid()
472 int i, free_idx, rc = 0; in bnxt_qplib_add_pkey() local
484 free_idx = pkey_tbl->max; in bnxt_qplib_add_pkey()
488 else if (!pkey_tbl->tbl[i] && free_idx == pkey_tbl->max) in bnxt_qplib_add_pkey()
489 free_idx = i; in bnxt_qplib_add_pkey()
491 if (free_idx == pkey_tbl->max) { in bnxt_qplib_add_pkey()
497 memcpy(&pkey_tbl->tbl[free_idx], pkey, sizeof(*pkey)); in bnxt_qplib_add_pkey()