]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/cma: Do not issue MRA if user rejects connection request
authorSean Hefty <sean.hefty@intel.com>
Wed, 13 Feb 2008 22:33:53 +0000 (14:33 -0800)
committerRoland Dreier <rolandd@cisco.com>
Thu, 14 Feb 2008 23:30:41 +0000 (15:30 -0800)
commit0c58adcaddb49595d1d595c0c9632223f95338a8
tree6505d5bc351667a8a3b35fd1025f123081a0bba4
parenta9510e1337469cf3746a8aa3a693e43a82268de9
RDMA/cma: Do not issue MRA if user rejects connection request

There's an undesirable interaction with issuing MRA requests to
increase connection timeouts and the listen backlog.

When the rdma_cm receives a connection request, it queues an MRA with
the ib_cm.  (The ib_cm will send an MRA if it receives a duplicate
REQ.)  The rdma_cm will then create a new rdma_cm_id and give that to
the user, which in this case is the rdma_user_cm.

If the listen backlog maintained in the rdma_user_cm is full, it
destroys the rdma_cm_id, which in turns destroys the ib_cm_id.  The
ib_cm_id generates a REJ because the state of the ib_cm_id has changed
to MRA sent, versus REQ received.  When the backlog is full, we just
want to drop the REQ so that it is retried later.

Fix this by deferring queuing the MRA until after the user of the
rdma_cm has examined the connection request.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/core/cma.c