public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* ISCSI says "Session Doesn't Exist"
@ 2017-02-24 13:58 Santhapur Naveen
  2017-02-27  7:53 ` Ye, Ting
  0 siblings, 1 reply; 8+ messages in thread
From: Santhapur Naveen @ 2017-02-24 13:58 UTC (permalink / raw)
  To: edk2-devel@lists.01.org

Hello all,

    I've a question about IScsi and any suggestions would be helpful

[Issue Summary]
If I add an ISCSI attempt and on the next reboot, a connection will be established in between the initiator and the target. Till now, it is fine. Now if I do an immediate reset with in 20 seconds, on the next boot, the initiator is trying to establish a session, but the target rejects saying "Session does not exist". If I reset after 20 seconds or so, the connection would have been established with the same login details.

To dive deeper, I've checked the RFC documentation on this and found the following information. But when I checked the wireshark capture, I found my TSIH is ZERO even for the immediate session. If I want to make my immediate session also into a successful one, what should I be doing? I'm aware that there's a function available IScsiSessionAbort(). Would it help me or provide your suggestions to get me going.


   +------------------------------------------------------------------+

   |ISID      | TSIH        | CID    |     Target action              |

   +------------------------------------------------------------------+

   |new       | non-zero    | any    |     fail the login             |

   |          |             |        |     ("session does not exist") |

   +------------------------------------------------------------------+

   |new       | zero        | any    |     instantiate a new session  |

   +------------------------------------------------------------------+

   |existing  | zero        | any    |     do session reinstatement   |

   |          |             |        |     (see section 5.3.5)        |

   +------------------------------------------------------------------+

   |existing  | non-zero    | new    |     add a new connection to    |

   |          | existing    |        |     the session                |

   +------------------------------------------------------------------+

   |existing  | non-zero    |existing|     do connection reinstatement|

   |          | existing    |        |    (see section 5.3.4)         |

   +------------------------------------------------------------------+

   |existing  | non-zero    | any    |         fail the login         |

   |          | new         |        |     ("session does not exist") |

   +------------------------------------------------------------------+


Thanks,
Naveen


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ISCSI says "Session Doesn't Exist"
  2017-02-24 13:58 ISCSI says "Session Doesn't Exist" Santhapur Naveen
@ 2017-02-27  7:53 ` Ye, Ting
  2017-02-27 20:03   ` Santhapur Naveen
  0 siblings, 1 reply; 8+ messages in thread
From: Ye, Ting @ 2017-02-27  7:53 UTC (permalink / raw)
  To: Santhapur Naveen, edk2-devel@lists.01.org

Hi Naveen,

According to the table you shared (defined in RFC 3720), it seems when TSIH is ZERO, the target should not fail the login with "session does not exist". 

   +------------------------------------------------------------------+
   |new       | zero        | any    |     instantiate a new session  |
   +------------------------------------------------------------------+
   |existing  | zero        | any    |     do session reinstatement   |
   |          |             |        |     (see section 5.3.5)        |
   +------------------------------------------------------------------+

I checked the latest code in NetworkPkg/IScsiDxe, the Tsih is always set to ZERO in IScsiSessionInit. The immediate reset will also trigger driver binding start so IScsiSessionInit will be executed.

It seems to me your iSCSI target does not comply with the rules defined in RFC documentation. If possible, would you please tell us which iSCSI target are you using?

Thanks,
Ting

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Santhapur Naveen
Sent: Friday, February 24, 2017 9:59 PM
To: edk2-devel@lists.01.org
Subject: [edk2] ISCSI says "Session Doesn't Exist"

Hello all,

    I've a question about IScsi and any suggestions would be helpful

[Issue Summary]
If I add an ISCSI attempt and on the next reboot, a connection will be established in between the initiator and the target. Till now, it is fine. Now if I do an immediate reset with in 20 seconds, on the next boot, the initiator is trying to establish a session, but the target rejects saying "Session does not exist". If I reset after 20 seconds or so, the connection would have been established with the same login details.

To dive deeper, I've checked the RFC documentation on this and found the following information. But when I checked the wireshark capture, I found my TSIH is ZERO even for the immediate session. If I want to make my immediate session also into a successful one, what should I be doing? I'm aware that there's a function available IScsiSessionAbort(). Would it help me or provide your suggestions to get me going.


   +------------------------------------------------------------------+

   |ISID      | TSIH        | CID    |     Target action              |

   +------------------------------------------------------------------+

   |new       | non-zero    | any    |     fail the login             |

   |          |             |        |     ("session does not exist") |

   +------------------------------------------------------------------+

   |new       | zero        | any    |     instantiate a new session  |

   +------------------------------------------------------------------+

   |existing  | zero        | any    |     do session reinstatement   |

   |          |             |        |     (see section 5.3.5)        |

   +------------------------------------------------------------------+

   |existing  | non-zero    | new    |     add a new connection to    |

   |          | existing    |        |     the session                |

   +------------------------------------------------------------------+

   |existing  | non-zero    |existing|     do connection reinstatement|

   |          | existing    |        |    (see section 5.3.4)         |

   +------------------------------------------------------------------+

   |existing  | non-zero    | any    |         fail the login         |

   |          | new         |        |     ("session does not exist") |

   +------------------------------------------------------------------+


Thanks,
Naveen
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ISCSI says "Session Doesn't Exist"
  2017-02-27  7:53 ` Ye, Ting
@ 2017-02-27 20:03   ` Santhapur Naveen
  2017-02-28  8:52     ` Ye, Ting
  2017-03-01  6:35     ` Zhang, Lubo
  0 siblings, 2 replies; 8+ messages in thread
From: Santhapur Naveen @ 2017-02-27 20:03 UTC (permalink / raw)
  To: Ye, Ting, edk2-devel@lists.01.org

Hello Ting,

I've configured iSCSI target in Windows Server 2012. And the procedure is similar as in https://blogs.technet.microsoft.com/filecab/2012/05/21/introduction-of-iscsi-target-in-windows-server-2012/
Please let me know if I had to make any changes to my iSCSI server.

Thank you,
Naveen
________________________________________
From: Ye, Ting [ting.ye@intel.com]
Sent: Monday, February 27, 2017 1:23 PM
To: Santhapur Naveen; edk2-devel@lists.01.org
Subject: RE: ISCSI says "Session Doesn't Exist"

Hi Naveen,

According to the table you shared (defined in RFC 3720), it seems when TSIH is ZERO, the target should not fail the login with "session does not exist".

   +------------------------------------------------------------------+
   |new       | zero        | any    |     instantiate a new session  |
   +------------------------------------------------------------------+
   |existing  | zero        | any    |     do session reinstatement   |
   |          |             |        |     (see section 5.3.5)        |
   +------------------------------------------------------------------+

I checked the latest code in NetworkPkg/IScsiDxe, the Tsih is always set to ZERO in IScsiSessionInit. The immediate reset will also trigger driver binding start so IScsiSessionInit will be executed.

It seems to me your iSCSI target does not comply with the rules defined in RFC documentation. If possible, would you please tell us which iSCSI target are you using?

Thanks,
Ting

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Santhapur Naveen
Sent: Friday, February 24, 2017 9:59 PM
To: edk2-devel@lists.01.org
Subject: [edk2] ISCSI says "Session Doesn't Exist"

Hello all,

    I've a question about IScsi and any suggestions would be helpful

[Issue Summary]
If I add an ISCSI attempt and on the next reboot, a connection will be established in between the initiator and the target. Till now, it is fine. Now if I do an immediate reset with in 20 seconds, on the next boot, the initiator is trying to establish a session, but the target rejects saying "Session does not exist". If I reset after 20 seconds or so, the connection would have been established with the same login details.

To dive deeper, I've checked the RFC documentation on this and found the following information. But when I checked the wireshark capture, I found my TSIH is ZERO even for the immediate session. If I want to make my immediate session also into a successful one, what should I be doing? I'm aware that there's a function available IScsiSessionAbort(). Would it help me or provide your suggestions to get me going.


   +------------------------------------------------------------------+

   |ISID      | TSIH        | CID    |     Target action              |

   +------------------------------------------------------------------+

   |new       | non-zero    | any    |     fail the login             |

   |          |             |        |     ("session does not exist") |

   +------------------------------------------------------------------+

   |new       | zero        | any    |     instantiate a new session  |

   +------------------------------------------------------------------+

   |existing  | zero        | any    |     do session reinstatement   |

   |          |             |        |     (see section 5.3.5)        |

   +------------------------------------------------------------------+

   |existing  | non-zero    | new    |     add a new connection to    |

   |          | existing    |        |     the session                |

   +------------------------------------------------------------------+

   |existing  | non-zero    |existing|     do connection reinstatement|

   |          | existing    |        |    (see section 5.3.4)         |

   +------------------------------------------------------------------+

   |existing  | non-zero    | any    |         fail the login         |

   |          | new         |        |     ("session does not exist") |

   +------------------------------------------------------------------+


Thanks,
Naveen
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ISCSI says "Session Doesn't Exist"
  2017-02-27 20:03   ` Santhapur Naveen
@ 2017-02-28  8:52     ` Ye, Ting
  2017-03-14  1:54       ` Zhang, Lubo
  2017-03-01  6:35     ` Zhang, Lubo
  1 sibling, 1 reply; 8+ messages in thread
From: Ye, Ting @ 2017-02-28  8:52 UTC (permalink / raw)
  To: Santhapur Naveen, edk2-devel@lists.01.org

Hi Naveen,

Thanks for your info. We are able to reproduce the issue using Windows Server 2012 now. So far we are still not sure whether it is a particular issue in Windows iSCSI target or UEFI iSCSI initiator.

Will update to you once we have further information later. 

For your info: A link describes the know issues in Windows Server 2012 iSCSI target, https://technet.microsoft.com/en-us/library/jj863561(v=ws.11).aspx. It has a related issue but not the same one we met now. 

Standard Login Key Negotiation
RFC 3720, section 10.13.3, specifies the following:
For a new session, the target MUST generate a non-zero TSIH and ONLY return it in the Login Final-Response.
The behavior exhibited by ISCSI Target Server:
When the iSCSI initiator performed a standard login and negotiated the login parameters, the iSCSI Target Server was observed to set the TSIH field in the first Login Response PDU.

Thanks,
Ting


-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Santhapur Naveen
Sent: Tuesday, February 28, 2017 4:04 AM
To: Ye, Ting <ting.ye@intel.com>; edk2-devel@lists.01.org
Subject: Re: [edk2] ISCSI says "Session Doesn't Exist"

Hello Ting,

I've configured iSCSI target in Windows Server 2012. And the procedure is similar as in https://blogs.technet.microsoft.com/filecab/2012/05/21/introduction-of-iscsi-target-in-windows-server-2012/
Please let me know if I had to make any changes to my iSCSI server.

Thank you,
Naveen
________________________________________
From: Ye, Ting [ting.ye@intel.com]
Sent: Monday, February 27, 2017 1:23 PM
To: Santhapur Naveen; edk2-devel@lists.01.org
Subject: RE: ISCSI says "Session Doesn't Exist"

Hi Naveen,

According to the table you shared (defined in RFC 3720), it seems when TSIH is ZERO, the target should not fail the login with "session does not exist".

   +------------------------------------------------------------------+
   |new       | zero        | any    |     instantiate a new session  |
   +------------------------------------------------------------------+
   |existing  | zero        | any    |     do session reinstatement   |
   |          |             |        |     (see section 5.3.5)        |
   +------------------------------------------------------------------+

I checked the latest code in NetworkPkg/IScsiDxe, the Tsih is always set to ZERO in IScsiSessionInit. The immediate reset will also trigger driver binding start so IScsiSessionInit will be executed.

It seems to me your iSCSI target does not comply with the rules defined in RFC documentation. If possible, would you please tell us which iSCSI target are you using?

Thanks,
Ting

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Santhapur Naveen
Sent: Friday, February 24, 2017 9:59 PM
To: edk2-devel@lists.01.org
Subject: [edk2] ISCSI says "Session Doesn't Exist"

Hello all,

    I've a question about IScsi and any suggestions would be helpful

[Issue Summary]
If I add an ISCSI attempt and on the next reboot, a connection will be established in between the initiator and the target. Till now, it is fine. Now if I do an immediate reset with in 20 seconds, on the next boot, the initiator is trying to establish a session, but the target rejects saying "Session does not exist". If I reset after 20 seconds or so, the connection would have been established with the same login details.

To dive deeper, I've checked the RFC documentation on this and found the following information. But when I checked the wireshark capture, I found my TSIH is ZERO even for the immediate session. If I want to make my immediate session also into a successful one, what should I be doing? I'm aware that there's a function available IScsiSessionAbort(). Would it help me or provide your suggestions to get me going.


   +------------------------------------------------------------------+

   |ISID      | TSIH        | CID    |     Target action              |

   +------------------------------------------------------------------+

   |new       | non-zero    | any    |     fail the login             |

   |          |             |        |     ("session does not exist") |

   +------------------------------------------------------------------+

   |new       | zero        | any    |     instantiate a new session  |

   +------------------------------------------------------------------+

   |existing  | zero        | any    |     do session reinstatement   |

   |          |             |        |     (see section 5.3.5)        |

   +------------------------------------------------------------------+

   |existing  | non-zero    | new    |     add a new connection to    |

   |          | existing    |        |     the session                |

   +------------------------------------------------------------------+

   |existing  | non-zero    |existing|     do connection reinstatement|

   |          | existing    |        |    (see section 5.3.4)         |

   +------------------------------------------------------------------+

   |existing  | non-zero    | any    |         fail the login         |

   |          | new         |        |     ("session does not exist") |

   +------------------------------------------------------------------+


Thanks,
Naveen
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ISCSI says "Session Doesn't Exist"
  2017-02-27 20:03   ` Santhapur Naveen
  2017-02-28  8:52     ` Ye, Ting
@ 2017-03-01  6:35     ` Zhang, Lubo
  1 sibling, 0 replies; 8+ messages in thread
From: Zhang, Lubo @ 2017-03-01  6:35 UTC (permalink / raw)
  To: Santhapur Naveen; +Cc: Ye, Ting, edk2-devel@lists.01.org

Hi Naveen

    For the issue summary you mentioned, I take a test on iscsi target which deployed on Debian operating system, it works even if we do an immediate reset within 20 seconds after the first correct connection. But I am not quite sure it is a target server issue. 
    Will investigate and inform you if we have future information later.

Thanks
Lubo

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Santhapur Naveen
Sent: Tuesday, February 28, 2017 4:04 AM
To: Ye, Ting <ting.ye@intel.com>; edk2-devel@lists.01.org
Subject: Re: [edk2] ISCSI says "Session Doesn't Exist"

Hello Ting,

I've configured iSCSI target in Windows Server 2012. And the procedure is similar as in https://blogs.technet.microsoft.com/filecab/2012/05/21/introduction-of-iscsi-target-in-windows-server-2012/
Please let me know if I had to make any changes to my iSCSI server.

Thank you,
Naveen
________________________________________
From: Ye, Ting [ting.ye@intel.com]
Sent: Monday, February 27, 2017 1:23 PM
To: Santhapur Naveen; edk2-devel@lists.01.org
Subject: RE: ISCSI says "Session Doesn't Exist"

Hi Naveen,

According to the table you shared (defined in RFC 3720), it seems when TSIH is ZERO, the target should not fail the login with "session does not exist".

   +------------------------------------------------------------------+
   |new       | zero        | any    |     instantiate a new session  |
   +------------------------------------------------------------------+
   |existing  | zero        | any    |     do session reinstatement   |
   |          |             |        |     (see section 5.3.5)        |
   +------------------------------------------------------------------+

I checked the latest code in NetworkPkg/IScsiDxe, the Tsih is always set to ZERO in IScsiSessionInit. The immediate reset will also trigger driver binding start so IScsiSessionInit will be executed.

It seems to me your iSCSI target does not comply with the rules defined in RFC documentation. If possible, would you please tell us which iSCSI target are you using?

Thanks,
Ting

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Santhapur Naveen
Sent: Friday, February 24, 2017 9:59 PM
To: edk2-devel@lists.01.org
Subject: [edk2] ISCSI says "Session Doesn't Exist"

Hello all,

    I've a question about IScsi and any suggestions would be helpful

[Issue Summary]
If I add an ISCSI attempt and on the next reboot, a connection will be established in between the initiator and the target. Till now, it is fine. Now if I do an immediate reset with in 20 seconds, on the next boot, the initiator is trying to establish a session, but the target rejects saying "Session does not exist". If I reset after 20 seconds or so, the connection would have been established with the same login details.

To dive deeper, I've checked the RFC documentation on this and found the following information. But when I checked the wireshark capture, I found my TSIH is ZERO even for the immediate session. If I want to make my immediate session also into a successful one, what should I be doing? I'm aware that there's a function available IScsiSessionAbort(). Would it help me or provide your suggestions to get me going.


   +------------------------------------------------------------------+

   |ISID      | TSIH        | CID    |     Target action              |

   +------------------------------------------------------------------+

   |new       | non-zero    | any    |     fail the login             |

   |          |             |        |     ("session does not exist") |

   +------------------------------------------------------------------+

   |new       | zero        | any    |     instantiate a new session  |

   +------------------------------------------------------------------+

   |existing  | zero        | any    |     do session reinstatement   |

   |          |             |        |     (see section 5.3.5)        |

   +------------------------------------------------------------------+

   |existing  | non-zero    | new    |     add a new connection to    |

   |          | existing    |        |     the session                |

   +------------------------------------------------------------------+

   |existing  | non-zero    |existing|     do connection reinstatement|

   |          | existing    |        |    (see section 5.3.4)         |

   +------------------------------------------------------------------+

   |existing  | non-zero    | any    |         fail the login         |

   |          | new         |        |     ("session does not exist") |

   +------------------------------------------------------------------+


Thanks,
Naveen
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ISCSI says "Session Doesn't Exist"
  2017-02-28  8:52     ` Ye, Ting
@ 2017-03-14  1:54       ` Zhang, Lubo
  2017-03-14  5:00         ` Santhapur Naveen
  0 siblings, 1 reply; 8+ messages in thread
From: Zhang, Lubo @ 2017-03-14  1:54 UTC (permalink / raw)
  To: Santhapur Naveen; +Cc: Ye, Ting, edk2-devel@lists.01.org

Hi Naveen

     For this issue you mentioned, I have found the root cause. After we established the iSCSI connection between initiator and target server, if we use the following command immediately 

Reset command (system power off, will not perform driver binding stop, from my debug log) : we can rebuilt the iSCSI connection if the target is deployed on Debain OS, but failed on windows server, this is the target server behavior. Since we do not send the reset packet on my platform, so the windows target server think our session is still exist and reject the new session request.

Reconnect -r:  this command will execute the iSCSI driver binding stop function and reset the TCP connection actively. But we cannot capture the reset packet either.  I debugged and find that before we reset the socket in IScsiSessionAbort, the socket configured state has already been set as unconfigured in tcp driver binding stop , so we will not invoke the TCP dispatch to abort the connection by sending a reset packet.

This is a Tcp service binding  destroy child issue, I will send a patch to fix.


Best regards
Lubo

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ye, Ting
Sent: Tuesday, February 28, 2017 4:53 PM
To: Santhapur Naveen <naveens@amiindia.co.in>; edk2-devel@lists.01.org
Subject: Re: [edk2] ISCSI says "Session Doesn't Exist"

Hi Naveen,

Thanks for your info. We are able to reproduce the issue using Windows Server 2012 now. So far we are still not sure whether it is a particular issue in Windows iSCSI target or UEFI iSCSI initiator.

Will update to you once we have further information later. 

For your info: A link describes the know issues in Windows Server 2012 iSCSI target, https://technet.microsoft.com/en-us/library/jj863561(v=ws.11).aspx. It has a related issue but not the same one we met now. 

Standard Login Key Negotiation
RFC 3720, section 10.13.3, specifies the following:
For a new session, the target MUST generate a non-zero TSIH and ONLY return it in the Login Final-Response.
The behavior exhibited by ISCSI Target Server:
When the iSCSI initiator performed a standard login and negotiated the login parameters, the iSCSI Target Server was observed to set the TSIH field in the first Login Response PDU.

Thanks,
Ting


-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Santhapur Naveen
Sent: Tuesday, February 28, 2017 4:04 AM
To: Ye, Ting <ting.ye@intel.com>; edk2-devel@lists.01.org
Subject: Re: [edk2] ISCSI says "Session Doesn't Exist"

Hello Ting,

I've configured iSCSI target in Windows Server 2012. And the procedure is similar as in https://blogs.technet.microsoft.com/filecab/2012/05/21/introduction-of-iscsi-target-in-windows-server-2012/
Please let me know if I had to make any changes to my iSCSI server.

Thank you,
Naveen
________________________________________
From: Ye, Ting [ting.ye@intel.com]
Sent: Monday, February 27, 2017 1:23 PM
To: Santhapur Naveen; edk2-devel@lists.01.org
Subject: RE: ISCSI says "Session Doesn't Exist"

Hi Naveen,

According to the table you shared (defined in RFC 3720), it seems when TSIH is ZERO, the target should not fail the login with "session does not exist".

   +------------------------------------------------------------------+
   |new       | zero        | any    |     instantiate a new session  |
   +------------------------------------------------------------------+
   |existing  | zero        | any    |     do session reinstatement   |
   |          |             |        |     (see section 5.3.5)        |
   +------------------------------------------------------------------+

I checked the latest code in NetworkPkg/IScsiDxe, the Tsih is always set to ZERO in IScsiSessionInit. The immediate reset will also trigger driver binding start so IScsiSessionInit will be executed.

It seems to me your iSCSI target does not comply with the rules defined in RFC documentation. If possible, would you please tell us which iSCSI target are you using?

Thanks,
Ting

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Santhapur Naveen
Sent: Friday, February 24, 2017 9:59 PM
To: edk2-devel@lists.01.org
Subject: [edk2] ISCSI says "Session Doesn't Exist"

Hello all,

    I've a question about IScsi and any suggestions would be helpful

[Issue Summary]
If I add an ISCSI attempt and on the next reboot, a connection will be established in between the initiator and the target. Till now, it is fine. Now if I do an immediate reset with in 20 seconds, on the next boot, the initiator is trying to establish a session, but the target rejects saying "Session does not exist". If I reset after 20 seconds or so, the connection would have been established with the same login details.

To dive deeper, I've checked the RFC documentation on this and found the following information. But when I checked the wireshark capture, I found my TSIH is ZERO even for the immediate session. If I want to make my immediate session also into a successful one, what should I be doing? I'm aware that there's a function available IScsiSessionAbort(). Would it help me or provide your suggestions to get me going.


   +------------------------------------------------------------------+

   |ISID      | TSIH        | CID    |     Target action              |

   +------------------------------------------------------------------+

   |new       | non-zero    | any    |     fail the login             |

   |          |             |        |     ("session does not exist") |

   +------------------------------------------------------------------+

   |new       | zero        | any    |     instantiate a new session  |

   +------------------------------------------------------------------+

   |existing  | zero        | any    |     do session reinstatement   |

   |          |             |        |     (see section 5.3.5)        |

   +------------------------------------------------------------------+

   |existing  | non-zero    | new    |     add a new connection to    |

   |          | existing    |        |     the session                |

   +------------------------------------------------------------------+

   |existing  | non-zero    |existing|     do connection reinstatement|

   |          | existing    |        |    (see section 5.3.4)         |

   +------------------------------------------------------------------+

   |existing  | non-zero    | any    |         fail the login         |

   |          | new         |        |     ("session does not exist") |

   +------------------------------------------------------------------+


Thanks,
Naveen
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ISCSI says "Session Doesn't Exist"
  2017-03-14  1:54       ` Zhang, Lubo
@ 2017-03-14  5:00         ` Santhapur Naveen
  2017-03-14  5:06           ` Zhang, Lubo
  0 siblings, 1 reply; 8+ messages in thread
From: Santhapur Naveen @ 2017-03-14  5:00 UTC (permalink / raw)
  To: Zhang, Lubo; +Cc: Ye, Ting, edk2-devel@lists.01.org

Hi Lubo,

Many thanks for your update.

You mean to say that this issue is because of the TCP Service and this can be fixed with the path you are yet to send. Am I right?

Warm Regards,
Naveen
________________________________________
From: Zhang, Lubo [lubo.zhang@intel.com]
Sent: Tuesday, March 14, 2017 7:24 AM
To: Santhapur Naveen
Cc: Ye, Ting; edk2-devel@lists.01.org
Subject: RE: ISCSI says "Session Doesn't Exist"

Hi Naveen

     For this issue you mentioned, I have found the root cause. After we established the iSCSI connection between initiator and target server, if we use the following command immediately

Reset command (system power off, will not perform driver binding stop, from my debug log) : we can rebuilt the iSCSI connection if the target is deployed on Debain OS, but failed on windows server, this is the target server behavior. Since we do not send the reset packet on my platform, so the windows target server think our session is still exist and reject the new session request.

Reconnect -r:  this command will execute the iSCSI driver binding stop function and reset the TCP connection actively. But we cannot capture the reset packet either.  I debugged and find that before we reset the socket in IScsiSessionAbort, the socket configured state has already been set as unconfigured in tcp driver binding stop , so we will not invoke the TCP dispatch to abort the connection by sending a reset packet.

This is a Tcp service binding  destroy child issue, I will send a patch to fix.


Best regards
Lubo

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ye, Ting
Sent: Tuesday, February 28, 2017 4:53 PM
To: Santhapur Naveen <naveens@amiindia.co.in>; edk2-devel@lists.01.org
Subject: Re: [edk2] ISCSI says "Session Doesn't Exist"

Hi Naveen,

Thanks for your info. We are able to reproduce the issue using Windows Server 2012 now. So far we are still not sure whether it is a particular issue in Windows iSCSI target or UEFI iSCSI initiator.

Will update to you once we have further information later.

For your info: A link describes the know issues in Windows Server 2012 iSCSI target, https://technet.microsoft.com/en-us/library/jj863561(v=ws.11).aspx. It has a related issue but not the same one we met now.

Standard Login Key Negotiation
RFC 3720, section 10.13.3, specifies the following:
For a new session, the target MUST generate a non-zero TSIH and ONLY return it in the Login Final-Response.
The behavior exhibited by ISCSI Target Server:
When the iSCSI initiator performed a standard login and negotiated the login parameters, the iSCSI Target Server was observed to set the TSIH field in the first Login Response PDU.

Thanks,
Ting


-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Santhapur Naveen
Sent: Tuesday, February 28, 2017 4:04 AM
To: Ye, Ting <ting.ye@intel.com>; edk2-devel@lists.01.org
Subject: Re: [edk2] ISCSI says "Session Doesn't Exist"

Hello Ting,

I've configured iSCSI target in Windows Server 2012. And the procedure is similar as in https://blogs.technet.microsoft.com/filecab/2012/05/21/introduction-of-iscsi-target-in-windows-server-2012/
Please let me know if I had to make any changes to my iSCSI server.

Thank you,
Naveen
________________________________________
From: Ye, Ting [ting.ye@intel.com]
Sent: Monday, February 27, 2017 1:23 PM
To: Santhapur Naveen; edk2-devel@lists.01.org
Subject: RE: ISCSI says "Session Doesn't Exist"

Hi Naveen,

According to the table you shared (defined in RFC 3720), it seems when TSIH is ZERO, the target should not fail the login with "session does not exist".

   +------------------------------------------------------------------+
   |new       | zero        | any    |     instantiate a new session  |
   +------------------------------------------------------------------+
   |existing  | zero        | any    |     do session reinstatement   |
   |          |             |        |     (see section 5.3.5)        |
   +------------------------------------------------------------------+

I checked the latest code in NetworkPkg/IScsiDxe, the Tsih is always set to ZERO in IScsiSessionInit. The immediate reset will also trigger driver binding start so IScsiSessionInit will be executed.

It seems to me your iSCSI target does not comply with the rules defined in RFC documentation. If possible, would you please tell us which iSCSI target are you using?

Thanks,
Ting

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Santhapur Naveen
Sent: Friday, February 24, 2017 9:59 PM
To: edk2-devel@lists.01.org
Subject: [edk2] ISCSI says "Session Doesn't Exist"

Hello all,

    I've a question about IScsi and any suggestions would be helpful

[Issue Summary]
If I add an ISCSI attempt and on the next reboot, a connection will be established in between the initiator and the target. Till now, it is fine. Now if I do an immediate reset with in 20 seconds, on the next boot, the initiator is trying to establish a session, but the target rejects saying "Session does not exist". If I reset after 20 seconds or so, the connection would have been established with the same login details.

To dive deeper, I've checked the RFC documentation on this and found the following information. But when I checked the wireshark capture, I found my TSIH is ZERO even for the immediate session. If I want to make my immediate session also into a successful one, what should I be doing? I'm aware that there's a function available IScsiSessionAbort(). Would it help me or provide your suggestions to get me going.


   +------------------------------------------------------------------+

   |ISID      | TSIH        | CID    |     Target action              |

   +------------------------------------------------------------------+

   |new       | non-zero    | any    |     fail the login             |

   |          |             |        |     ("session does not exist") |

   +------------------------------------------------------------------+

   |new       | zero        | any    |     instantiate a new session  |

   +------------------------------------------------------------------+

   |existing  | zero        | any    |     do session reinstatement   |

   |          |             |        |     (see section 5.3.5)        |

   +------------------------------------------------------------------+

   |existing  | non-zero    | new    |     add a new connection to    |

   |          | existing    |        |     the session                |

   +------------------------------------------------------------------+

   |existing  | non-zero    |existing|     do connection reinstatement|

   |          | existing    |        |    (see section 5.3.4)         |

   +------------------------------------------------------------------+

   |existing  | non-zero    | any    |         fail the login         |

   |          | new         |        |     ("session does not exist") |

   +------------------------------------------------------------------+


Thanks,
Naveen
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ISCSI says "Session Doesn't Exist"
  2017-03-14  5:00         ` Santhapur Naveen
@ 2017-03-14  5:06           ` Zhang, Lubo
  0 siblings, 0 replies; 8+ messages in thread
From: Zhang, Lubo @ 2017-03-14  5:06 UTC (permalink / raw)
  To: Santhapur Naveen; +Cc: Ye, Ting, edk2-devel@lists.01.org

Hi Naveen

    I mean that the patch will fix reconnect -r command but not reset command for next boot  iSCSI connection.


Thanks
Lubo

> -----Original Message-----
> From: Santhapur Naveen [mailto:naveens@amiindia.co.in]
> Sent: Tuesday, March 14, 2017 1:01 PM
> To: Zhang, Lubo <lubo.zhang@intel.com>
> Cc: Ye, Ting <ting.ye@intel.com>; edk2-devel@lists.01.org
> Subject: RE: ISCSI says "Session Doesn't Exist"
> 
> Hi Lubo,
> 
> Many thanks for your update.
> 
> You mean to say that this issue is because of the TCP Service and this can be
> fixed with the path you are yet to send. Am I right?
> 
> Warm Regards,
> Naveen
> ________________________________________
> From: Zhang, Lubo [lubo.zhang@intel.com]
> Sent: Tuesday, March 14, 2017 7:24 AM
> To: Santhapur Naveen
> Cc: Ye, Ting; edk2-devel@lists.01.org
> Subject: RE: ISCSI says "Session Doesn't Exist"
> 
> Hi Naveen
> 
>      For this issue you mentioned, I have found the root cause. After we
> established the iSCSI connection between initiator and target server, if we use
> the following command immediately
> 
> Reset command (system power off, will not perform driver binding stop, from
> my debug log) : we can rebuilt the iSCSI connection if the target is deployed on
> Debain OS, but failed on windows server, this is the target server behavior. Since
> we do not send the reset packet on my platform, so the windows target server
> think our session is still exist and reject the new session request.
> 
> Reconnect -r:  this command will execute the iSCSI driver binding stop function
> and reset the TCP connection actively. But we cannot capture the reset packet
> either.  I debugged and find that before we reset the socket in IScsiSessionAbort,
> the socket configured state has already been set as unconfigured in tcp driver
> binding stop , so we will not invoke the TCP dispatch to abort the connection by
> sending a reset packet.
> 
> This is a Tcp service binding  destroy child issue, I will send a patch to fix.
> 
> 
> Best regards
> Lubo
> 
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ye,
> Ting
> Sent: Tuesday, February 28, 2017 4:53 PM
> To: Santhapur Naveen <naveens@amiindia.co.in>; edk2-devel@lists.01.org
> Subject: Re: [edk2] ISCSI says "Session Doesn't Exist"
> 
> Hi Naveen,
> 
> Thanks for your info. We are able to reproduce the issue using Windows Server
> 2012 now. So far we are still not sure whether it is a particular issue in Windows
> iSCSI target or UEFI iSCSI initiator.
> 
> Will update to you once we have further information later.
> 
> For your info: A link describes the know issues in Windows Server 2012 iSCSI
> target, https://technet.microsoft.com/en-us/library/jj863561(v=ws.11).aspx. It
> has a related issue but not the same one we met now.
> 
> Standard Login Key Negotiation
> RFC 3720, section 10.13.3, specifies the following:
> For a new session, the target MUST generate a non-zero TSIH and ONLY return it
> in the Login Final-Response.
> The behavior exhibited by ISCSI Target Server:
> When the iSCSI initiator performed a standard login and negotiated the login
> parameters, the iSCSI Target Server was observed to set the TSIH field in the first
> Login Response PDU.
> 
> Thanks,
> Ting
> 
> 
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> Santhapur Naveen
> Sent: Tuesday, February 28, 2017 4:04 AM
> To: Ye, Ting <ting.ye@intel.com>; edk2-devel@lists.01.org
> Subject: Re: [edk2] ISCSI says "Session Doesn't Exist"
> 
> Hello Ting,
> 
> I've configured iSCSI target in Windows Server 2012. And the procedure is similar
> as in https://blogs.technet.microsoft.com/filecab/2012/05/21/introduction-of-
> iscsi-target-in-windows-server-2012/
> Please let me know if I had to make any changes to my iSCSI server.
> 
> Thank you,
> Naveen
> ________________________________________
> From: Ye, Ting [ting.ye@intel.com]
> Sent: Monday, February 27, 2017 1:23 PM
> To: Santhapur Naveen; edk2-devel@lists.01.org
> Subject: RE: ISCSI says "Session Doesn't Exist"
> 
> Hi Naveen,
> 
> According to the table you shared (defined in RFC 3720), it seems when TSIH is
> ZERO, the target should not fail the login with "session does not exist".
> 
>    +------------------------------------------------------------------+
>    |new       | zero        | any    |     instantiate a new session  |
>    +------------------------------------------------------------------+
>    |existing  | zero        | any    |     do session reinstatement   |
>    |          |             |        |     (see section 5.3.5)        |
>    +------------------------------------------------------------------+
> 
> I checked the latest code in NetworkPkg/IScsiDxe, the Tsih is always set to ZERO
> in IScsiSessionInit. The immediate reset will also trigger driver binding start so
> IScsiSessionInit will be executed.
> 
> It seems to me your iSCSI target does not comply with the rules defined in RFC
> documentation. If possible, would you please tell us which iSCSI target are you
> using?
> 
> Thanks,
> Ting
> 
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> Santhapur Naveen
> Sent: Friday, February 24, 2017 9:59 PM
> To: edk2-devel@lists.01.org
> Subject: [edk2] ISCSI says "Session Doesn't Exist"
> 
> Hello all,
> 
>     I've a question about IScsi and any suggestions would be helpful
> 
> [Issue Summary]
> If I add an ISCSI attempt and on the next reboot, a connection will be
> established in between the initiator and the target. Till now, it is fine. Now if I do
> an immediate reset with in 20 seconds, on the next boot, the initiator is trying to
> establish a session, but the target rejects saying "Session does not exist". If I
> reset after 20 seconds or so, the connection would have been established with
> the same login details.
> 
> To dive deeper, I've checked the RFC documentation on this and found the
> following information. But when I checked the wireshark capture, I found my
> TSIH is ZERO even for the immediate session. If I want to make my immediate
> session also into a successful one, what should I be doing? I'm aware that
> there's a function available IScsiSessionAbort(). Would it help me or provide your
> suggestions to get me going.
> 
> 
>    +------------------------------------------------------------------+
> 
>    |ISID      | TSIH        | CID    |     Target action              |
> 
>    +------------------------------------------------------------------+
> 
>    |new       | non-zero    | any    |     fail the login             |
> 
>    |          |             |        |     ("session does not exist") |
> 
>    +------------------------------------------------------------------+
> 
>    |new       | zero        | any    |     instantiate a new session  |
> 
>    +------------------------------------------------------------------+
> 
>    |existing  | zero        | any    |     do session reinstatement   |
> 
>    |          |             |        |     (see section 5.3.5)        |
> 
>    +------------------------------------------------------------------+
> 
>    |existing  | non-zero    | new    |     add a new connection to    |
> 
>    |          | existing    |        |     the session                |
> 
>    +------------------------------------------------------------------+
> 
>    |existing  | non-zero    |existing|     do connection reinstatement|
> 
>    |          | existing    |        |    (see section 5.3.4)         |
> 
>    +------------------------------------------------------------------+
> 
>    |existing  | non-zero    | any    |         fail the login         |
> 
>    |          | new         |        |     ("session does not exist") |
> 
>    +------------------------------------------------------------------+
> 
> 
> Thanks,
> Naveen
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-03-14  5:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-24 13:58 ISCSI says "Session Doesn't Exist" Santhapur Naveen
2017-02-27  7:53 ` Ye, Ting
2017-02-27 20:03   ` Santhapur Naveen
2017-02-28  8:52     ` Ye, Ting
2017-03-14  1:54       ` Zhang, Lubo
2017-03-14  5:00         ` Santhapur Naveen
2017-03-14  5:06           ` Zhang, Lubo
2017-03-01  6:35     ` Zhang, Lubo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox