<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7234.20">
<TITLE>Re: [PATCH] for OFED 1.2</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>On Fri, 2007-02-23 at 12:15 -0800, Sean Hefty wrote:<BR>
> I would like these fixes in OFED 1.2 as well.  What git tree / branch do I<BR>
> generate a patch against?<BR>
><BR>
> - Sean<BR>
<BR>
git://git.openfabrics.org/~vlad/ofed_1_2/.git<BR>
branch: ofed_1_2<BR>
<BR>
- Vladimir<BR>
<BR>
><BR>
> ---<BR>
><BR>
> rdma_cm: remove unused node_guid from cma_device structure.<BR>
> ib_cm: remove ca_guid from cm_device structure.<BR>
> rdma_cm: request reversible paths only.<BR>
> ib_core: Set hop limit in ib_init_ah_from_wc correctly.<BR>
><BR>
> The patches are in:<BR>
><BR>
>       git://git.openfabrics.org/~shefty/rdma-dev.git for-roland<BR>
><BR>
> (sign-off line was added to the actual commit messages)<BR>
><BR>
> Signed-off-by: Sean Hefty <sean.hefty@intel.com><BR>
> ---<BR>
> commit 28e218621d36cf9da42f07af08775769eb289fc0<BR>
> Author: Sean Hefty <sean.hefty@intel.com><BR>
> Date:   Thu Feb 22 11:37:44 2007 -0800<BR>
><BR>
>     rdma_cm: remove unused node_guid from cma_device structure.<BR>
><BR>
> diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c<BR>
> index bb27ce9..d441815 100644<BR>
> --- a/drivers/infiniband/core/cma.c<BR>
> +++ b/drivers/infiniband/core/cma.c<BR>
> @@ -77,7 +77,6 @@ static int next_port;<BR>
>  struct cma_device {<BR>
>       struct list_head        list;<BR>
>       struct ib_device        *device;<BR>
> -     __be64                  node_guid;<BR>
>       struct completion       comp;<BR>
>       atomic_t                refcount;<BR>
>       struct list_head        id_list;<BR>
> @@ -2674,7 +2673,6 @@ static void cma_add_one(struct ib_device *device)<BR>
>               return;<BR>
> <BR>
>       cma_dev->device = device;<BR>
> -     cma_dev->node_guid = device->node_guid;<BR>
> <BR>
>       init_completion(&cma_dev->comp);<BR>
>       atomic_set(&cma_dev->refcount, 1);<BR>
><BR>
> commit 6de97f2a3373357d720b1653dfc0aac6d40b7506<BR>
> Author: Sean Hefty <sean.hefty@intel.com><BR>
> Date:   Thu Feb 22 11:37:38 2007 -0800<BR>
><BR>
>     ib_cm: remove ca_guid from cm_device structure.<BR>
>    <BR>
>     The cm_device references an ib_device, which contains the node_guid.<BR>
><BR>
> diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c<BR>
> index d446998..842cd0b 100644<BR>
> --- a/drivers/infiniband/core/cm.c<BR>
> +++ b/drivers/infiniband/core/cm.c<BR>
> @@ -88,7 +88,6 @@ struct cm_port {<BR>
>  struct cm_device {<BR>
>       struct list_head list;<BR>
>       struct ib_device *device;<BR>
> -     __be64 ca_guid;<BR>
>       struct cm_port port[0];<BR>
>  };<BR>
> <BR>
> @@ -739,8 +738,8 @@ retest:<BR>
>               ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg);<BR>
>               spin_unlock_irqrestore(&cm_id_priv->lock, flags);<BR>
>               ib_send_cm_rej(cm_id, IB_CM_REJ_TIMEOUT,<BR>
> -                            &cm_id_priv->av.port->cm_dev->ca_guid,<BR>
> -                            sizeof cm_id_priv->av.port->cm_dev->ca_guid,<BR>
> +                            &cm_id_priv->id.device->node_guid,<BR>
> +                            sizeof cm_id_priv->id.device->node_guid,<BR>
>                              NULL, 0);<BR>
>               break;<BR>
>       case IB_CM_REQ_RCVD:<BR>
> @@ -883,7 +882,7 @@ static void cm_format_req(struct cm_req_msg *req_msg,<BR>
> <BR>
>       req_msg->local_comm_id = cm_id_priv->id.local_id;<BR>
>       req_msg->service_id = param->service_id;<BR>
> -     req_msg->local_ca_guid = cm_id_priv->av.port->cm_dev->ca_guid;<BR>
> +     req_msg->local_ca_guid = cm_id_priv->id.device->node_guid;<BR>
>       cm_req_set_local_qpn(req_msg, cpu_to_be32(param->qp_num));<BR>
>       cm_req_set_resp_res(req_msg, param->responder_resources);<BR>
>       cm_req_set_init_depth(req_msg, param->initiator_depth);<BR>
> @@ -1442,7 +1441,7 @@ static void cm_format_rep(struct cm_rep_msg *rep_msg,<BR>
>       cm_rep_set_flow_ctrl(rep_msg, param->flow_control);<BR>
>       cm_rep_set_rnr_retry_count(rep_msg, param->rnr_retry_count);<BR>
>       cm_rep_set_srq(rep_msg, param->srq);<BR>
> -     rep_msg->local_ca_guid = cm_id_priv->av.port->cm_dev->ca_guid;<BR>
> +     rep_msg->local_ca_guid = cm_id_priv->id.device->node_guid;<BR>
> <BR>
>       if (param->private_data && param->private_data_len)<BR>
>               memcpy(rep_msg->private_data, param->private_data,<BR>
> @@ -3385,7 +3384,6 @@ static void cm_add_one(struct ib_device *device)<BR>
>               return;<BR>
> <BR>
>       cm_dev->device = device;<BR>
> -     cm_dev->ca_guid = device->node_guid;<BR>
> <BR>
>       set_bit(IB_MGMT_METHOD_SEND, reg_req.method_mask);<BR>
>       for (i = 1; i <= device->phys_port_cnt; i++) {<BR>
><BR>
> commit 87680047dd09ca4a4e8ec575dad215c92cf45ed3<BR>
> Author: Sean Hefty <sean.hefty@intel.com><BR>
> Date:   Wed Feb 21 16:40:44 2007 -0800<BR>
><BR>
>     rdma_cm: request reversible paths only<BR>
>    <BR>
>     The rdma_cm requires that path records be reversible.  Set the reversible<BR>
>     bit when issuing an path record query.<BR>
><BR>
> diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c<BR>
> index f8d69b3..bb27ce9 100644<BR>
> --- a/drivers/infiniband/core/cma.c<BR>
> +++ b/drivers/infiniband/core/cma.c<BR>
> @@ -1492,11 +1492,13 @@ static int cma_query_ib_route(struct rdma_id_private<BR>
> *id_priv, int timeout_ms,<BR>
>       ib_addr_get_dgid(addr, &path_rec.dgid);<BR>
>       path_rec.pkey = cpu_to_be16(ib_addr_get_pkey(addr));<BR>
>       path_rec.numb_path = 1;<BR>
> +     path_rec.reversible = 1;<BR>
> <BR>
>       id_priv->query_id = ib_sa_path_rec_get(&sa_client, id_priv->id.device,<BR>
>                               id_priv->id.port_num, &path_rec,<BR>
>                               IB_SA_PATH_REC_DGID | IB_SA_PATH_REC_SGID |<BR>
> -                             IB_SA_PATH_REC_PKEY | IB_SA_PATH_REC_NUMB_PATH,<BR>
> +                             IB_SA_PATH_REC_PKEY | IB_SA_PATH_REC_NUMB_PATH |<BR>
> +                             IB_SA_PATH_REC_REVERSIBLE,<BR>
>                               timeout_ms, GFP_KERNEL,<BR>
>                               cma_query_handler, work, &id_priv->query);<BR>
> <BR>
><BR>
> commit 30947e5b7db42184d66746ac1187d4abbf89018d<BR>
> Author: Sean Hefty <sean.hefty@intel.com><BR>
> Date:   Wed Feb 21 16:37:31 2007 -0800<BR>
><BR>
>     ib_core: Set hop limit in ib_init_ah_from_wc correctly.<BR>
>    <BR>
>     The hop_limit value in the ah_attr should be 0xFF, not the value read<BR>
>     from the received GRH (which should be 0).  See 13.5.4.4 in the 1.2 IB spec.<BR>
><BR>
> diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c<BR>
> index 8b5dd36..ccdf93d 100644<BR>
> --- a/drivers/infiniband/core/verbs.c<BR>
> +++ b/drivers/infiniband/core/verbs.c<BR>
> @@ -167,7 +167,7 @@ int ib_init_ah_from_wc(struct ib_device *device, u8<BR>
> port_num, struct ib_wc *wc,<BR>
>               ah_attr->grh.sgid_index = (u8) gid_index;<BR>
>               flow_class = be32_to_cpu(grh->version_tclass_flow);<BR>
>               ah_attr->grh.flow_label = flow_class & 0xFFFFF;<BR>
> -             ah_attr->grh.hop_limit = grh->hop_limit;<BR>
> +             ah_attr->grh.hop_limit = 0xFF;<BR>
>               ah_attr->grh.traffic_class = (flow_class >> 20) & 0xFF;<BR>
>       }<BR>
>       return 0;<BR>
</FONT>
</P>

</BODY>
</HTML>