QoS support according to the proposed LWG2 QoS Annex:
pass sevice ID in SA query

Signed-off-by: Michael S. Tsirkin <[EMAIL PROTECTED]>

---

Index: linux-2.6/drivers/infiniband/ulp/srp/ib_srp.c
===================================================================
--- linux-2.6.orig/drivers/infiniband/ulp/srp/ib_srp.c
+++ linux-2.6/drivers/infiniband/ulp/srp/ib_srp.c
@@ -62,6 +62,11 @@ MODULE_DESCRIPTION("InfiniBand SCSI RDMA
                   "v" DRV_VERSION " (" DRV_RELDATE ")");
 MODULE_LICENSE("Dual BSD/GPL");
 
+static int srp_qos_support;
+
+module_param_named(qos_support, srp_qos_support, int, 0644);
+MODULE_PARM_DESC(qos_support, "Enable QoS support if > 0.");
+
 static int srp_sg_tablesize = SRP_DEF_SG_TABLESIZE;
 static int srp_max_iu_len;
 
@@ -267,7 +272,23 @@ static int srp_lookup_path(struct srp_ta
 
        init_completion(&target->done);
 
-       target->path_query_id = ib_sa_path_rec_get(&srp_sa_client,
+       if (srp_qos_support) {
+               ib_sa_comp_mask m = IB_SA_PATH_REC_DGID |
+                       IB_SA_PATH_REC_SGID             |
+                       IB_SA_PATH_REC_NUMB_PATH        |
+                       IB_SA_PATH_REC_PKEY;
+               target->path.service_id = target->service_id;
+               m |= IB_SA_PATH_REC_SERVICE_ID;
+               target->path_query_id = ib_sa_path_rec_get(&srp_sa_client,
+                                                  target->srp_host->dev->dev,
+                                                  target->srp_host->port,
+                                                  &target->path, m,
+                                                  SRP_PATH_REC_TIMEOUT_MS,
+                                                  GFP_KERNEL,
+                                                  srp_path_rec_completion,
+                                                  target, &target->path_query);
+       } else
+               target->path_query_id = ib_sa_path_rec_get(&srp_sa_client,
                                                   target->srp_host->dev->dev,
                                                   target->srp_host->port,
                                                   &target->path,


-- 
MST

_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to