Lines Matching refs:mgm
153 struct mlx4_mgm *mgm; in new_steering_entry() local
199 mgm = mailbox->buf; in new_steering_entry()
205 members_count = be32_to_cpu(mgm->members_count) & 0xffffff; in new_steering_entry()
206 prot = be32_to_cpu(mgm->members_count) >> 30; in new_steering_entry()
218 mgm->qp[members_count++] = cpu_to_be32(pqp->qpn & MGM_QPN_MASK); in new_steering_entry()
221 mgm->members_count = cpu_to_be32(members_count | (prot << 30)); in new_steering_entry()
336 struct mlx4_mgm *mgm; in promisc_steering_entry() local
349 mgm = mailbox->buf; in promisc_steering_entry()
353 m_count = be32_to_cpu(mgm->members_count) & 0xffffff; in promisc_steering_entry()
358 u32 qpn = be32_to_cpu(mgm->qp[i]) & MGM_QPN_MASK; in promisc_steering_entry()
425 struct mlx4_mgm *mgm; in add_promisc_qp() local
460 mgm = mailbox->buf; in add_promisc_qp()
471 members_count = be32_to_cpu(mgm->members_count) & 0xffffff; in add_promisc_qp()
472 prot = be32_to_cpu(mgm->members_count) >> 30; in add_promisc_qp()
475 if ((be32_to_cpu(mgm->qp[i]) & MGM_QPN_MASK) == qpn) { in add_promisc_qp()
494 mgm->qp[members_count++] = cpu_to_be32(qpn & MGM_QPN_MASK); in add_promisc_qp()
495 mgm->members_count = cpu_to_be32(members_count | (prot << 30)); in add_promisc_qp()
506 memset(mgm, 0, sizeof *mgm); in add_promisc_qp()
514 mgm->qp[members_count++] = cpu_to_be32(dqp->qpn & MGM_QPN_MASK); in add_promisc_qp()
516 mgm->members_count = cpu_to_be32(members_count | MLX4_PROT_ETH << 30); in add_promisc_qp()
543 struct mlx4_mgm *mgm; in remove_promisc_qp() local
577 mgm = mailbox->buf; in remove_promisc_qp()
578 memset(mgm, 0, sizeof *mgm); in remove_promisc_qp()
581 mgm->qp[members_count++] = cpu_to_be32(dqp->qpn & MGM_QPN_MASK); in remove_promisc_qp()
582 mgm->members_count = cpu_to_be32(members_count | MLX4_PROT_ETH << 30); in remove_promisc_qp()
607 members_count = be32_to_cpu(mgm->members_count) & 0xffffff; in remove_promisc_qp()
617 if ((be32_to_cpu(mgm->qp[i]) & MGM_QPN_MASK) == qpn) { in remove_promisc_qp()
630 mgm->qp[loc] = mgm->qp[members_count - 1]; in remove_promisc_qp()
631 mgm->qp[members_count - 1] = 0; in remove_promisc_qp()
632 mgm->members_count = cpu_to_be32(--members_count | in remove_promisc_qp()
675 struct mlx4_mgm *mgm = mgm_mailbox->buf; in find_entry() local
707 if (!(be32_to_cpu(mgm->members_count) & 0xffffff)) { in find_entry()
715 if (!memcmp(mgm->gid, gid, 16) && in find_entry()
716 be32_to_cpu(mgm->members_count) >> 30 == prot) in find_entry()
720 *index = be32_to_cpu(mgm->next_gid_index) >> 6; in find_entry()
1013 struct mlx4_mgm *mgm; in mlx4_qp_attach_common() local
1025 mgm = mailbox->buf; in mlx4_qp_attach_common()
1034 if (!(be32_to_cpu(mgm->members_count) & 0xffffff)) { in mlx4_qp_attach_common()
1036 memcpy(mgm->gid, gid, 16); in mlx4_qp_attach_common()
1050 memset(mgm, 0, sizeof *mgm); in mlx4_qp_attach_common()
1051 memcpy(mgm->gid, gid, 16); in mlx4_qp_attach_common()
1054 members_count = be32_to_cpu(mgm->members_count) & 0xffffff; in mlx4_qp_attach_common()
1062 if ((be32_to_cpu(mgm->qp[i]) & MGM_QPN_MASK) == qp->qpn) { in mlx4_qp_attach_common()
1068 mgm->qp[members_count++] = cpu_to_be32((qp->qpn & MGM_QPN_MASK) | in mlx4_qp_attach_common()
1071 mgm->members_count = cpu_to_be32(members_count | (u32) prot << 30); in mlx4_qp_attach_common()
1085 mgm->next_gid_index = cpu_to_be32(index << 6); in mlx4_qp_attach_common()
1121 struct mlx4_mgm *mgm; in mlx4_qp_detach_common() local
1132 mgm = mailbox->buf; in mlx4_qp_detach_common()
1157 members_count = be32_to_cpu(mgm->members_count) & 0xffffff; in mlx4_qp_detach_common()
1159 if ((be32_to_cpu(mgm->qp[i]) & MGM_QPN_MASK) == qp->qpn) { in mlx4_qp_detach_common()
1171 mgm->qp[loc] = mgm->qp[members_count - 1]; in mlx4_qp_detach_common()
1172 mgm->qp[members_count - 1] = 0; in mlx4_qp_detach_common()
1173 mgm->members_count = cpu_to_be32(--members_count | (u32) prot << 30); in mlx4_qp_detach_common()
1184 mgm->members_count = cpu_to_be32((u32) prot << 30); in mlx4_qp_detach_common()
1188 int amgm_index = be32_to_cpu(mgm->next_gid_index) >> 6; in mlx4_qp_detach_common()
1194 memset(mgm->gid, 0, 16); in mlx4_qp_detach_common()
1210 int cur_next_index = be32_to_cpu(mgm->next_gid_index) >> 6; in mlx4_qp_detach_common()
1215 mgm->next_gid_index = cpu_to_be32(cur_next_index << 6); in mlx4_qp_detach_common()