Lines Matching refs:sgid_tbl

207 			struct bnxt_qplib_sgid_tbl *sgid_tbl, int index,  in bnxt_qplib_get_sgid()  argument
210 if (index >= sgid_tbl->max) { in bnxt_qplib_get_sgid()
213 index, sgid_tbl->max); in bnxt_qplib_get_sgid()
216 memcpy(gid, &sgid_tbl->tbl[index].gid, sizeof(*gid)); in bnxt_qplib_get_sgid()
220 int bnxt_qplib_del_sgid(struct bnxt_qplib_sgid_tbl *sgid_tbl, in bnxt_qplib_del_sgid() argument
223 struct bnxt_qplib_res *res = to_bnxt_qplib(sgid_tbl, in bnxt_qplib_del_sgid()
225 sgid_tbl); in bnxt_qplib_del_sgid()
229 if (!sgid_tbl) { in bnxt_qplib_del_sgid()
234 if (!sgid_tbl->active) { in bnxt_qplib_del_sgid()
238 for (index = 0; index < sgid_tbl->max; index++) { in bnxt_qplib_del_sgid()
239 if (!memcmp(&sgid_tbl->tbl[index].gid, gid, sizeof(*gid)) && in bnxt_qplib_del_sgid()
240 vlan_id == sgid_tbl->tbl[index].vlan_id) in bnxt_qplib_del_sgid()
243 if (index == sgid_tbl->max) { in bnxt_qplib_del_sgid()
255 if (sgid_tbl->hw_id[index] == 0xFFFF) { in bnxt_qplib_del_sgid()
260 req.gid_index = cpu_to_le16(sgid_tbl->hw_id[index]); in bnxt_qplib_del_sgid()
266 memcpy(&sgid_tbl->tbl[index].gid, &bnxt_qplib_gid_zero, in bnxt_qplib_del_sgid()
268 sgid_tbl->tbl[index].vlan_id = 0xFFFF; in bnxt_qplib_del_sgid()
269 sgid_tbl->vlan[index] = 0; in bnxt_qplib_del_sgid()
270 sgid_tbl->active--; in bnxt_qplib_del_sgid()
273 index, sgid_tbl->hw_id[index], sgid_tbl->active); in bnxt_qplib_del_sgid()
274 sgid_tbl->hw_id[index] = (u16)-1; in bnxt_qplib_del_sgid()
280 int bnxt_qplib_add_sgid(struct bnxt_qplib_sgid_tbl *sgid_tbl, in bnxt_qplib_add_sgid() argument
284 struct bnxt_qplib_res *res = to_bnxt_qplib(sgid_tbl, in bnxt_qplib_add_sgid()
286 sgid_tbl); in bnxt_qplib_add_sgid()
290 if (!sgid_tbl) { in bnxt_qplib_add_sgid()
295 if (sgid_tbl->active == sgid_tbl->max) { in bnxt_qplib_add_sgid()
299 free_idx = sgid_tbl->max; in bnxt_qplib_add_sgid()
300 for (i = 0; i < sgid_tbl->max; i++) { in bnxt_qplib_add_sgid()
301 if (!memcmp(&sgid_tbl->tbl[i], gid, sizeof(*gid)) && in bnxt_qplib_add_sgid()
302 sgid_tbl->tbl[i].vlan_id == vlan_id) { in bnxt_qplib_add_sgid()
307 } else if (!memcmp(&sgid_tbl->tbl[i], &bnxt_qplib_gid_zero, in bnxt_qplib_add_sgid()
309 free_idx == sgid_tbl->max) { in bnxt_qplib_add_sgid()
313 if (free_idx == sgid_tbl->max) { in bnxt_qplib_add_sgid()
353 sgid_tbl->hw_id[free_idx] = le32_to_cpu(resp.xid); in bnxt_qplib_add_sgid()
356 memcpy(&sgid_tbl->tbl[free_idx], gid, sizeof(*gid)); in bnxt_qplib_add_sgid()
357 sgid_tbl->tbl[free_idx].vlan_id = vlan_id; in bnxt_qplib_add_sgid()
358 sgid_tbl->active++; in bnxt_qplib_add_sgid()
360 sgid_tbl->vlan[free_idx] = 1; in bnxt_qplib_add_sgid()
364 free_idx, sgid_tbl->hw_id[free_idx], sgid_tbl->active); in bnxt_qplib_add_sgid()
371 int bnxt_qplib_update_sgid(struct bnxt_qplib_sgid_tbl *sgid_tbl, in bnxt_qplib_update_sgid() argument
375 struct bnxt_qplib_res *res = to_bnxt_qplib(sgid_tbl, in bnxt_qplib_update_sgid()
377 sgid_tbl); in bnxt_qplib_update_sgid()
517 req.sgid_index = cpu_to_le16(res->sgid_tbl.hw_id[ah->sgid_index]); in bnxt_qplib_create_ah()