[ofa-general] Re: [PATCH] ipoib_cm: Changed the way QP is being created in ipoib_cm_create_tx_qp
Eli Cohen
eli at dev.mellanox.co.il
Sun Oct 7 01:36:24 PDT 2007
I would add an empty line after the initialization to delimit variable
declarations from statements. Otherwise looks good to me.
On Sun, 2007-10-07 at 09:30 +0200, Dotan Barak wrote:
> Changed the way QP is being created in ipoib_cm_create_tx_qp
> (to be consistent with ipoib_cm_create_rx_qp)
>
> Signed-off-by: Dotan Barak <dotanb at dev.mellanox.co.il>
>
> ---
>
> diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
> index 076a0bb..2a4269e 100644
> --- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c
> +++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
> @@ -813,14 +813,15 @@ static int ipoib_cm_rep_handler(struct ib_cm_id *cm_id, struct ib_cm_event *even
> static struct ib_qp *ipoib_cm_create_tx_qp(struct net_device *dev, struct ib_cq *cq)
> {
> struct ipoib_dev_priv *priv = netdev_priv(dev);
> - struct ib_qp_init_attr attr = {};
> - attr.recv_cq = priv->cq;
> - attr.srq = priv->cm.srq;
> - attr.cap.max_send_wr = ipoib_sendq_size;
> - attr.cap.max_send_sge = 1;
> - attr.sq_sig_type = IB_SIGNAL_ALL_WR;
> - attr.qp_type = IB_QPT_RC;
> - attr.send_cq = cq;
> + struct ib_qp_init_attr attr = {
> + .send_cq = cq,
> + .recv_cq = priv->cq,
> + .srq = priv->cm.srq,
> + .cap.max_send_wr = ipoib_sendq_size,
> + .cap.max_send_sge = 1,
> + .sq_sig_type = IB_SIGNAL_ALL_WR,
> + .qp_type = IB_QPT_RC,
> + };
> return ib_create_qp(priv->pd, &attr);
> }
>
More information about the general
mailing list