mbox series

[v4,0/2] iscsi-target: fix login error when receiving is too fast

Message ID 20200716100212.4237-1-houpu@bytedance.com (mailing list archive)
Headers show
Series iscsi-target: fix login error when receiving is too fast | expand

Message

Hou Pu July 16, 2020, 10:02 a.m. UTC
Hi,
We encountered "iSCSI Login negotiation failed" several times.
After enable debug log in iscsi_target_nego.c of iSCSI target.
Error shows:
  "Got LOGIN_FLAGS_READ_ACTIVE=1, conn: xxxxxxxxxx >>>>"

Patch 1 is trying to fix this problem. Please see comment in patch 1
for details.

Sorry for delay of v4. Version 3 of this patchset could be found here[1].

Changes from v4:
* In iscsi_target_do_login_rx(), call cancel_delayed_work() if it is final
  login pdu. Also call cancel_delayed_work() if current negotiation is failed.
  This is advised by Mike Christie. See below[1] for more details.

Changes from v3:
* Fix style problem found by checkpatch.pl.

Changes from v2:
* Improve comments in patch #1.
* Change bit possition of login_flags in patch #1.


[1]:
https://www.spinics.net/lists/target-devel/msg18281.html

Hou Pu (2):
  iscsi-target: fix login error when receiving is too fast
  iscsi-target: Fix inconsistent debug message in
    __iscsi_target_sk_check_close

 drivers/target/iscsi/iscsi_target_nego.c | 36 +++++++++++++++++++++++++++-----
 include/target/iscsi/iscsi_target_core.h |  9 ++++----
 2 files changed, 36 insertions(+), 9 deletions(-)

Comments

Mike Christie July 26, 2020, 2:58 a.m. UTC | #1
On 7/16/20 5:02 AM, Hou Pu wrote:
> Hi,
> We encountered "iSCSI Login negotiation failed" several times.
> After enable debug log in iscsi_target_nego.c of iSCSI target.
> Error shows:
>   "Got LOGIN_FLAGS_READ_ACTIVE=1, conn: xxxxxxxxxx >>>>"
> 
> Patch 1 is trying to fix this problem. Please see comment in patch 1
> for details.
> 
> Sorry for delay of v4. Version 3 of this patchset could be found here[1].
> 
> Changes from v4:
> * In iscsi_target_do_login_rx(), call cancel_delayed_work() if it is final
>   login pdu. Also call cancel_delayed_work() if current negotiation is failed.
>   This is advised by Mike Christie. See below[1] for more details.
> 
> Changes from v3:
> * Fix style problem found by checkpatch.pl.
> 
Ah sorry, I thought I replied a little later about my concerns being overly paranoid and your patch being ok. I don't see it on the list so not sure what happened.

If you are still not liking the cancel call, I'm ok with v3. Add my reviewed by to either version you prefer.

Reviewed-by: Mike Christie <michael.christie@oracle.com>
Hou Pu July 28, 2020, 3:16 a.m. UTC | #2
On 2020/7/26 10:58 上午, Mike Christie wrote:
> On 7/16/20 5:02 AM, Hou Pu wrote:
>> Hi,
>> We encountered "iSCSI Login negotiation failed" several times.
>> After enable debug log in iscsi_target_nego.c of iSCSI target.
>> Error shows:
>>    "Got LOGIN_FLAGS_READ_ACTIVE=1, conn: xxxxxxxxxx >>>>"
>>
>> Patch 1 is trying to fix this problem. Please see comment in patch 1
>> for details.
>>
>> Sorry for delay of v4. Version 3 of this patchset could be found here[1].
>>
>> Changes from v4:
>> * In iscsi_target_do_login_rx(), call cancel_delayed_work() if it is final
>>    login pdu. Also call cancel_delayed_work() if current negotiation is failed.
>>    This is advised by Mike Christie. See below[1] for more details.
>>
>> Changes from v3:
>> * Fix style problem found by checkpatch.pl.
>>
> Ah sorry, I thought I replied a little later about my concerns being overly paranoid and your patch being ok. I don't see it on the list so not sure what happened.
> 
> If you are still not liking the cancel call, I'm ok with v3. Add my reviewed by to either version you prefer.
> 
> Reviewed-by: Mike Christie <michael.christie@oracle.com>
> 

It took me some time to understand how workqueue works and make sure
it is safe to cancel it. So it is delayed between v3 and v4. Sorry
for that.

I think it is necessary to cancel delayed work as your suggestion.

Thanks,
Hou
Martin K. Petersen July 29, 2020, 4:10 a.m. UTC | #3
On Thu, 16 Jul 2020 06:02:10 -0400, Hou Pu wrote:

> We encountered "iSCSI Login negotiation failed" several times.
> After enable debug log in iscsi_target_nego.c of iSCSI target.
> Error shows:
>   "Got LOGIN_FLAGS_READ_ACTIVE=1, conn: xxxxxxxxxx >>>>"
> 
> Patch 1 is trying to fix this problem. Please see comment in patch 1
> for details.
> 
> [...]

Applied to 5.9/scsi-queue, thanks!

[1/2] scsi: target: iscsi: Fix login error when receiving
      https://git.kernel.org/mkp/scsi/c/4e108d4f2816
[2/2] scsi: target: iscsi: Fix inconsistent debug message
      https://git.kernel.org/mkp/scsi/c/df2de6f28629