/* ib2ehcaqptype maps Ib to ehca qp_type returns ehca qp type corresponding to ib qp type  */
static enum ehca_qp_type ib2ehcaqptype(enum ib_qp_type ibqptype)
/* ib2ehcaqptype maps Ib to ehca qp_type returns ehca qp type corresponding to ib qp type  */
static enum ehca_qp_type ib2ehcaqptype(enum ib_qp_type ibqptype)
{
	switch (ibqptype) {
	case IB_QPT_SMI:
	case IB_QPT_GSI:
		return QPT_SQP;
	case IB_QPT_RC:
		return QPT_RC;
	case IB_QPT_UC:
		return QPT_UC;
	case IB_QPT_UD:
		return QPT_UD;
	default:
		ehca_gen_err("Invalid ibqptype=%x", ibqptype);
		return -EINVAL;
	}
}