From: "Wu, Jiaxin" <jiaxin.wu@intel.com>
To: "Cohen, Eugene" <eugene@hp.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: IP4 Config Troubles with DHCP
Date: Fri, 12 Aug 2016 08:27:43 +0000 [thread overview]
Message-ID: <895558F6EA4E3B41AC93A00D163B7274137C65C5@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: AT5PR84MB029160E4B233A6449B486B5EB41E0@AT5PR84MB0291.NAMPRD84.PROD.OUTLOOK.COM
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 = 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 = TRUE" is called, that means the default interface (IpSb->DefaultInterface) will be selected as current instance's interface. Detailed see Ip4ConfigProtocol() 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
> -----Original Message-----
> From: Wu, Jiaxin
> Sent: Friday, August 12, 2016 8:20 AM
> To: Cohen, Eugene <eugene@hp.com>; edk2-devel@lists.01.org
> Subject: RE: IP4 Config Troubles with DHCP
>
> Thanks Eugene, I will try to reproduce the issue and dig it out. Any process will
> inform you.
>
> Best Regards!
> Jiaxin
>
> > -----Original Message-----
> > From: Cohen, Eugene [mailto:eugene@hp.com]
> > Sent: Thursday, August 11, 2016 10:31 PM
> > To: Wu, Jiaxin <jiaxin.wu@intel.com>; edk2-devel@lists.01.org
> > Subject: RE: IP4 Config Troubles with DHCP
> >
> > Jianxin,
> >
> > > I want to confirm with you the steps to reproduce the issue:
> > >
> > > 1. Set policy to DHCP.
> > > 2. If DHCP process is not complete yet, then run one App to invoke
> > > the
> > > UDP4 Configure with "UseDefaultAddress = 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!!!
> > >
> > > Above steps right?
> >
> > Yes, that summarizes it well.
> >
> > > Actually, you don't need to retry the UDP configuration loop
> > > according the Ip4Mode.IsConfigured flag. You are only recommended to
> > > set a timer to check the mapping status after the configuration:
> >
> > This is exactly what we used to do. Recently it stopped working which
> > is why we now have to re-do service binding creation and configuration.
> >
> > > If DHCP process succeed, Ip4Mode.IsConfigured should be updated. If
> > > not, any bug may be existed.
> >
> > From the traces I've looked at I can clearly see that the DHCP process
> > as finished (lease acquired) and that Ip4Mode.IsConfigured is still
> > FALSE. I'll send you a detailed trace of this separately.
> >
> > So yes, I think there is a bug that crept in.
> >
> > Eugene
next prev parent reply other threads:[~2016-08-12 8:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-10 18:13 IP4 Config Troubles with DHCP Cohen, Eugene
2016-08-11 6:57 ` FW: " Wu, Jiaxin
2016-08-11 14:31 ` Cohen, Eugene
2016-08-12 0:19 ` Wu, Jiaxin
2016-08-12 8:27 ` Wu, Jiaxin [this message]
2016-08-12 12:34 ` Cohen, Eugene
2016-08-13 7:51 ` Wu, Jiaxin
2016-08-15 14:10 ` Cohen, Eugene
2016-08-16 1:27 ` Wu, Jiaxin
2016-08-16 19:44 ` Cohen, Eugene
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=895558F6EA4E3B41AC93A00D163B7274137C65C5@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