[openib-general] [PATCH RFC 2 of 5] IB/cma: QoS support

Sean Hefty mshefty at ichips.intel.com
Mon Jan 22 09:59:13 PST 2007


> -	id_priv->query_id = ib_sa_path_rec_get(&sa_client, id_priv->id.device,
> +	if (cma_qos_support) {
> +		ib_sa_comp_mask m = IB_SA_PATH_REC_DGID | IB_SA_PATH_REC_SGID |
> +			IB_SA_PATH_REC_PKEY | IB_SA_PATH_REC_NUMB_PATH;
> +		struct sockaddr *sockaddr = &id_priv->id.route.addr.dst_addr;
> +		__be64 svc_id = cma_get_service_id(id_priv->id.ps, sockaddr);
> +
> +		path_rec.service_id = svc_id;
> +		m |= IB_SA_PATH_REC_SERVICE_ID;
> +		if (id_priv->priority) {
> +			path_rec.priority = __cpu_to_be16(id_priv->priority);
> +			m |= IB_SA_PATH_REC_PRIORITY;
> +		}
> +		id_priv->query_id = ib_sa_path_rec_get(&sa_client, id_priv->id.device,
> +				id_priv->id.port_num, &path_rec, m,
> +				timeout_ms, GFP_KERNEL,
> +				cma_query_handler, work, &id_priv->query);
> +	} else
> +		id_priv->query_id = ib_sa_path_rec_get(&sa_client, id_priv->id.device,
>  				id_priv->id.port_num, &path_rec,
>  				IB_SA_PATH_REC_DGID | IB_SA_PATH_REC_SGID |
>  				IB_SA_PATH_REC_PKEY | IB_SA_PATH_REC_NUMB_PATH,

Minor comment that we might be able to restructure this slightly to have a 
single call to ib_sa_path_rec_get().

What I'm not as sure about is separating the call to set the priority from 
resolving the route.  My first impression was that this was a good idea, but it 
may give the impression that the priority can change after route resolution. 
Does anyone else have any thoughts on this?

- Sean




More information about the general mailing list