Re: [openib-general] [PATCH RFC 4 of 5] IB/mthca: QoS support

2007-01-31 Thread Hal Rosenstock
On Mon, 2007-01-22 at 09:50, Michael S. Tsirkin wrote:
 encode SL in sched_queue field to improve hardware QoS guarantees
 for connected QPs.

Is UD already handled properly in terms of mthca ?

-- Hal

 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 |= sched_queue;
 + }
 + qp_param-opt_param_mask |=
 + cpu_to_be32(MTHCA_QP_OPTPAR_SCHED_QUEUE);
 + }
   }
  
   if (attr_mask  IB_QP_TIMEOUT) {
 


___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

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



Re: [openib-general] [PATCH RFC 4 of 5] IB/mthca: QoS support

2007-01-31 Thread Michael S. Tsirkin
 Quoting Hal Rosenstock [EMAIL PROTECTED]:
 Subject: Re: [PATCH RFC 4 of 5] IB/mthca: QoS support
 
 On Mon, 2007-01-22 at 09:50, Michael S. Tsirkin wrote:
  encode SL in sched_queue field to improve hardware QoS guarantees
  for connected QPs.
 
 Is UD already handled properly in terms of mthca ?

It's not the question of proper handling - this patch is an enhancement,
not really a bug fix. I think mthca already does the best it can with UD AVs.

-- 
MST

___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

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



Re: [openib-general] [PATCH RFC 4 of 5] IB/mthca: QoS support

2007-01-31 Thread Hal Rosenstock
On Wed, 2007-01-31 at 14:09, Michael S. Tsirkin wrote:
  Quoting Hal Rosenstock [EMAIL PROTECTED]:
  Subject: Re: [PATCH RFC 4 of 5] IB/mthca: QoS support
  
  On Mon, 2007-01-22 at 09:50, Michael S. Tsirkin wrote:
   encode SL in sched_queue field to improve hardware QoS guarantees
   for connected QPs.
  
  Is UD already handled properly in terms of mthca ?
 
 It's not the question of proper handling - this patch is an enhancement,
 not really a bug fix. I think mthca already does the best it can with UD AVs.

So there are no scheduling parameters or anything else that needs
tweaking in mthca in terms of the SL for UD AVs ? Just want to be sure.

-- Hal


___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

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



Re: [openib-general] [PATCH RFC 4 of 5] IB/mthca: QoS support

2007-01-31 Thread Michael S. Tsirkin
 Quoting Hal Rosenstock [EMAIL PROTECTED]:
 Subject: Re: [PATCH RFC 4 of 5] IB/mthca: QoS support
 
 On Wed, 2007-01-31 at 14:09, Michael S. Tsirkin wrote:
   Quoting Hal Rosenstock [EMAIL PROTECTED]:
   Subject: Re: [PATCH RFC 4 of 5] IB/mthca: QoS support
   
   On Mon, 2007-01-22 at 09:50, Michael S. Tsirkin wrote:
encode SL in sched_queue field to improve hardware QoS guarantees
for connected QPs.
   
   Is UD already handled properly in terms of mthca ?
  
  It's not the question of proper handling - this patch is an enhancement,
  not really a bug fix. I think mthca already does the best it can with UD 
  AVs.
 
 So there are no scheduling parameters or anything else that needs
 tweaking in mthca in terms of the SL for UD AVs ? Just want to be sure.

Not that I know.

-- 
MST

___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

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



[openib-general] [PATCH RFC 4 of 5] IB/mthca: QoS support

2007-01-22 Thread Michael S. Tsirkin
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 |= sched_queue;
+   }
+   qp_param-opt_param_mask |=
+   cpu_to_be32(MTHCA_QP_OPTPAR_SCHED_QUEUE);
+   }
}
 
if (attr_mask  IB_QP_TIMEOUT) {


-- 
MST

___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

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