Hi, Not sure whether you notice this email. Just resend in case you miss that.
Thanks, Ruth From: Ryan Harkin [mailto:ryan.har...@linaro.org] Sent: Wednesday, October 16, 2013 6:05 PM To: Olivier Martin Cc: edk2-devel@lists.sourceforge.net Subject: Re: [edk2] [PATCH] MdeModulePkg/ArpDxe: Retrieved SnpMode only after configuring Snp On 9 October 2013 16:31, Ryan Harkin <ryan.har...@linaro.org<mailto:ryan.har...@linaro.org>> wrote: I would like to revive discussion on this patch. It seems it has not been accepted, perhaps we could have a comment here from the maintainer about what is happening? I think waiting a week is long enough to not make me seem impatient for a reply ;-) On 19 July 2013 20:05, Olivier Martin <olivier.mar...@arm.com<mailto:olivier.mar...@arm.com>> wrote: Sorry, I sent the old patch. Here is the new one. ________________________________________ From: Olivier Martin [olivier.mar...@arm.com<mailto:olivier.mar...@arm.com>] Sent: 19 July 2013 20:00 To: edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net>; Tian, Feng Subject: Re: [edk2] [PATCH] MdeModulePkg/ArpDxe: Retrieved SnpMode only after configuring Snp Ting, here is a new patch that fixes the issue I have. Here is the details of this new fix: MdeModulePkg/ArpDxe: Retrieve a copy of SnpMode after SNP has been configured Before ARP configures its MNP child it gets a copy of SnpMode. If it is the first configured MNP child then SNP is also initialized. It may only be at this time the MAC address of the network card be valid (ie: the initial copy of SnpMode would contain an invalid/null MAC address). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.mar...@arm.com<mailto:olivier.mar...@arm.com>> Best Regards, Olivier ________________________________________ From: Ye, Ting [ting...@intel.com<mailto:ting...@intel.com>] Sent: 30 January 2013 07:40 To: edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net>; Tian, Feng Subject: Re: [edk2] [PATCH] MdeModulePkg/ArpDxe: Retrieved SnpMode only after configuring Snp Olivier, Thanks for your patch. Though I don't quite agree with you that SnpMode cannot be accessed prior to SNP is configured. As I known some parameters in SnpMode will be initialized in SimpleNetworkDriverStart() by calling undi.GetInitInfo. These parameters will not be updated by other APIs in SNP protocol including SNP->initialize. One of these parameters is 'IfType' used in ARP driver from your patch. Thus I think it makes sense that upper layer driver uses this kind of info prior to configure SNP to save performance lost in some conditions. Best Regards, Ting From: Olivier Martin [mailto:olivier.mar...@arm.com<mailto:olivier.mar...@arm.com>] Sent: Friday, January 25, 2013 9:07 PM To: Tian, Feng Cc: edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net> Subject: [edk2] [PATCH] MdeModulePkg/ArpDxe: Retrieved SnpMode only after configuring Snp Dear MdeModulePkg maintainer, Please find the attached patch that retrieved SnpMode only after configuring Snp. When Arp driver starts (with ArpDriverBindingStart()), its service will be created and the Mnp child configured (ArpService->Mnp->Configure() called in ArpCreateService()). It is only at this time the Snp protocol will be initialized (at the end of MnpStart()). So, a valid SnpMode could not be expected prior to ArpService->Mnp->Configure(). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.mar...@arm.com<mailto:olivier.mar...@arm.com><mailto:olivier.mar...@arm.com<mailto:olivier.mar...@arm.com>>> Best Regards, Olivier -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. ------------------------------------------------------------------------------ See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/edk2-devel
--- Begin Message ---Hi, Pollack I don't agree with the opinion that the Snp.Mode can't be accessed before Snp->Initialize() is called. According to UEFI spec, all the fields in Snp.Mode structure must be discovered during driver initialization, per my understanding the words "driver initialization" mean the driver binding start function, not Snp->Initialize() interface. And in EDKII implementation, all these parameters in Snp.Mode are prepared by calling PXE_OPCODE_GET_INIT_INFO in SimpleNetworkDriverStart() function before SNP protocol is installed into the protocol database, so they are valid to use once SNP protocol is produced. Fu, Siyuan Best regards -----Original Message----- From: Reece R. Pollack [mailto:reece.poll...@linaro.org] Sent: Tuesday, October 08, 2013 3:40 AM To: edk2-devel@lists.sourceforge.net Cc: patc...@linaro.org Subject: [edk2] [PATCH 02/10] MdeModulePkg//ArpDxe: Retrieved SnpMode only after configuring Snp From: Olivier Martin <olivier.mar...@arm.com> When Arp driver starts (with ArpDriverBindingStart()), its service will be created and the Mnp child configured (ArpService->Mnp->Configure() called in ArpCreateService()). It is only at this time the Snp protocol will be initialized (at the end of MnpStart()). So, a valid SnpMode could not be expected prior to ArpService->Mnp->Configure(). Signed-off-by: Olivier Martin <olivier.mar...@arm.com> --- MdeModulePkg/Universal/Network/ArpDxe/ArpDriver.c | 33 +++++++++++---------- 1 file changed, 17 insertions(+), 16 deletions(-) mode change 100644 => 100755 MdeModulePkg/Universal/Network/ArpDxe/ArpDriver.c diff --git a/MdeModulePkg/Universal/Network/ArpDxe/ArpDriver.c b/MdeModulePkg/Universal/Network/ArpDxe/ArpDriver.c old mode 100644 new mode 100755 index 81ddd62..5cf717f --- a/MdeModulePkg/Universal/Network/ArpDxe/ArpDriver.c +++ b/MdeModulePkg/Universal/Network/ArpDxe/ArpDriver.c @@ -103,22 +103,6 @@ ArpCreateService ( } // - // Get the underlayer Snp mode data. - // - Status = ArpService->Mnp->GetModeData (ArpService->Mnp, NULL, &ArpService->SnpMode); - if ((Status != EFI_NOT_STARTED) && EFI_ERROR (Status)) { - goto ERROR_EXIT; - } - - if (ArpService->SnpMode.IfType != NET_IFTYPE_ETHERNET) { - // - // Only support the ethernet. - // - Status = EFI_UNSUPPORTED; - goto ERROR_EXIT; - } - - // // Set the Mnp config parameters. // ArpService->MnpConfigData.ReceivedQueueTimeoutValue = 0; @@ -141,6 +125,23 @@ ArpCreateService ( } // + // Get the underlayer Snp mode data. Must do this after MNP + configuration else some parameters // (e.g. current address) may not + be set // Status = ArpService->Mnp->GetModeData (ArpService->Mnp, + NULL, &ArpService->SnpMode); if ((Status != EFI_NOT_STARTED) && + EFI_ERROR (Status)) { + goto ERROR_EXIT; + } + + if (ArpService->SnpMode.IfType != NET_IFTYPE_ETHERNET) { + // + // Only support the ethernet. + // + Status = EFI_UNSUPPORTED; + goto ERROR_EXIT; + } + + // // Create the event used in the RxToken. // Status = gBS->CreateEvent ( -- 1.7.10.4 ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel
--- End Message ---
------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel