From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by ml01.01.org (Postfix) with ESMTP id ED4731A1E06 for ; Sat, 13 Aug 2016 00:51:46 -0700 (PDT) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP; 13 Aug 2016 00:51:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,514,1464678000"; d="scan'208";a="748171042" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by FMSMGA003.fm.intel.com with ESMTP; 13 Aug 2016 00:51:46 -0700 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sat, 13 Aug 2016 00:51:46 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sat, 13 Aug 2016 00:51:45 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.181]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.8]) with mapi id 14.03.0248.002; Sat, 13 Aug 2016 15:51:44 +0800 From: "Wu, Jiaxin" To: "Cohen, Eugene" , "edk2-devel@lists.01.org" Thread-Topic: IP4 Config Troubles with DHCP Thread-Index: AdHzLtnEw2gfDCBbQ1OtxXknLLKMhQAabX6gABD3ncAAFJsNEAAP+m4gAAm0ZSAAHZN34A== Date: Sat, 13 Aug 2016 07:51:43 +0000 Message-ID: <895558F6EA4E3B41AC93A00D163B7274137C67C6@SHSMSX103.ccr.corp.intel.com> References: <895558F6EA4E3B41AC93A00D163B7274137C5EF1@SHSMSX103.ccr.corp.intel.com> <895558F6EA4E3B41AC93A00D163B7274137C65C5@SHSMSX103.ccr.corp.intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYTkyZGU5NjEtNTk4YS00MDc1LTk5YmMtNzcwZjdkNTU0MGY2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6ImE3U0trUHFsMnE3ejFNUU1XcWlzODN0SEw0Szg1VFBtOGtMWTBcL2VnXC9QRT0ifQ== x-ctpclassification: CTP_IC x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: IP4 Config Troubles with DHCP 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: Sat, 13 Aug 2016 07:51:47 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Eugene, The formal patch will be sent out next Monday. Currently, I'm not in office= , so, I don't have valid DHCP server to verify my fixing.=20 Thank you for understanding. Jiaxin=20 > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Cohen, Eugene > Sent: Friday, August 12, 2016 8:35 PM > To: Wu, Jiaxin ; edk2-devel@lists.01.org > Subject: Re: [edk2] IP4 Config Troubles with DHCP >=20 > > Eugene, > > > > I can reproduce the issue now. And root cause as below: > > > > #1. Set policy to DHCP. > > #2. If DHCP process is not complete yet, then run one App to invoke > > the > > UDP4 Configure with "UseDefaultAddress =3D TRUE" (loop to keep calling > > Udp4->Configure until Ip4Mode.IsConfigured changes to TRUE) > > #3. Even DHCP succeed but Ip4Mode.IsConfigured flag never set to TRUE > -- > > -- failure here!!! > > > > In step1, the policy will be set to DHCP, and then > > Ip4Config2OnPolicyChanged() will be called. In this function, "IpSb- > > >Reconfig" flag will be set to TRUE before Ip4StartAutoConfig() > > >called. That > > means the original "IpSb->DefaultInterface" will be abandoned/freed > > once this DHCP process finished. Detailed see > > Ip4Config2SetDefaultAddr() function. > > > > In step2, UDP4 Configure with "UseDefaultAddress =3D TRUE" is called, > > that means the default interface (IpSb->DefaultInterface) will be > > selected as current instance's interface. Detailed see Ip4ConfigProtoco= l() > function. > > > > In step3, When DHCP process finished, as I said in step1, the original > > "IpSb- > > >DefaultInterface" will be abandoned/freed because "IpSb->Reconfig" > > >flag is > > true. Meanwhile, one new interface is assigned to "IpSb- > >DefaultInterface". > > This "IpSb->DefaultInterface" is different to the original one > > assigned to the > > UDP4 Configured instance. So, even DHCP process succeed, the up caller > > will never have the chance to get it's truly status. > > > > I will send one patch to fix this issue later. > > > > Thanks your reporting. > > > > Best Regards! > > Jiaxin >=20 > Jiaxin, excellent to hear. I'm glad to hear you've isolated the issue. = So the > service binding instance we have in this case is orphaned which explains = why > destroying it and creating a new one resolves the issue. Of course we'd = be > happy to test the patch as soon as it's available. >=20 > Thank you! >=20 > Eugene >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel