OSDN Git Service

srp-target: Retry when QP creation fails with ENOMEM
authorBart Van Assche <bvanassche@acm.org>
Sun, 19 Oct 2014 15:05:33 +0000 (18:05 +0300)
committerNicholas Bellinger <nab@linux-iscsi.org>
Tue, 28 Oct 2014 20:55:08 +0000 (13:55 -0700)
commitab477c1ff5e0a744c072404bf7db51bfe1f05b6e
tree96058ba922e9f7cecd929a464a40cae51cbeaa6e
parentf2774f430ea65fddc068865d364bb254d2816648
srp-target: Retry when QP creation fails with ENOMEM

It is not guaranteed to that srp_sq_size is supported
by the HCA. So if we failed to create the QP with ENOMEM,
try with a smaller srp_sq_size. Keep it up until we hit
MIN_SRPT_SQ_SIZE, then fail the connection.

Reported-by: Mark Lehrer <lehrer@gmail.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Cc: <stable@vger.kernel.org> # 3.4+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/infiniband/ulp/srpt/ib_srpt.c