Lines Matching refs:mcast
2471 struct ib_uverbs_mcast_entry *mcast; in ib_uverbs_attach_mcast() local
2485 list_for_each_entry(mcast, &obj->mcast_list, list) in ib_uverbs_attach_mcast()
2486 if (cmd.mlid == mcast->lid && in ib_uverbs_attach_mcast()
2487 !memcmp(cmd.gid, mcast->gid.raw, sizeof mcast->gid.raw)) { in ib_uverbs_attach_mcast()
2492 mcast = kmalloc(sizeof *mcast, GFP_KERNEL); in ib_uverbs_attach_mcast()
2493 if (!mcast) { in ib_uverbs_attach_mcast()
2498 mcast->lid = cmd.mlid; in ib_uverbs_attach_mcast()
2499 memcpy(mcast->gid.raw, cmd.gid, sizeof mcast->gid.raw); in ib_uverbs_attach_mcast()
2501 ret = ib_attach_mcast(qp, &mcast->gid, cmd.mlid); in ib_uverbs_attach_mcast()
2503 list_add_tail(&mcast->list, &obj->mcast_list); in ib_uverbs_attach_mcast()
2505 kfree(mcast); in ib_uverbs_attach_mcast()
2520 struct ib_uverbs_mcast_entry *mcast; in ib_uverbs_detach_mcast() local
2535 list_for_each_entry(mcast, &obj->mcast_list, list) in ib_uverbs_detach_mcast()
2536 if (cmd.mlid == mcast->lid && in ib_uverbs_detach_mcast()
2537 !memcmp(cmd.gid, mcast->gid.raw, sizeof mcast->gid.raw)) { in ib_uverbs_detach_mcast()
2538 list_del(&mcast->list); in ib_uverbs_detach_mcast()
2539 kfree(mcast); in ib_uverbs_detach_mcast()