/* ibqptype2servicetype returns hcp service type corresponding to given ib qp type used by create_qp()  */
static int ibqptype2servicetype(enum ib_qp_type ibqptype)
/* ibqptype2servicetype returns hcp service type corresponding to given ib qp type used by create_qp()  */
static int ibqptype2servicetype(enum ib_qp_type ibqptype)
{
	switch (ibqptype) {
	case IB_QPT_SMI:
	case IB_QPT_GSI:
		return ST_UD;
	case IB_QPT_RC:
		return ST_RC;
	case IB_QPT_UC:
		return ST_UC;
	case IB_QPT_UD:
		return ST_UD;
	case IB_QPT_RAW_IPV6:
		return -EINVAL;
	case IB_QPT_RAW_ETY:
		return -EINVAL;
	default:
		ehca_gen_err("Invalid ibqptype=%x", ibqptype);
		return -EINVAL;
	}
}