* The network interface configuration is taking some delay to update in DHCP case
@ 2017-04-18 7:03 Karunakar P
2017-04-18 8:13 ` Wu, Jiaxin
0 siblings, 1 reply; 6+ messages in thread
From: Karunakar P @ 2017-04-18 7:03 UTC (permalink / raw)
To: edk2-devel@lists.01.org
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: The network interface configuration is taking some delay to update in DHCP case
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
2017-04-19 4:35 ` Karunakar P
0 siblings, 1 reply; 6+ messages in thread
From: Wu, Jiaxin @ 2017-04-18 8:13 UTC (permalink / raw)
To: Karunakar P, edk2-devel@lists.01.org
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: The network interface configuration is taking some delay to update in DHCP case
2017-04-18 8:13 ` Wu, Jiaxin
@ 2017-04-19 4:35 ` Karunakar P
2017-04-19 8:49 ` Wu, Jiaxin
0 siblings, 1 reply; 6+ messages in thread
From: Karunakar P @ 2017-04-19 4:35 UTC (permalink / raw)
To: Wu, Jiaxin, edk2-devel@lists.01.org
Hi Jiaxin,
I've found something related to this.
Ip4Config2OnDhcp4Complete()
Callback function when DHCP process finished. It will save the retrieved IP configure parameter from DHCP to the NVRam. Set the station address, subnetmask and gateway address for the default interface.
And this function is taking some delay to Set the Address. If we add some delay by that time Ip4Config2OnDhcp4Complete() was done and printing the values are correct. If print the values before this function we are getting as 0.
Could you please suggest anything that we can overcome this delay or we can Signal this event before ExtractConfig called.
Thanks,
Karunakar.
-----Original Message-----
From: Karunakar P
Sent: Tuesday, April 18, 2017 2:22 PM
To: 'Wu, Jiaxin'
Subject: RE: [edk2] The network interface configuration is taking some delay to update in DHCP case
Hi Jiaxin,
Thank you very much for your instant reply. I changed the print statements.
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->Configured (Printed value is
+IpSb->DefaultInterface->Configured = 0)
if (IpSb->DefaultInterface->Configured) {
IfrNvData->Configure = 1;
} else {
IfrNvData->Configure = 0;
goto Exit;
}
+ Print value of IpSb->DefaultInterface->Configured (Printed value is
+ IpSb->DefaultInterface->Configured = 0)
...
Exit:
+Print value of IpSb->DefaultInterface->Configured (Printed value is
+IpSb->DefaultInterface->Configured = 0)
}
[Observation]
1. IpSb->DefaultInterface->Configured itself getting as 0.
2. If add some delay before print, then it is printing as 1 EFI_STATUS Ip4Config2ConvertConfigNvDataToIfrNvData (
IN IP4_CONFIG2_INSTANCE *Instance,
IN OUT IP4_CONFIG2_IFR_NVDATA *IfrNvData
)
{
...
IpSb = IP4_SERVICE_FROM_IP4_CONFIG2_INSTANCE (Instance);
+ Add some delay
+Print value of IpSb->DefaultInterface->Configured (Printed value is
+IpSb->DefaultInterface->Configured = 1)
if (IpSb->DefaultInterface->Configured) {
IfrNvData->Configure = 1;
} else {
IfrNvData->Configure = 0;
goto Exit;
}
+ Print value of IpSb->DefaultInterface->Configured (Printed value is
+ IpSb->DefaultInterface->Configured = 1)
...
Exit:
+Print value of IpSb->DefaultInterface->Configured (Printed value is
+IpSb->DefaultInterface->Configured = 1)
}
> Could you please help in where it is taking time to update the values.
Thanks,
Karunakar.
-----Original Message-----
From: Wu, Jiaxin [mailto:jiaxin.wu@intel.com]
Sent: Tuesday, April 18, 2017 1:44 PM
To: Karunakar P; edk2-devel@lists.01.org
Subject: RE: [edk2] The network interface configuration is taking some delay to update in DHCP case
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: The network interface configuration is taking some delay to update in DHCP case
2017-04-19 4:35 ` Karunakar P
@ 2017-04-19 8:49 ` Wu, Jiaxin
2017-04-19 9:07 ` Karunakar P
0 siblings, 1 reply; 6+ messages in thread
From: Wu, Jiaxin @ 2017-04-19 8:49 UTC (permalink / raw)
To: Karunakar P, edk2-devel@lists.01.org
Hi Karunakar,
May I ask why you want to signal dhcp event before ExtractConfig? In my opinion, it doesn't matter to call ExtractConfig even dhcp is not finished.
You know the dhcp MAY be failure, then event will never be called.
Thanks,
Jiaxin
> -----Original Message-----
> From: Karunakar P [mailto:karunakarp@amiindia.co.in]
> Sent: Wednesday, April 19, 2017 12:36 PM
> To: Wu, Jiaxin <jiaxin.wu@intel.com>; edk2-devel@lists.01.org
> Subject: RE: [edk2] The network interface configuration is taking some delay
> to update in DHCP case
>
> Hi Jiaxin,
>
> I've found something related to this.
>
> Ip4Config2OnDhcp4Complete()
> Callback function when DHCP process finished. It will save the retrieved IP
> configure parameter from DHCP to the NVRam. Set the station address,
> subnetmask and gateway address for the default interface.
> And this function is taking some delay to Set the Address. If we add some
> delay by that time Ip4Config2OnDhcp4Complete() was done and printing the
> values are correct. If print the values before this function we are getting as 0.
>
> Could you please suggest anything that we can overcome this delay or we
> can Signal this event before ExtractConfig called.
>
> Thanks,
> Karunakar.
>
> -----Original Message-----
> From: Karunakar P
> Sent: Tuesday, April 18, 2017 2:22 PM
> To: 'Wu, Jiaxin'
> Subject: RE: [edk2] The network interface configuration is taking some delay
> to update in DHCP case
>
> Hi Jiaxin,
>
> Thank you very much for your instant reply. I changed the print statements.
>
> 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->Configured (Printed value is
> +IpSb->DefaultInterface->Configured = 0)
>
> if (IpSb->DefaultInterface->Configured) {
> IfrNvData->Configure = 1;
> } else {
> IfrNvData->Configure = 0;
> goto Exit;
> }
> + Print value of IpSb->DefaultInterface->Configured (Printed value is
> + IpSb->DefaultInterface->Configured = 0)
>
> ...
> Exit:
> +Print value of IpSb->DefaultInterface->Configured (Printed value is
> +IpSb->DefaultInterface->Configured = 0)
> }
>
> [Observation]
> 1. IpSb->DefaultInterface->Configured itself getting as 0.
> 2. If add some delay before print, then it is printing as 1 EFI_STATUS
> Ip4Config2ConvertConfigNvDataToIfrNvData (
> IN IP4_CONFIG2_INSTANCE *Instance,
> IN OUT IP4_CONFIG2_IFR_NVDATA *IfrNvData
> )
> {
> ...
> IpSb = IP4_SERVICE_FROM_IP4_CONFIG2_INSTANCE (Instance);
>
> + Add some delay
> +Print value of IpSb->DefaultInterface->Configured (Printed value is
> +IpSb->DefaultInterface->Configured = 1)
>
> if (IpSb->DefaultInterface->Configured) {
> IfrNvData->Configure = 1;
> } else {
> IfrNvData->Configure = 0;
> goto Exit;
> }
> + Print value of IpSb->DefaultInterface->Configured (Printed value is
> + IpSb->DefaultInterface->Configured = 1)
>
> ...
> Exit:
> +Print value of IpSb->DefaultInterface->Configured (Printed value is
> +IpSb->DefaultInterface->Configured = 1)
> }
>
> > Could you please help in where it is taking time to update the values.
>
> Thanks,
> Karunakar.
>
> -----Original Message-----
> From: Wu, Jiaxin [mailto:jiaxin.wu@intel.com]
> Sent: Tuesday, April 18, 2017 1:44 PM
> To: Karunakar P; edk2-devel@lists.01.org
> Subject: RE: [edk2] The network interface configuration is taking some delay
> to update in DHCP case
>
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: The network interface configuration is taking some delay to update in DHCP case
2017-04-19 8:49 ` Wu, Jiaxin
@ 2017-04-19 9:07 ` Karunakar P
2017-04-20 0:52 ` Wu, Jiaxin
0 siblings, 1 reply; 6+ messages in thread
From: Karunakar P @ 2017-04-19 9:07 UTC (permalink / raw)
To: Wu, Jiaxin, edk2-devel@lists.01.org
Hi Jiaxin,
In the case of Ip4FormExtractConfig() we are using 'IpSb->DefaultInterface->Configured' ,which is updated in Ip4Config2OnDhcp4Complete().
So if we call Extractconfig before this event getting Configured value as 0 and in setup Configured is disabled which is false.
Thanks,
karunakar
-----Original Message-----
From: Wu, Jiaxin [mailto:jiaxin.wu@intel.com]
Sent: Wednesday, April 19, 2017 2:20 PM
To: Karunakar P; edk2-devel@lists.01.org
Subject: RE: [edk2] The network interface configuration is taking some delay to update in DHCP case
Hi Karunakar,
May I ask why you want to signal dhcp event before ExtractConfig? In my opinion, it doesn't matter to call ExtractConfig even dhcp is not finished.
You know the dhcp MAY be failure, then event will never be called.
Thanks,
Jiaxin
> -----Original Message-----
> From: Karunakar P [mailto:karunakarp@amiindia.co.in]
> Sent: Wednesday, April 19, 2017 12:36 PM
> To: Wu, Jiaxin <jiaxin.wu@intel.com>; edk2-devel@lists.01.org
> Subject: RE: [edk2] The network interface configuration is taking some
> delay to update in DHCP case
>
> Hi Jiaxin,
>
> I've found something related to this.
>
> Ip4Config2OnDhcp4Complete()
> Callback function when DHCP process finished. It will save the
> retrieved IP configure parameter from DHCP to the NVRam. Set the
> station address, subnetmask and gateway address for the default interface.
> And this function is taking some delay to Set the Address. If we add
> some delay by that time Ip4Config2OnDhcp4Complete() was done and
> printing the values are correct. If print the values before this function we are getting as 0.
>
> Could you please suggest anything that we can overcome this delay or
> we can Signal this event before ExtractConfig called.
>
> Thanks,
> Karunakar.
>
> -----Original Message-----
> From: Karunakar P
> Sent: Tuesday, April 18, 2017 2:22 PM
> To: 'Wu, Jiaxin'
> Subject: RE: [edk2] The network interface configuration is taking some
> delay to update in DHCP case
>
> Hi Jiaxin,
>
> Thank you very much for your instant reply. I changed the print statements.
>
> 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->Configured (Printed value is
> +IpSb->DefaultInterface->Configured = 0)
>
> if (IpSb->DefaultInterface->Configured) {
> IfrNvData->Configure = 1;
> } else {
> IfrNvData->Configure = 0;
> goto Exit;
> }
> + Print value of IpSb->DefaultInterface->Configured (Printed value is
> + IpSb->DefaultInterface->Configured = 0)
>
> ...
> Exit:
> +Print value of IpSb->DefaultInterface->Configured (Printed value is
> +IpSb->DefaultInterface->Configured = 0)
> }
>
> [Observation]
> 1. IpSb->DefaultInterface->Configured itself getting as 0.
> 2. If add some delay before print, then it is printing as 1
> EFI_STATUS Ip4Config2ConvertConfigNvDataToIfrNvData (
> IN IP4_CONFIG2_INSTANCE *Instance,
> IN OUT IP4_CONFIG2_IFR_NVDATA *IfrNvData
> )
> {
> ...
> IpSb = IP4_SERVICE_FROM_IP4_CONFIG2_INSTANCE (Instance);
>
> + Add some delay
> +Print value of IpSb->DefaultInterface->Configured (Printed value is
> +IpSb->DefaultInterface->Configured = 1)
>
> if (IpSb->DefaultInterface->Configured) {
> IfrNvData->Configure = 1;
> } else {
> IfrNvData->Configure = 0;
> goto Exit;
> }
> + Print value of IpSb->DefaultInterface->Configured (Printed value is
> + IpSb->DefaultInterface->Configured = 1)
>
> ...
> Exit:
> +Print value of IpSb->DefaultInterface->Configured (Printed value is
> +IpSb->DefaultInterface->Configured = 1)
> }
>
> > Could you please help in where it is taking time to update the values.
>
> Thanks,
> Karunakar.
>
> -----Original Message-----
> From: Wu, Jiaxin [mailto:jiaxin.wu@intel.com]
> Sent: Tuesday, April 18, 2017 1:44 PM
> To: Karunakar P; edk2-devel@lists.01.org
> Subject: RE: [edk2] The network interface configuration is taking some
> delay to update in DHCP case
>
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: The network interface configuration is taking some delay to update in DHCP case
2017-04-19 9:07 ` Karunakar P
@ 2017-04-20 0:52 ` Wu, Jiaxin
0 siblings, 0 replies; 6+ messages in thread
From: Wu, Jiaxin @ 2017-04-20 0:52 UTC (permalink / raw)
To: Karunakar P, edk2-devel@lists.01.org
Hi Karunakar,
Extractconfig is used to request the current configuration and update it to the IFR data. It reflects the current configuration status. we can't assume the default interface must be configured.
Thanks,
Jiaxin
> -----Original Message-----
> From: Karunakar P [mailto:karunakarp@amiindia.co.in]
> Sent: Wednesday, April 19, 2017 5:08 PM
> To: Wu, Jiaxin <jiaxin.wu@intel.com>; edk2-devel@lists.01.org
> Subject: RE: [edk2] The network interface configuration is taking some delay
> to update in DHCP case
>
> Hi Jiaxin,
>
> In the case of Ip4FormExtractConfig() we are using 'IpSb->DefaultInterface-
> >Configured' ,which is updated in Ip4Config2OnDhcp4Complete().
> So if we call Extractconfig before this event getting Configured value as 0 and
> in setup Configured is disabled which is false.
>
> Thanks,
> karunakar
>
> -----Original Message-----
> From: Wu, Jiaxin [mailto:jiaxin.wu@intel.com]
> Sent: Wednesday, April 19, 2017 2:20 PM
> To: Karunakar P; edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
> Subject: RE: [edk2] The network interface configuration is taking some delay
> to update in DHCP case
>
> Hi Karunakar,
>
> May I ask why you want to signal dhcp event before ExtractConfig? In my
> opinion, it doesn't matter to call ExtractConfig even dhcp is not finished.
>
> You know the dhcp MAY be failure, then event will never be called.
>
> Thanks,
> Jiaxin
>
> > -----Original Message-----
> > From: Karunakar P [mailto:karunakarp@amiindia.co.in]
> > Sent: Wednesday, April 19, 2017 12:36 PM
> > To: Wu, Jiaxin <jiaxin.wu@intel.com<mailto:jiaxin.wu@intel.com>>; edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
> > Subject: RE: [edk2] The network interface configuration is taking some
> > delay to update in DHCP case
> >
> > Hi Jiaxin,
> >
> > I've found something related to this.
> >
> > Ip4Config2OnDhcp4Complete()
> > Callback function when DHCP process finished. It will save the
> > retrieved IP configure parameter from DHCP to the NVRam. Set the
> > station address, subnetmask and gateway address for the default interface.
> > And this function is taking some delay to Set the Address. If we add
> > some delay by that time Ip4Config2OnDhcp4Complete() was done and
> > printing the values are correct. If print the values before this function we
> are getting as 0.
> >
> > Could you please suggest anything that we can overcome this delay or
> > we can Signal this event before ExtractConfig called.
> >
> > Thanks,
> > Karunakar.
> >
> > -----Original Message-----
> > From: Karunakar P
> > Sent: Tuesday, April 18, 2017 2:22 PM
> > To: 'Wu, Jiaxin'
> > Subject: RE: [edk2] The network interface configuration is taking some
> > delay to update in DHCP case
> >
> > Hi Jiaxin,
> >
> > Thank you very much for your instant reply. I changed the print statements.
> >
> > 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->Configured (Printed value is
> > +IpSb->DefaultInterface->Configured = 0)
> >
> > if (IpSb->DefaultInterface->Configured) {
> > IfrNvData->Configure = 1;
> > } else {
> > IfrNvData->Configure = 0;
> > goto Exit;
> > }
> > + Print value of IpSb->DefaultInterface->Configured (Printed value is
> > + IpSb->DefaultInterface->Configured = 0)
> >
> > ...
> > Exit:
> > +Print value of IpSb->DefaultInterface->Configured (Printed value is
> > +IpSb->DefaultInterface->Configured = 0)
> > }
> >
> > [Observation]
> > 1. IpSb->DefaultInterface->Configured itself getting as 0.
> > 2. If add some delay before print, then it is printing as 1
> > EFI_STATUS Ip4Config2ConvertConfigNvDataToIfrNvData (
> > IN IP4_CONFIG2_INSTANCE *Instance,
> > IN OUT IP4_CONFIG2_IFR_NVDATA *IfrNvData
> > )
> > {
> > ...
> > IpSb = IP4_SERVICE_FROM_IP4_CONFIG2_INSTANCE (Instance);
> >
> > + Add some delay
> > +Print value of IpSb->DefaultInterface->Configured (Printed value is
> > +IpSb->DefaultInterface->Configured = 1)
> >
> > if (IpSb->DefaultInterface->Configured) {
> > IfrNvData->Configure = 1;
> > } else {
> > IfrNvData->Configure = 0;
> > goto Exit;
> > }
> > + Print value of IpSb->DefaultInterface->Configured (Printed value is
> > + IpSb->DefaultInterface->Configured = 1)
> >
> > ...
> > Exit:
> > +Print value of IpSb->DefaultInterface->Configured (Printed value is
> > +IpSb->DefaultInterface->Configured = 1)
> > }
> >
> > > Could you please help in where it is taking time to update the values.
> >
> > Thanks,
> > Karunakar.
> >
> > -----Original Message-----
> > From: Wu, Jiaxin [mailto:jiaxin.wu@intel.com]
> > Sent: Tuesday, April 18, 2017 1:44 PM
> > To: Karunakar P; edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
> > Subject: RE: [edk2] The network interface configuration is taking some
> > delay to update in DHCP case
> >
> > 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<mailto: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<mailto:edk2-devel@lists.01.org>
> > > https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-04-20 0:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox