From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 2CEED21A18AAA for ; Tue, 18 Apr 2017 01:13:52 -0700 (PDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP; 18 Apr 2017 01:13:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,218,1488873600"; d="scan'208";a="958149295" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga003.jf.intel.com with ESMTP; 18 Apr 2017 01:13:51 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 18 Apr 2017 01:13:51 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.117]) by shsmsx102.ccr.corp.intel.com ([169.254.2.246]) with mapi id 14.03.0319.002; Tue, 18 Apr 2017 16:13:48 +0800 From: "Wu, Jiaxin" To: Karunakar P , "edk2-devel@lists.01.org" Thread-Topic: [edk2] The network interface configuration is taking some delay to update in DHCP case Thread-Index: AdK4EbWxBpH5aAwCSxaCzj+JcZmxZAAByw3Q Date: Tue, 18 Apr 2017 08:13:48 +0000 Message-ID: <895558F6EA4E3B41AC93A00D163B7274162C1211@SHSMSX103.ccr.corp.intel.com> References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMTJjNTBlMzctZmVjYi00NGJjLWFhNjUtOWU3ZTUwYjg1MDc3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6ImZhWTA3NE5qMG9NZ1wvenBXMTd1RUFYZlgxcFJWZjJSYVRTYXFJZ1wvT2dHRT0ifQ== x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: The network interface configuration is taking some delay to update in DHCP case X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2017 08:13:52 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Karunakar, With your reproduction Step 2, DHCP process will be triggered. Ip and Subn= etMask in IP service default interface will also be updated once the DHCP p= rocess finished. For detailed, you can check the Ip4Config2OnDhcp4Complete = -> Ip4Config2SetDefaultIf -> Ip4Config2SetDefaultAddr -> Ip4SetAddress.=20 So, before DHCP finished, Ip and SubnetMask should be always zero. Your o= bserved value may be printed during DHCP process. I suggest you change your print code as below: EFI_STATUS Ip4Config2ConvertConfigNvDataToIfrNvData ( IN IP4_CONFIG2_INSTANCE *Instance, IN OUT IP4_CONFIG2_IFR_NVDATA *IfrNvData ) { ... IpSb =3D IP4_SERVICE_FROM_IP4_CONFIG2_INSTANCE (Instance); if (IpSb->DefaultInterface->Configured) { IfrNvData->Configure =3D 1; } else { IfrNvData->Configure =3D 0; goto Exit; } + Print value of IpSb->DefaultInterface->Ip + Print value of IpSb->DefaultInterface->SubnetMask ... } Above print can ensure the Ip and SubnetMask is printed after DHCP finishe= d. Thanks, Jiaxin > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Karunakar P > Sent: Tuesday, April 18, 2017 3:04 PM > To: edk2-devel@lists.01.org > Subject: [edk2] The network interface configuration is taking some delay = to > update in DHCP case >=20 > Hi All, >=20 > I've been facing an issue with IP4 SERVICE Default interface value. >=20 >=20 >=20 > [Reproduction Steps] > 1.Add trace messages to print the values of ip and SubnetMask in > Ip4FormExtractConfig() -> Ip4Config2ConvertConfigNvDataToIfrNvData() >=20 > EFI_STATUS > Ip4Config2ConvertConfigNvDataToIfrNvData ( > IN IP4_CONFIG2_INSTANCE *Instance, > IN OUT IP4_CONFIG2_IFR_NVDATA *IfrNvData > ) > { > ... > IpSb =3D IP4_SERVICE_FROM_IP4_CONFIG2_INSTANCE (Instance); >=20 > + Print value of IpSb->DefaultInterface->Ip > + Print value of IpSb->DefaultInterface->SubnetMask >=20 > ... > } > 2. Assign ip to SUT using IPv4 Network Configuration page. > ( Enable Configured and Enable DHCP and Save Changes and Exit ) > 3. reset the SUT once IP assigns >=20 > [Observation] >=20 > 1. On restart, Ip4FormExtractConfig() gets call and prints Ip and > SubnetMask values are 0. >=20 > 2. If add some delay before printing those values , then getting th= e proper > values > + add Delay some delay > + Print value of IpSb->DefaultInterface->Ip >=20 > + Print value of IpSb->DefaultInterface->SubnetMask >=20 > 3. In the case of Static Ip , printing proper values without giving= any delay. >=20 >=20 > Could you please help in where it is taking time to update the values in = DHCP > case. >=20 > Thanks, > Karunakar. > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel