For question 1, I think the event is signaled when the configuration process is finished - for data type is Ip4Config2DataTypePolicy, when the policy is set to DHCP, the event registered for Ip4Config2DataTypePolicy will be signaled immediately after the policy is set to DHCP successfully. The current UEFI spec does not require the event wait to signal until the DORA process finished in my opinion.
For question 2, I think this is the current status in EDKII implementation. I guess it could be updated to support changing policy from DHCP to DHCP and trigger DORA process if the first DHCP failed. Thanks, Ting -----Original Message----- From: Josh Triplett [mailto:[email protected]] Sent: Monday, February 01, 2016 12:11 PM To: Laszlo Ersek Cc: [email protected]; Gerd Hoffmann; Fu, Siyuan; Ye, Ting; Wu, Jiaxin; Gary Ching-Pang Lin; [email protected] Subject: EFI_IP4_CONFIG2_PROTOCOL [was: Re: [edk2] [PATCH v2] MdeModulePkg: Update MNP driver to recycle TX buffer asynchronously.] On Wed, Jan 13, 2016 at 10:24:00AM -0800, Josh Triplett wrote: > On Wed, Jan 13, 2016 at 01:43:38PM +0100, Laszlo Ersek wrote: > > I just noticed that the most recent release of BITS provides a > > standalone HTTP client! > > > > http://biosbits.org/news/bits-2070/ > > > > Josh, a couple of points: > > > > - edk2 doesn't provide EFI_IP4_CONFIG_PROTOCOL any longer; it provides > > EFI_IP4_CONFIG2_PROTOCOL. I haven't tested this new release of BITS > > just yet, but I know this caused problems for a few consumers of edk2. > > Most existing BIOSes we've worked with don't provide the newer > protocol, though. So at a minimum we'll have to support both. > Probably not too difficult to do, though. The latest release of BITS (bits-2073, released today) now uses EFI_IP4_CONFIG2_PROTOCOL, and falls back to EFI_IP4_CONFIG_PROTOCOL. We also added support for using the existing configuration if already configured, and only kicking off DHCP if not already configured. In particular, if you have manual IP configuration set up in your firmware, or manually configure IP via the shell, BITS will use that configuration. A couple of questions about EFI_IP4_CONFIG2_PROTOCOL: First, as far as I can tell, the implementation in edk2 does not trigger any of the events possible to register via RegisterDataNotify when DHCP completes. Switching to Ip4Config2PolicyDhcp will wipe the three manual configuration items (and signal the events for them), and any call to SetData will signal the corresponding event, but DHCP completion just sets the various configuration information without signaling an event. As a result, we ended up just polling GetData of Ip4Config2DataTypeInterfaceInfo until it returned a valid IP. Second, how can we explicitly tell EFI_IP4_CONFIG2_PROTOCOL to obtain an address via DHCP, if it hasn't already? To kick off DHCP, we ended up having to change the policy from DHCP to static and back to DHCP (since SetData won't call Ip4StartAutoConfig unless the policy changes to DHCP from something other than DHCP). - Josh Triplett _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

