]> git.baikalelectronics.ru Git - kernel.git/commit
IB/iser: Fix login with authentication
authorSergey Gorenko <sergeygo@nvidia.com>
Fri, 5 Aug 2022 06:01:35 +0000 (09:01 +0300)
committerLeon Romanovsky <leonro@nvidia.com>
Tue, 16 Aug 2022 12:56:33 +0000 (15:56 +0300)
commit837f68f85c704ec28ea5616c2b8721a3b2a3db4e
tree1b6b312e9c159af8fc2bcadd3ab4f8b64f37d867
parent3d7dcb2c5450a57f60c448f42be48fdfe456bfdf
IB/iser: Fix login with authentication

The iSER Initiator uses two types of receive buffers:

  - one big login buffer posted by iser_post_recvl();
  - several small message buffers posted by iser_post_recvm().

The login buffer is used at the login phase and full feature phase in
the discovery session. It may take a few requests and responses to
complete the login phase. The message buffers are only used in the
normal operational session at the full feature phase.

After the commit referred in the fixes line, the login operation fails
if the authentication is enabled. That happens because the Initiator
posts a small receive buffer after the first response from Target. So,
the next send operation fails because Target's second response does not
fit into the small receive buffer.

This commit adds additional checks to prevent posting small receive
buffers until the full feature phase.

Fixes: 05753e6286cc ("IB/iser: Fix RNR errors")
Link: https://lore.kernel.org/r/20220805060135.18493-1-sergeygo@nvidia.com
Signed-off-by: Sergey Gorenko <sergeygo@nvidia.com>
Reviewed-by: Max Gurtovoy <mgurtovoy@nvidia.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/ulp/iser/iser_initiator.c