RE: [PATCH v2 4/8] IB/srpt: Change default behavior from using SRQ to using RC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> The RNR naks are happening because ALL post receives fail in a QP state of
> reset.
> 

Moving the post receives till after the init works:

diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c
index 304855b..98b1b80 100644
--- a/drivers/infiniband/ulp/srpt/ib_srpt.c
+++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
@@ -1687,10 +1687,6 @@ static int srpt_create_ch_ib(struct srpt_rdma_ch *ch)
                goto err_destroy_cq;
        }

-       if (!sdev->use_srq)
-               for (i = 0; i < ch->rq_size; i++)
-                       srpt_post_recv(sdev, ch, ch->ioctx_recv_ring[i]);
-
        atomic_set(&ch->sq_wr_avail, qp_init->cap.max_send_wr);

        pr_debug("%s: max_cqe= %d max_sge= %d sq_size = %d cm_id= %p\n",
@@ -1701,6 +1697,10 @@ static int srpt_create_ch_ib(struct srpt_rdma_ch *ch)
        if (ret)
                goto err_destroy_qp;

+       if (!sdev->use_srq)
+               for (i = 0; i < ch->rq_size; i++)
+                       srpt_post_recv(sdev, ch, ch->ioctx_recv_ring[i]);
+
 out:
        kfree(qp_init);
        return ret;
��.n��������+%������w��{.n�����{���fk��ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux