From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from IMSVA.IN.MEGATRENDS.COM (Webmail.amiindia.co.in [203.199.198.232]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D4F7E803D2 for ; Mon, 13 Mar 2017 22:00:40 -0700 (PDT) Received: from IMSVA.IN.MEGATRENDS.COM (IMSVA.IN.MEGATRENDS.COM [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D17C382055; Tue, 14 Mar 2017 10:32:10 +0530 (IST) Received: from IMSVA.IN.MEGATRENDS.COM (IMSVA.IN.MEGATRENDS.COM [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B41518204A; Tue, 14 Mar 2017 10:32:10 +0530 (IST) Received: from webmail.amiindia.co.in (venus2.in.megatrends.com [10.0.0.7]) by IMSVA.IN.MEGATRENDS.COM (Postfix) with ESMTPS; Tue, 14 Mar 2017 10:32:10 +0530 (IST) Received: from VENUS1.in.megatrends.com ([fe80::951:7975:6ecf:eae5]) by Venus2.in.megatrends.com ([fe80::2002:4a07:4f17:c09b%14]) with mapi id 14.03.0248.002; Tue, 14 Mar 2017 10:30:34 +0530 From: Santhapur Naveen To: "Zhang, Lubo" CC: "Ye, Ting" , "edk2-devel@lists.01.org" Thread-Topic: ISCSI says "Session Doesn't Exist" Thread-Index: AdKOo1PNr5oKc1KtQkGfr5/iCtjCdwCKemiwABmDlokAGveAcAKxb8qwAAaWv1E= Date: Tue, 14 Mar 2017 05:00:33 +0000 Message-ID: <625A2455CC232F40B0F38F05ACED6D97B69AE52F@VENUS1.in.megatrends.com> References: <625A2455CC232F40B0F38F05ACED6D978C4E1F3B@VENUS1.in.megatrends.com>, <625A2455CC232F40B0F38F05ACED6D978C4E2EFB@VENUS1.in.megatrends.com> , <7619447B08B8F74DA4FF2A813B79803B39B01E60@shsmsx102.ccr.corp.intel.com> In-Reply-To: <7619447B08B8F74DA4FF2A813B79803B39B01E60@shsmsx102.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.0.84.77] MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-TM-AS-Product-Ver: IMSVA-9.1.0.1600-8.1.0.1062-22940.005 X-TM-AS-Result: No--21.142-5.0-31-10 X-imss-scan-details: No--21.142-5.0-31-10 X-TMASE-Version: IMSVA-9.1.0.1600-8.1.1062-22940.005 X-TMASE-Result: 10--21.141800-10.000000 X-TMASE-MatchedRID: Rp71wniPtoOqMZyz/RcGLuYAh37ZsBDC1kqyrcMalqWdCqKtxM6bhymu O0CFu4McnKgtjvJ+hnpphj/Py8yKPNTfLHPmZqqZlVHM/F6YkvQgzzoB6jqxgsLFbEAzpZqnpDt ZRgJxsuwINis+hG3d9PG0a/y2NPAO/Y8bXtyBbJB05zsoB1UKTkyNDX2PfTDJwSq+a2pKSIxPH2 OEh/+ebHV9erU4g9umNgNt8XFlSSp3NXzENcwK5LiMC5wdwKqdFJFr2qlKix/rhIADtApYFUNFJ C6C2PHmgIDkAAVDEfWOIczlqk1csMot60/Xh7ABzNY33yIEF4aLH4rzyQtUPRL6MU7t349brT2d 8DjsW1bcS2P2/YQ67myaLqPWtVlDKIRO4aCW7TguLk8NfSpYetMNeBxSUI2jYdpcZH3BrBT6RnF FWSZsz0Z01upQC3lixNhUweq/R2/8UJ6vIL2+KRMMmcrjEONdXccelkX/ubBZps+y1VXzqcYR+i 1NmBQllj6yUeIBPW6sMR/ATxTHjZAwJ5ZUlD23XP5rFAucBUEkPki1Yfh9IqnlIQs1/bkS+Ebx+ 2VqCM6dScslQJFmUWZSuSLi/rAEXtne4opDTiCd27eF5UDFo5JOcXMQc4jBaOWLD7G8i106W33U wHDV5uLzNWBegCW2kVrCU883ln6lyvK0QyKX5cRB0bsfrpPI6T/LTDsmJmg= X-TMASE-SNAP-Result: 1.821001.0001-0-1-12:0,22:0,33:0,34:0,39:0-0 Subject: Re: ISCSI says "Session Doesn't Exist" X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Mar 2017 05:00:41 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Lubo,=0A= =0A= Many thanks for your update.=0A= =0A= 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?=0A= =0A= Warm Regards,=0A= Naveen=0A= ________________________________________=0A= From: Zhang, Lubo [lubo.zhang@intel.com]=0A= Sent: Tuesday, March 14, 2017 7:24 AM=0A= To: Santhapur Naveen=0A= Cc: Ye, Ting; edk2-devel@lists.01.org=0A= Subject: RE: ISCSI says "Session Doesn't Exist"=0A= =0A= Hi Naveen=0A= =0A= For this issue you mentioned, I have found the root cause. After we es= tablished the iSCSI connection between initiator and target server, if we u= se the following command immediately=0A= =0A= 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 deplo= yed on Debain OS, but failed on windows server, this is the target server b= ehavior. Since we do not send the reset packet on my platform, so the windo= ws target server think our session is still exist and reject the new sessio= n request.=0A= =0A= Reconnect -r: this command will execute the iSCSI driver binding stop func= tion 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 ISc= siSessionAbort, the socket configured state has already been set as unconfi= gured in tcp driver binding stop , so we will not invoke the TCP dispatch t= o abort the connection by sending a reset packet.=0A= =0A= This is a Tcp service binding destroy child issue, I will send a patch to = fix.=0A= =0A= =0A= Best regards=0A= Lubo=0A= =0A= -----Original Message-----=0A= From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ye, = Ting=0A= Sent: Tuesday, February 28, 2017 4:53 PM=0A= To: Santhapur Naveen ; edk2-devel@lists.01.org=0A= Subject: Re: [edk2] ISCSI says "Session Doesn't Exist"=0A= =0A= Hi Naveen,=0A= =0A= Thanks for your info. We are able to reproduce the issue using Windows Serv= er 2012 now. So far we are still not sure whether it is a particular issue = in Windows iSCSI target or UEFI iSCSI initiator.=0A= =0A= Will update to you once we have further information later.=0A= =0A= For your info: A link describes the know issues in Windows Server 2012 iSCS= I target, https://technet.microsoft.com/en-us/library/jj863561(v=3Dws.11).a= spx. It has a related issue but not the same one we met now.=0A= =0A= Standard Login Key Negotiation=0A= RFC 3720, section 10.13.3, specifies the following:=0A= For a new session, the target MUST generate a non-zero TSIH and ONLY return= it in the Login Final-Response.=0A= The behavior exhibited by ISCSI Target Server:=0A= When the iSCSI initiator performed a standard login and negotiated the logi= n parameters, the iSCSI Target Server was observed to set the TSIH field in= the first Login Response PDU.=0A= =0A= Thanks,=0A= Ting=0A= =0A= =0A= -----Original Message-----=0A= From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Sant= hapur Naveen=0A= Sent: Tuesday, February 28, 2017 4:04 AM=0A= To: Ye, Ting ; edk2-devel@lists.01.org=0A= Subject: Re: [edk2] ISCSI says "Session Doesn't Exist"=0A= =0A= Hello Ting,=0A= =0A= I've configured iSCSI target in Windows Server 2012. And the procedure is s= imilar as in https://blogs.technet.microsoft.com/filecab/2012/05/21/introdu= ction-of-iscsi-target-in-windows-server-2012/=0A= Please let me know if I had to make any changes to my iSCSI server.=0A= =0A= Thank you,=0A= Naveen=0A= ________________________________________=0A= From: Ye, Ting [ting.ye@intel.com]=0A= Sent: Monday, February 27, 2017 1:23 PM=0A= To: Santhapur Naveen; edk2-devel@lists.01.org=0A= Subject: RE: ISCSI says "Session Doesn't Exist"=0A= =0A= Hi Naveen,=0A= =0A= 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= ".=0A= =0A= +------------------------------------------------------------------+=0A= |new | zero | any | instantiate a new session |=0A= +------------------------------------------------------------------+=0A= |existing | zero | any | do session reinstatement |=0A= | | | | (see section 5.3.5) |=0A= +------------------------------------------------------------------+=0A= =0A= I checked the latest code in NetworkPkg/IScsiDxe, the Tsih is always set to= ZERO in IScsiSessionInit. The immediate reset will also trigger driver bin= ding start so IScsiSessionInit will be executed.=0A= =0A= 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?=0A= =0A= Thanks,=0A= Ting=0A= =0A= -----Original Message-----=0A= From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Sant= hapur Naveen=0A= Sent: Friday, February 24, 2017 9:59 PM=0A= To: edk2-devel@lists.01.org=0A= Subject: [edk2] ISCSI says "Session Doesn't Exist"=0A= =0A= Hello all,=0A= =0A= I've a question about IScsi and any suggestions would be helpful=0A= =0A= [Issue Summary]=0A= If I add an ISCSI attempt and on the next reboot, a connection will be esta= blished 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 initia= tor is trying to establish a session, but the target rejects saying "Sessio= n does not exist". If I reset after 20 seconds or so, the connection would = have been established with the same login details.=0A= =0A= To dive deeper, I've checked the RFC documentation on this and found the fo= llowing information. But when I checked the wireshark capture, I found my T= SIH 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 provi= de your suggestions to get me going.=0A= =0A= =0A= +------------------------------------------------------------------+=0A= =0A= |ISID | TSIH | CID | Target action |=0A= =0A= +------------------------------------------------------------------+=0A= =0A= |new | non-zero | any | fail the login |=0A= =0A= | | | | ("session does not exist") |=0A= =0A= +------------------------------------------------------------------+=0A= =0A= |new | zero | any | instantiate a new session |=0A= =0A= +------------------------------------------------------------------+=0A= =0A= |existing | zero | any | do session reinstatement |=0A= =0A= | | | | (see section 5.3.5) |=0A= =0A= +------------------------------------------------------------------+=0A= =0A= |existing | non-zero | new | add a new connection to |=0A= =0A= | | existing | | the session |=0A= =0A= +------------------------------------------------------------------+=0A= =0A= |existing | non-zero |existing| do connection reinstatement|=0A= =0A= | | existing | | (see section 5.3.4) |=0A= =0A= +------------------------------------------------------------------+=0A= =0A= |existing | non-zero | any | fail the login |=0A= =0A= | | new | | ("session does not exist") |=0A= =0A= +------------------------------------------------------------------+=0A= =0A= =0A= Thanks,=0A= Naveen=0A= _______________________________________________=0A= edk2-devel mailing list=0A= edk2-devel@lists.01.org=0A= https://lists.01.org/mailman/listinfo/edk2-devel=0A= _______________________________________________=0A= edk2-devel mailing list=0A= edk2-devel@lists.01.org=0A= https://lists.01.org/mailman/listinfo/edk2-devel=0A= _______________________________________________=0A= edk2-devel mailing list=0A= edk2-devel@lists.01.org=0A= https://lists.01.org/mailman/listinfo/edk2-devel=0A=