Sean Hefty wrote:
Roland, please pull from:

        git://git.openfabrics.org/~shefty/rdma-dev.git for-roland

This will pick up QoS and CM scalability changes that I would like to get
into 2.6.24 (and OFED 1.3).  All have been posted to the list before, though
the QoS patches have received more attention.

Michael,

I see the below non upstream patch in OFED 1.3 (I guess its also in 1.2 etc). Any reason not to push it upstream? Is this needed also for qos with connectx?

Or.

encode SL in sched_queue field to improve hardware QoS guarantees
for connected QPs.

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

Index: linux-2.6/drivers/infiniband/hw/mthca/mthca_qp.c
===================================================================
--- linux-2.6.orig/drivers/infiniband/hw/mthca/mthca_qp.c
+++ linux-2.6/drivers/infiniband/hw/mthca/mthca_qp.c
@@ -49,6 +49,10 @@
 #include "mthca_memfree.h"
 #include "mthca_wqe.h"
+static int mthca_qos_support = 0;
+module_param_named(qos_support, mthca_qos_support, int, 0644);
+MODULE_PARM_DESC(qos_support, "Enable QoS support if > 0");
+
 enum {
        MTHCA_MAX_DIRECT_QP_SIZE = 4 * PAGE_SIZE,
        MTHCA_ACK_REQ_FREQ       = 10,
@@ -694,6 +698,19 @@ int mthca_modify_qp(struct ib_qp *ibqp, goto out_mailbox; qp_param->opt_param_mask |= cpu_to_be32(MTHCA_QP_OPTPAR_PRIMARY_ADDR_PATH);
+               if (mthca_qos_support) {
+                       u8 sl = attr->ah_attr.sl;
+                       u8 sched_queue = (sl & 0x8) | (sl & (~(sl >> 1)) & 0x4) 
|
+                               ((sl >> 1) & (sl >> 2) & 0x2) | ((sl >> 1) & 
0x1);
+
+                       if (mthca_is_memfree(dev)) {
+                               qp_context->rlkey_arbel_sched_queue |= 
sched_queue;
+                       } else {
+                               qp_context->tavor_sched_queue |= 
cpu_to_be32(sched_queue);
+                       }
+                       qp_param->opt_param_mask |=
+                               cpu_to_be32(MTHCA_QP_OPTPAR_SCHED_QUEUE);
+               }
        }
if (attr_mask & IB_QP_TIMEOUT) {

_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

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

Reply via email to