On Friday 13 July 2007 01:39, Roland Dreier wrote:
> thanks, applied
> 
Need 2 fixes to this patch (sorry about that).
- Jack

2 fixes for mlx4-query-qp.patch:
1. Flow label field is 20 bits, not 24 bits.  Need appropriate mask.
2. When the QP is in the INIT state, the sched_queue field is not yet available
   in the firmware, so the f/w cannot provide the port number in query_qp.  In 
this
   case, need to use the port number which was saved in the kernel qp object.

Found by Dotan Barak and Yaron Gepstein of Mellanox.
Signed-off-by: Jack Morgenstein <[EMAIL PROTECTED]>

--- kernel_patches/fixes/mlx4-query-qp.patch    2007-07-15 10:04:02.678561000 
+0300
+++ kernel_patches/fixes/mlx4-query-qp.patch    2007-07-15 10:07:13.883508000 
+0300
@@ -102,7 +101,7 @@ Index: new_connectx_kernel/drivers/infin
 +              ib_ah_attr->grh.traffic_class =
 +                      (be32_to_cpu(path->tclass_flowlabel) >> 20) & 0xff;
 +              ib_ah_attr->grh.flow_label =
-+                      be32_to_cpu(path->tclass_flowlabel) & 0xffffff;
++                      be32_to_cpu(path->tclass_flowlabel) & 0xfffff;
 +              memcpy(ib_ah_attr->grh.dgid.raw,
 +                      path->rgid, sizeof ib_ah_attr->grh.dgid.raw);
 +      }
@@ -147,7 +146,10 @@ Index: new_connectx_kernel/drivers/infin
 +      }
 +
 +      qp_attr->pkey_index = context.pri_path.pkey_index & 0x7f;
-+      qp_attr->port_num   = context.pri_path.sched_queue & 0x40 ? 2 : 1;
++      if (qp_attr->qp_state == IB_QPS_INIT)
++              qp_attr->port_num = qp->port;
++      else
++              qp_attr->port_num = context.pri_path.sched_queue & 0x40 ? 2 : 1;
 +
 +      /* qp_attr->en_sqd_async_notify is only applicable in modify qp */
 +      qp_attr->sq_draining = mlx4_state == MLX4_QP_STATE_SQ_DRAINING;
_______________________________________________
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