public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Wu, Jiaxin" <jiaxin.wu@intel.com>
To: Karunakar P <karunakarp@amiindia.co.in>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: The network interface configuration is taking some delay to update in DHCP case
Date: Tue, 18 Apr 2017 08:13:48 +0000	[thread overview]
Message-ID: <895558F6EA4E3B41AC93A00D163B7274162C1211@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <A885E3F3F1F22B44AF7CC779C062228E7C2876BF@Venus2.in.megatrends.com>

Hi Karunakar,

With your reproduction Step 2, DHCP process will be triggered.  Ip and SubnetMask in IP service default interface will also be updated once the DHCP process finished. For detailed, you can check the Ip4Config2OnDhcp4Complete -> Ip4Config2SetDefaultIf -> Ip4Config2SetDefaultAddr -> Ip4SetAddress. 

So, before DHCP finished,  Ip and SubnetMask should be always zero.  Your observed 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 = IP4_SERVICE_FROM_IP4_CONFIG2_INSTANCE (Instance);

  if (IpSb->DefaultInterface->Configured) {
    IfrNvData->Configure = 1;
  } else {
    IfrNvData->Configure = 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 finished.

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
> 
> Hi All,
> 
>   I've been facing an issue with IP4 SERVICE Default interface value.
> 
> 
> 
> [Reproduction Steps]
> 1.Add trace messages to print the values of ip and SubnetMask in
> Ip4FormExtractConfig() -> Ip4Config2ConvertConfigNvDataToIfrNvData()
> 
> EFI_STATUS
> Ip4Config2ConvertConfigNvDataToIfrNvData (
> IN     IP4_CONFIG2_INSTANCE       *Instance,
> IN OUT IP4_CONFIG2_IFR_NVDATA     *IfrNvData
> )
> {
> ...
> IpSb = IP4_SERVICE_FROM_IP4_CONFIG2_INSTANCE (Instance);
> 
> + Print value of IpSb->DefaultInterface->Ip
> + Print value of IpSb->DefaultInterface->SubnetMask
> 
> ...
> }
> 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
> 
> [Observation]
> 
> 1.       On restart, Ip4FormExtractConfig() gets call and prints Ip and
> SubnetMask values are 0.
> 
> 2.       If add some delay before printing those values , then getting the proper
> values
>                                 +  add Delay some delay
> + Print value of IpSb->DefaultInterface->Ip
> 
> + Print value of IpSb->DefaultInterface->SubnetMask
> 
> 3.       In the case of Static Ip , printing proper values without giving any delay.
> 
> 
> Could you please help in where it is taking time to update the values in DHCP
> case.
> 
> Thanks,
> Karunakar.
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


  reply	other threads:[~2017-04-18  8:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-18  7:03 The network interface configuration is taking some delay to update in DHCP case Karunakar P
2017-04-18  8:13 ` Wu, Jiaxin [this message]
2017-04-19  4:35   ` Karunakar P
2017-04-19  8:49     ` Wu, Jiaxin
2017-04-19  9:07       ` Karunakar P
2017-04-20  0:52         ` Wu, Jiaxin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=895558F6EA4E3B41AC93A00D163B7274162C1211@SHSMSX103.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox