sgid_tbl 299 drivers/infiniband/hw/bnxt_re/ib_verbs.c &rdev->qplib_res.sgid_tbl, index, sgid_tbl 309 drivers/infiniband/hw/bnxt_re/ib_verbs.c struct bnxt_qplib_sgid_tbl *sgid_tbl = &rdev->qplib_res.sgid_tbl; sgid_tbl 318 drivers/infiniband/hw/bnxt_re/ib_verbs.c if (sgid_tbl && sgid_tbl->active) { sgid_tbl 319 drivers/infiniband/hw/bnxt_re/ib_verbs.c if (ctx->idx >= sgid_tbl->max) sgid_tbl 321 drivers/infiniband/hw/bnxt_re/ib_verbs.c gid_to_del = &sgid_tbl->tbl[ctx->idx].gid; sgid_tbl 322 drivers/infiniband/hw/bnxt_re/ib_verbs.c vlan_id = sgid_tbl->tbl[ctx->idx].vlan_id; sgid_tbl 340 drivers/infiniband/hw/bnxt_re/ib_verbs.c rc = bnxt_qplib_del_sgid(sgid_tbl, gid_to_del, sgid_tbl 346 drivers/infiniband/hw/bnxt_re/ib_verbs.c ctx_tbl = sgid_tbl->ctx; sgid_tbl 364 drivers/infiniband/hw/bnxt_re/ib_verbs.c struct bnxt_qplib_sgid_tbl *sgid_tbl = &rdev->qplib_res.sgid_tbl; sgid_tbl 370 drivers/infiniband/hw/bnxt_re/ib_verbs.c rc = bnxt_qplib_add_sgid(sgid_tbl, (struct bnxt_qplib_gid *)&attr->gid, sgid_tbl 374 drivers/infiniband/hw/bnxt_re/ib_verbs.c ctx_tbl = sgid_tbl->ctx; sgid_tbl 388 drivers/infiniband/hw/bnxt_re/ib_verbs.c ctx_tbl = sgid_tbl->ctx; sgid_tbl 1138 drivers/infiniband/hw/bnxt_re/main.c struct bnxt_qplib_sgid_tbl *sgid_tbl = &rdev->qplib_res.sgid_tbl; sgid_tbl 1146 drivers/infiniband/hw/bnxt_re/main.c if (!sgid_tbl) { sgid_tbl 1151 drivers/infiniband/hw/bnxt_re/main.c for (index = 0; index < sgid_tbl->active; index++) { sgid_tbl 1152 drivers/infiniband/hw/bnxt_re/main.c gid_idx = sgid_tbl->hw_id[index]; sgid_tbl 1154 drivers/infiniband/hw/bnxt_re/main.c if (!memcmp(&sgid_tbl->tbl[index], &bnxt_qplib_gid_zero, sgid_tbl 1160 drivers/infiniband/hw/bnxt_re/main.c if (sgid_tbl->vlan[index]) sgid_tbl 1163 drivers/infiniband/hw/bnxt_re/main.c memcpy(&gid, &sgid_tbl->tbl[index], sizeof(gid)); sgid_tbl 1165 drivers/infiniband/hw/bnxt_re/main.c rc = bnxt_qplib_update_sgid(sgid_tbl, &gid, gid_idx, sgid_tbl 1229 drivers/infiniband/hw/bnxt_re/qplib_fp.c req.sgid_index = cpu_to_le16(res->sgid_tbl.hw_id sgid_tbl 1331 drivers/infiniband/hw/bnxt_re/qplib_fp.c for (i = 0; i < res->sgid_tbl.max; i++) { sgid_tbl 1332 drivers/infiniband/hw/bnxt_re/qplib_fp.c if (res->sgid_tbl.hw_id[i] == le16_to_cpu(sb->sgid_index)) { sgid_tbl 1337 drivers/infiniband/hw/bnxt_re/qplib_fp.c if (i == res->sgid_tbl.max) sgid_tbl 473 drivers/infiniband/hw/bnxt_re/qplib_res.c struct bnxt_qplib_sgid_tbl *sgid_tbl) sgid_tbl 475 drivers/infiniband/hw/bnxt_re/qplib_res.c kfree(sgid_tbl->tbl); sgid_tbl 476 drivers/infiniband/hw/bnxt_re/qplib_res.c kfree(sgid_tbl->hw_id); sgid_tbl 477 drivers/infiniband/hw/bnxt_re/qplib_res.c kfree(sgid_tbl->ctx); sgid_tbl 478 drivers/infiniband/hw/bnxt_re/qplib_res.c kfree(sgid_tbl->vlan); sgid_tbl 479 drivers/infiniband/hw/bnxt_re/qplib_res.c sgid_tbl->tbl = NULL; sgid_tbl 480 drivers/infiniband/hw/bnxt_re/qplib_res.c sgid_tbl->hw_id = NULL; sgid_tbl 481 drivers/infiniband/hw/bnxt_re/qplib_res.c sgid_tbl->ctx = NULL; sgid_tbl 482 drivers/infiniband/hw/bnxt_re/qplib_res.c sgid_tbl->vlan = NULL; sgid_tbl 483 drivers/infiniband/hw/bnxt_re/qplib_res.c sgid_tbl->max = 0; sgid_tbl 484 drivers/infiniband/hw/bnxt_re/qplib_res.c sgid_tbl->active = 0; sgid_tbl 488 drivers/infiniband/hw/bnxt_re/qplib_res.c struct bnxt_qplib_sgid_tbl *sgid_tbl, sgid_tbl 491 drivers/infiniband/hw/bnxt_re/qplib_res.c sgid_tbl->tbl = kcalloc(max, sizeof(*sgid_tbl->tbl), GFP_KERNEL); sgid_tbl 492 drivers/infiniband/hw/bnxt_re/qplib_res.c if (!sgid_tbl->tbl) sgid_tbl 495 drivers/infiniband/hw/bnxt_re/qplib_res.c sgid_tbl->hw_id = kcalloc(max, sizeof(u16), GFP_KERNEL); sgid_tbl 496 drivers/infiniband/hw/bnxt_re/qplib_res.c if (!sgid_tbl->hw_id) sgid_tbl 499 drivers/infiniband/hw/bnxt_re/qplib_res.c sgid_tbl->ctx = kcalloc(max, sizeof(void *), GFP_KERNEL); sgid_tbl 500 drivers/infiniband/hw/bnxt_re/qplib_res.c if (!sgid_tbl->ctx) sgid_tbl 503 drivers/infiniband/hw/bnxt_re/qplib_res.c sgid_tbl->vlan = kcalloc(max, sizeof(u8), GFP_KERNEL); sgid_tbl 504 drivers/infiniband/hw/bnxt_re/qplib_res.c if (!sgid_tbl->vlan) sgid_tbl 507 drivers/infiniband/hw/bnxt_re/qplib_res.c sgid_tbl->max = max; sgid_tbl 510 drivers/infiniband/hw/bnxt_re/qplib_res.c kfree(sgid_tbl->ctx); sgid_tbl 511 drivers/infiniband/hw/bnxt_re/qplib_res.c sgid_tbl->ctx = NULL; sgid_tbl 513 drivers/infiniband/hw/bnxt_re/qplib_res.c kfree(sgid_tbl->hw_id); sgid_tbl 514 drivers/infiniband/hw/bnxt_re/qplib_res.c sgid_tbl->hw_id = NULL; sgid_tbl 516 drivers/infiniband/hw/bnxt_re/qplib_res.c kfree(sgid_tbl->tbl); sgid_tbl 517 drivers/infiniband/hw/bnxt_re/qplib_res.c sgid_tbl->tbl = NULL; sgid_tbl 522 drivers/infiniband/hw/bnxt_re/qplib_res.c struct bnxt_qplib_sgid_tbl *sgid_tbl) sgid_tbl 526 drivers/infiniband/hw/bnxt_re/qplib_res.c for (i = 0; i < sgid_tbl->max; i++) { sgid_tbl 527 drivers/infiniband/hw/bnxt_re/qplib_res.c if (memcmp(&sgid_tbl->tbl[i], &bnxt_qplib_gid_zero, sgid_tbl 529 drivers/infiniband/hw/bnxt_re/qplib_res.c bnxt_qplib_del_sgid(sgid_tbl, &sgid_tbl->tbl[i].gid, sgid_tbl 530 drivers/infiniband/hw/bnxt_re/qplib_res.c sgid_tbl->tbl[i].vlan_id, true); sgid_tbl 532 drivers/infiniband/hw/bnxt_re/qplib_res.c memset(sgid_tbl->tbl, 0, sizeof(*sgid_tbl->tbl) * sgid_tbl->max); sgid_tbl 533 drivers/infiniband/hw/bnxt_re/qplib_res.c memset(sgid_tbl->hw_id, -1, sizeof(u16) * sgid_tbl->max); sgid_tbl 534 drivers/infiniband/hw/bnxt_re/qplib_res.c memset(sgid_tbl->vlan, 0, sizeof(u8) * sgid_tbl->max); sgid_tbl 535 drivers/infiniband/hw/bnxt_re/qplib_res.c sgid_tbl->active = 0; sgid_tbl 538 drivers/infiniband/hw/bnxt_re/qplib_res.c static void bnxt_qplib_init_sgid_tbl(struct bnxt_qplib_sgid_tbl *sgid_tbl, sgid_tbl 543 drivers/infiniband/hw/bnxt_re/qplib_res.c for (i = 0; i < sgid_tbl->max; i++) sgid_tbl 544 drivers/infiniband/hw/bnxt_re/qplib_res.c sgid_tbl->tbl[i].vlan_id = 0xffff; sgid_tbl 546 drivers/infiniband/hw/bnxt_re/qplib_res.c memset(sgid_tbl->hw_id, -1, sizeof(u16) * sgid_tbl->max); sgid_tbl 794 drivers/infiniband/hw/bnxt_re/qplib_res.c bnxt_qplib_cleanup_sgid_tbl(res, &res->sgid_tbl); sgid_tbl 799 drivers/infiniband/hw/bnxt_re/qplib_res.c bnxt_qplib_init_sgid_tbl(&res->sgid_tbl, res->netdev); sgid_tbl 808 drivers/infiniband/hw/bnxt_re/qplib_res.c bnxt_qplib_free_sgid_tbl(res, &res->sgid_tbl); sgid_tbl 825 drivers/infiniband/hw/bnxt_re/qplib_res.c rc = bnxt_qplib_alloc_sgid_tbl(res, &res->sgid_tbl, dev_attr->max_sgid); sgid_tbl 200 drivers/infiniband/hw/bnxt_re/qplib_res.h struct bnxt_qplib_sgid_tbl sgid_tbl; sgid_tbl 207 drivers/infiniband/hw/bnxt_re/qplib_sp.c struct bnxt_qplib_sgid_tbl *sgid_tbl, int index, sgid_tbl 210 drivers/infiniband/hw/bnxt_re/qplib_sp.c if (index >= sgid_tbl->max) { sgid_tbl 213 drivers/infiniband/hw/bnxt_re/qplib_sp.c index, sgid_tbl->max); sgid_tbl 216 drivers/infiniband/hw/bnxt_re/qplib_sp.c memcpy(gid, &sgid_tbl->tbl[index].gid, sizeof(*gid)); sgid_tbl 220 drivers/infiniband/hw/bnxt_re/qplib_sp.c int bnxt_qplib_del_sgid(struct bnxt_qplib_sgid_tbl *sgid_tbl, sgid_tbl 223 drivers/infiniband/hw/bnxt_re/qplib_sp.c struct bnxt_qplib_res *res = to_bnxt_qplib(sgid_tbl, sgid_tbl 225 drivers/infiniband/hw/bnxt_re/qplib_sp.c sgid_tbl); sgid_tbl 229 drivers/infiniband/hw/bnxt_re/qplib_sp.c if (!sgid_tbl) { sgid_tbl 234 drivers/infiniband/hw/bnxt_re/qplib_sp.c if (!sgid_tbl->active) { sgid_tbl 238 drivers/infiniband/hw/bnxt_re/qplib_sp.c for (index = 0; index < sgid_tbl->max; index++) { sgid_tbl 239 drivers/infiniband/hw/bnxt_re/qplib_sp.c if (!memcmp(&sgid_tbl->tbl[index].gid, gid, sizeof(*gid)) && sgid_tbl 240 drivers/infiniband/hw/bnxt_re/qplib_sp.c vlan_id == sgid_tbl->tbl[index].vlan_id) sgid_tbl 243 drivers/infiniband/hw/bnxt_re/qplib_sp.c if (index == sgid_tbl->max) { sgid_tbl 255 drivers/infiniband/hw/bnxt_re/qplib_sp.c if (sgid_tbl->hw_id[index] == 0xFFFF) { sgid_tbl 260 drivers/infiniband/hw/bnxt_re/qplib_sp.c req.gid_index = cpu_to_le16(sgid_tbl->hw_id[index]); sgid_tbl 266 drivers/infiniband/hw/bnxt_re/qplib_sp.c memcpy(&sgid_tbl->tbl[index].gid, &bnxt_qplib_gid_zero, sgid_tbl 268 drivers/infiniband/hw/bnxt_re/qplib_sp.c sgid_tbl->tbl[index].vlan_id = 0xFFFF; sgid_tbl 269 drivers/infiniband/hw/bnxt_re/qplib_sp.c sgid_tbl->vlan[index] = 0; sgid_tbl 270 drivers/infiniband/hw/bnxt_re/qplib_sp.c sgid_tbl->active--; sgid_tbl 273 drivers/infiniband/hw/bnxt_re/qplib_sp.c index, sgid_tbl->hw_id[index], sgid_tbl->active); sgid_tbl 274 drivers/infiniband/hw/bnxt_re/qplib_sp.c sgid_tbl->hw_id[index] = (u16)-1; sgid_tbl 280 drivers/infiniband/hw/bnxt_re/qplib_sp.c int bnxt_qplib_add_sgid(struct bnxt_qplib_sgid_tbl *sgid_tbl, sgid_tbl 284 drivers/infiniband/hw/bnxt_re/qplib_sp.c struct bnxt_qplib_res *res = to_bnxt_qplib(sgid_tbl, sgid_tbl 286 drivers/infiniband/hw/bnxt_re/qplib_sp.c sgid_tbl); sgid_tbl 290 drivers/infiniband/hw/bnxt_re/qplib_sp.c if (!sgid_tbl) { sgid_tbl 295 drivers/infiniband/hw/bnxt_re/qplib_sp.c if (sgid_tbl->active == sgid_tbl->max) { sgid_tbl 299 drivers/infiniband/hw/bnxt_re/qplib_sp.c free_idx = sgid_tbl->max; sgid_tbl 300 drivers/infiniband/hw/bnxt_re/qplib_sp.c for (i = 0; i < sgid_tbl->max; i++) { sgid_tbl 301 drivers/infiniband/hw/bnxt_re/qplib_sp.c if (!memcmp(&sgid_tbl->tbl[i], gid, sizeof(*gid)) && sgid_tbl 302 drivers/infiniband/hw/bnxt_re/qplib_sp.c sgid_tbl->tbl[i].vlan_id == vlan_id) { sgid_tbl 307 drivers/infiniband/hw/bnxt_re/qplib_sp.c } else if (!memcmp(&sgid_tbl->tbl[i], &bnxt_qplib_gid_zero, sgid_tbl 309 drivers/infiniband/hw/bnxt_re/qplib_sp.c free_idx == sgid_tbl->max) { sgid_tbl 313 drivers/infiniband/hw/bnxt_re/qplib_sp.c if (free_idx == sgid_tbl->max) { sgid_tbl 353 drivers/infiniband/hw/bnxt_re/qplib_sp.c sgid_tbl->hw_id[free_idx] = le32_to_cpu(resp.xid); sgid_tbl 356 drivers/infiniband/hw/bnxt_re/qplib_sp.c memcpy(&sgid_tbl->tbl[free_idx], gid, sizeof(*gid)); sgid_tbl 357 drivers/infiniband/hw/bnxt_re/qplib_sp.c sgid_tbl->tbl[free_idx].vlan_id = vlan_id; sgid_tbl 358 drivers/infiniband/hw/bnxt_re/qplib_sp.c sgid_tbl->active++; sgid_tbl 360 drivers/infiniband/hw/bnxt_re/qplib_sp.c sgid_tbl->vlan[free_idx] = 1; sgid_tbl 364 drivers/infiniband/hw/bnxt_re/qplib_sp.c free_idx, sgid_tbl->hw_id[free_idx], sgid_tbl->active); sgid_tbl 371 drivers/infiniband/hw/bnxt_re/qplib_sp.c int bnxt_qplib_update_sgid(struct bnxt_qplib_sgid_tbl *sgid_tbl, sgid_tbl 375 drivers/infiniband/hw/bnxt_re/qplib_sp.c struct bnxt_qplib_res *res = to_bnxt_qplib(sgid_tbl, sgid_tbl 377 drivers/infiniband/hw/bnxt_re/qplib_sp.c sgid_tbl); sgid_tbl 517 drivers/infiniband/hw/bnxt_re/qplib_sp.c req.sgid_index = cpu_to_le16(res->sgid_tbl.hw_id[ah->sgid_index]); sgid_tbl 226 drivers/infiniband/hw/bnxt_re/qplib_sp.h struct bnxt_qplib_sgid_tbl *sgid_tbl, int index, sgid_tbl 228 drivers/infiniband/hw/bnxt_re/qplib_sp.h int bnxt_qplib_del_sgid(struct bnxt_qplib_sgid_tbl *sgid_tbl, sgid_tbl 230 drivers/infiniband/hw/bnxt_re/qplib_sp.h int bnxt_qplib_add_sgid(struct bnxt_qplib_sgid_tbl *sgid_tbl, sgid_tbl 233 drivers/infiniband/hw/bnxt_re/qplib_sp.h int bnxt_qplib_update_sgid(struct bnxt_qplib_sgid_tbl *sgid_tbl, sgid_tbl 344 drivers/infiniband/hw/qedr/main.c kfree(dev->sgid_tbl); sgid_tbl 354 drivers/infiniband/hw/qedr/main.c dev->sgid_tbl = kcalloc(QEDR_MAX_SGID, sizeof(union ib_gid), sgid_tbl 356 drivers/infiniband/hw/qedr/main.c if (!dev->sgid_tbl) sgid_tbl 427 drivers/infiniband/hw/qedr/main.c kfree(dev->sgid_tbl); sgid_tbl 980 drivers/infiniband/hw/qedr/main.c union ib_gid *sgid = &dev->sgid_tbl[0]; sgid_tbl 151 drivers/infiniband/hw/qedr/qedr.h union ib_gid *sgid_tbl; sgid_tbl 223 drivers/infiniband/hw/vmw_pvrdma/pvrdma.h union ib_gid *sgid_tbl; sgid_tbl 619 drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c if (!dev->sgid_tbl) { sgid_tbl 638 drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c memcpy(&dev->sgid_tbl[index], gid, sizeof(*gid)); sgid_tbl 658 drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c if (!dev->sgid_tbl) { sgid_tbl 665 drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c memcpy(cmd_dest->dest_gid, &dev->sgid_tbl[index], 16); sgid_tbl 674 drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c memset(&dev->sgid_tbl[index], 0, 16); sgid_tbl 1010 drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c dev->sgid_tbl = kcalloc(dev->dsr->caps.gid_tbl_len, sgid_tbl 1012 drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c if (!dev->sgid_tbl) { sgid_tbl 1055 drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c kfree(dev->sgid_tbl); sgid_tbl 1130 drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c kfree(dev->sgid_tbl); sgid_tbl 194 drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c memcpy(gid, &dev->sgid_tbl[index], sizeof(union ib_gid));