From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 43FA121A6F106 for ; Tue, 18 Apr 2017 22:15:24 -0700 (PDT) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Apr 2017 22:15:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,219,1488873600"; d="scan'208,217";a="78723626" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga004.jf.intel.com with ESMTP; 18 Apr 2017 22:15:23 -0700 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 18 Apr 2017 22:15:23 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 18 Apr 2017 22:15:22 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.117]) by SHSMSX104.ccr.corp.intel.com ([10.239.4.70]) with mapi id 14.03.0319.002; Wed, 19 Apr 2017 13:15:20 +0800 From: "Wu, Jiaxin" To: 'Santhapur Naveen' CC: "edk2-devel@lists.01.org" Thread-Topic: What happens if I have 2 DNS in the OFFER packet Thread-Index: AdKypFDRlov2r+EIQK+Qt2aVrl0+lAAEYJJgAABQgqAAABaLQAAAFzjgACoHE5AABXY0wAApSBnAAQgeA/AAHdNrcA== Date: Wed, 19 Apr 2017 05:15:20 +0000 Message-ID: <895558F6EA4E3B41AC93A00D163B7274162C1600@SHSMSX103.ccr.corp.intel.com> References: <625A2455CC232F40B0F38F05ACED6D97C86789BF@Venus2.in.megatrends.com> <895558F6EA4E3B41AC93A00D163B7274162BF659@SHSMSX103.ccr.corp.intel.com> <625A2455CC232F40B0F38F05ACED6D97C8678A6C@Venus2.in.megatrends.com> <895558F6EA4E3B41AC93A00D163B7274162BF687@SHSMSX103.ccr.corp.intel.com> <625A2455CC232F40B0F38F05ACED6D97C8678A81@Venus2.in.megatrends.com> <895558F6EA4E3B41AC93A00D163B7274162BFC01@SHSMSX103.ccr.corp.intel.com> <625A2455CC232F40B0F38F05ACED6D97C8678F71@Venus2.in.megatrends.com> <895558F6EA4E3B41AC93A00D163B7274162C01C4@SHSMSX103.ccr.corp.intel.com> <625A2455CC232F40B0F38F05ACED6D97C867B4EA@Venus2.in.megatrends.com> In-Reply-To: <625A2455CC232F40B0F38F05ACED6D97C867B4EA@Venus2.in.megatrends.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiY2UyMjQ5NWEtMDExMC00MGFhLTlkNWYtMTAwNmRiYjY1NzI2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX1BVQkxJQyJ9XX1dfSwiU3ViamVjdExhYmVscyI6W10sIlRNQ1ZlcnNpb24iOiIxNS45LjYuNiIsIlRydXN0ZWRMYWJlbEhhc2giOiJoajkycm1xWVpzZXBJK3BmeDhPQVQwWDRGU2dGZ2kyc0tQMEdJUXFyc2JRPSJ9 x-ctpclassification: CTP_PUBLIC dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 Subject: Re: What happens if I have 2 DNS in the OFFER packet X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2017 05:15:24 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Naveen, We can't change the EfiDhcp4Start as blow patch. 1. CompletionEvent is a crucial parameter for Dhcp4Start to indicate= it's the blocking or none-blocking implementation. According blow patch, i= t will always be blocking dhcp process that DHCP4.Start() will wait until t= he driver is transferred into the Dhcp4Bound state. 2. If the caller set the CompletionEvent to NULL, gBS->SignalEvent = (NULL) will run into problem. I don't think it's the root cause for the current problem you met. Regardin= g the "ifconfig -s eth0 dhcp" command, that will trigger Ip4config2 protoco= l to set the DHCP policy, meanwhile, DHCP process will be in progress: EFI_STATUS Ip4StartAutoConfig ( IN IP4_CONFIG2_INSTANCE *Instance ) { ... // // Start the DHCP process // Status =3D gBS->CreateEvent ( EVT_NOTIFY_SIGNAL, TPL_CALLBACK, Ip4Config2OnDhcp4Complete, Instance, &Instance->Dhcp4Event ); if (EFI_ERROR (Status)) { return Status; } Status =3D Dhcp4->Start (Dhcp4, Instance->Dhcp4Event); ... } So, once the DHCP finished, Instance->Dhcp4Event will be signaled, then run= s into Ip4Config2OnDhcp4Complete(). I suggest you add the breakpoint/debug message in the Ip4Config2OnDhcp4Comp= lete() to see whether the DHCP process finished or not. Thanks, Jiaxin From: Santhapur Naveen [mailto:naveens@amiindia.co.in] Sent: Tuesday, April 18, 2017 8:18 PM To: Wu, Jiaxin Subject: RE: What happens if I have 2 DNS in the OFFER packet Hi Jiaxin, To answer your question, "Now, talking about your problem, what= does "more systems in a network" mean? Multiple UEFI client with one DHCP = server? Can you describe the environment clearly?" >> I was under the impression since the packet is not reaching the IP layer= , it should have been either discarded or not received by the lower layers = itself. But I'm wrong in this case. It turns out it is not a problem, but the following changes wer= e able to fix the problem in three of our platforms. But I'm not sure of th= eir side effects. Would you please help me to confirm the same. EFI_STATUS EFIAPI EfiDhcp4Start ( IN EFI_DHCP4_PROTOCOL *This, IN EFI_EVENT CompletionEvent OPTIONAL ) { ... - Instance->CompletionEvent =3D CompletionEvent; + Instance->CompletionEvent =3D NULL; // // Restore the TPL now, don't call poll function at TPL_CALLBACK. // gBS->RestoreTPL (OldTpl); - if (CompletionEvent =3D=3D NULL) { while (DhcpSb->IoStatus =3D=3D EFI_ALREADY_STARTED) { DhcpSb->UdpIo->Protocol.Udp4->Poll (DhcpSb->UdpIo->Protocol.Udp4); } + if(!EFI_ERROR(DhcpSb->IoStatus)) + gBS->SignalEvent (CompletionEvent); return DhcpSb->IoStatus; - } return EFI_SUCCESS; ON_ERROR: gBS->RestoreTPL (OldTpl); return Status; } Regards, Naveen -----Original Message----- From: Wu, Jiaxin [mailto:jiaxin.wu@intel.com] Sent: Thursday, April 13, 2017 12:25 PM To: Santhapur Naveen Subject: RE: What happens if I have 2 DNS in the OFFER packet Hi Naveen, Once the SNP received the packets, all of them will be processed by MNP dri= ver, then IP driver... MNP driver will deliver each packets to its matched MNP instance according = MNP's protocolTypeFilter (IPv4/IPv6...). One thing I want to highlight is t= hat all the IPv4 share the same one MNP instance. For the detailed MNP proc= ess packet, please refer to the below flow: MnpSystemPoll/MnpPoll -> MnpReceivePacket -> Snp.Receive -> MnpEnqueuePacke= t -> MnpMatchPacket. Now once the packets comes into IP diver. Take IPv4 as example, most work o= f processing the received IP packet is the Ip4AcceptFrame() function. Ip4De= multiplex() will be invoked to demultiplex the packet to any IP4 instance w= ho is interested in it. For the detailed IP process, please refer to the be= low flow: Ip4AccpetFrame -> Ip4Demultiplex -> Ip4InterfaceEnquePacket -> Ip4InstanceE= nquePacket -> Ip4InterfaceDeliverPacket -> Ip4InstanceDeliverPacket So, according above process, IP instance will only accept the interested pa= ckets. For the DHCP process, the station address is zero. The offer packet shouldn= 't be dropped. Now, talking about your problem, what does "more systems in a network" mean= ? Multiple UEFI client with one DHCP server? Can you describe the environme= nt clearly? Thanks, Jiaxin > -----Original Message----- > From: Santhapur Naveen [mailto:naveens@amiindia.co.in] > Sent: Wednesday, April 12, 2017 7:07 PM > To: Wu, Jiaxin > > Subject: RE: What happens if I have 2 DNS in the OFFER packet > > Hi Jiaxin, > > Attached is the Wireshark log for one pair of discover and offer > request. As per the information I got and as you said irrespective of > the number of DNS addresses, IP will be configured. Yeah, you are right. > > But sometimes the same offer packet is not even reaching IP laye= r > itself. In this case, I'm yet to verify if the packet is even reaching SN= P or not. > > So, in this case, I have a question. Suppose if I receive some 1= 000 > different packets which includes one offer packet, will all the > packets be processed? I mean to ask is there any chance that some of > the packets could be dropped? > > As per the latest information I got, if there are more systems i= n a > network, then this issue happens. > I'll update you for any information I get to know. > > Thank you, > Naveen > > -----Original Message----- > From: Wu, Jiaxin [mailto:jiaxin.wu@intel.com] > Sent: Wednesday, April 12, 2017 1:14 PM > To: Santhapur Naveen; edk2-devel@lists.01.org > Subject: RE: What happens if I have 2 DNS in the OFFER packet > > Hi Naveen, > > I have tried my part, but can't reproduce the issue. As I said, all of > the DNS address will be configured in system. > > Can you share us the failure case packet? > > Thanks, > Jiaxin > > > > > > -----Original Message----- > > From: Santhapur Naveen [mailto:naveens@amiindia.co.in] > > Sent: Tuesday, April 11, 2017 7:37 PM > > To: Wu, Jiaxin >; edk2-= devel@lists.01.org > > Subject: RE: What happens if I have 2 DNS in the OFFER packet > > > > Hi Jiaxin, > > > > Thank you very much. > > > > Regards, > > Naveen > > > > -----Original Message----- > > From: Wu, Jiaxin [mailto:jiaxin.wu@intel.com] > > Sent: Tuesday, April 11, 2017 5:06 PM > > To: Santhapur Naveen; edk2-devel@lists.01.org > > Subject: RE: What happens if I have 2 DNS in the OFFER packet > > > > Ok, I will try it tomorrow morning, then update it to you. Thanks repor= t. > > > > Thanks, > > Jiaxin > > > > > -----Original Message----- > > > From: Santhapur Naveen [mailto:naveens@amiindia.co.in] > > > Sent: Tuesday, April 11, 2017 7:32 PM > > > To: Wu, Jiaxin >; edk= 2-devel@lists.01.org > > > Subject: RE: What happens if I have 2 DNS in the OFFER packet > > > > > > Hi Jiaxin, > > > > > > Yeah, I've been using 'ifconfig -s eth0 dhcp' from shell to set > > > the IP address. > > > > > > Regards, > > > Naveen > > > > > > -----Original Message----- > > > From: Wu, Jiaxin [mailto:jiaxin.wu@intel.com] > > > Sent: Tuesday, April 11, 2017 5:00 PM > > > To: Santhapur Naveen; edk2-devel@lists.01.org > > > Subject: RE: What happens if I have 2 DNS in the OFFER packet > > > > > > Hi Naveen, > > > > > > Do you use the "ifconfig -s eth0 dhcp" command to set the IP address? > > > For > > > Ip4config2 protocol, no matter how many DNS in offer packet, all > > > of will be configured (See Ip4Config2OnDhcp4Complete). > > > > > > Thanks, > > > Jiaxin > > > > > > > -----Original Message----- > > > > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On > > > > Behalf Of Santhapur Naveen > > > > Sent: Tuesday, April 11, 2017 5:29 PM > > > > To: edk2-devel@lists.01.org > > > > Subject: [edk2] What happens if I have 2 DNS in the OFFER packet > > > > > > > > Hi all, > > > > > > > > I've been facing an issue which is "IP is not > > > > assigned to the SUT if the received OFFER packet contains 2 DNS ent= ries." > > > > I don't have the environment with me. When I > > > > compared the Wireshark log in success and failure cases sent to > > > > me, I see no differences except the DNS entries in the OFFFER are d= ifferent. > > > > > > > > In the failure case, DISCOVER packet is sent four > > > > times as per RFC. And the server is sending OFFER packet all the > > > > four times, but the SUT is not accepting. Since I don't have the > > > > environment in which there will be two DNS entries, I'm not in a > > > > position to provide more > > > details. > > > > > > > > Is this an expected behavior or am I missing anything? > > > > > > > > Regards, > > > > Naveen > > > > _______________________________________________ > > > > edk2-devel mailing list > > > > edk2-devel@lists.01.org > > > > https://lists.01.org/mailman/listinfo/edk2-devel