Lines Matching refs:mgm
83 * Caller must hold MCG table semaphore. gid and mgm parameters must
89 * and *mgm holds MGM entry.
92 * previous entry in hash chain and *mgm holds AMGM entry.
95 * entry in hash chain and *mgm holds end of hash chain.
102 struct mlx4_mgm *mgm = mgm_mailbox->buf;
129 if (!memcmp(mgm->gid, zero_gid, 16)) {
137 if (!memcmp(mgm->gid, gid, 16))
141 *index = be32_to_cpu(mgm->next_gid_index) >> 6;
153 struct mlx4_mgm *mgm;
164 mgm = mailbox->buf;
173 if (!memcmp(mgm->gid, zero_gid, 16))
174 memcpy(mgm->gid, gid, 16);
186 memset(mgm, 0, sizeof *mgm);
187 memcpy(mgm->gid, gid, 16);
190 members_count = be32_to_cpu(mgm->members_count);
198 if ((be32_to_cpu(mgm->qp[i]) & MGM_QPN_MASK) == qp->qpn) {
205 mgm->qp[members_count++] = cpu_to_be32((qp->qpn & MGM_QPN_MASK) |
208 mgm->qp[members_count++] = cpu_to_be32(qp->qpn & MGM_QPN_MASK);
210 mgm->members_count = cpu_to_be32(members_count);
223 mgm->next_gid_index = cpu_to_be32(index << 6);
249 struct mlx4_mgm *mgm;
259 mgm = mailbox->buf;
273 members_count = be32_to_cpu(mgm->members_count);
275 if ((be32_to_cpu(mgm->qp[i]) & MGM_QPN_MASK) == qp->qpn)
285 mgm->members_count = cpu_to_be32(--members_count);
286 mgm->qp[loc] = mgm->qp[i - 1];
287 mgm->qp[i - 1] = 0;
296 int amgm_index = be32_to_cpu(mgm->next_gid_index) >> 6;
302 memset(mgm->gid, 0, 16);
318 int cur_next_index = be32_to_cpu(mgm->next_gid_index) >> 6;
323 mgm->next_gid_index = cpu_to_be32(cur_next_index << 6);