From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 3780C740041 for ; Tue, 19 Mar 2024 11:32:18 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=wVUJ2+QeRkSDkJ7ja3neJEa0pfTsB2Y2wYXgVSnU5O4=; c=relaxed/simple; d=groups.io; h=From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20240206; t=1710847937; v=1; b=lzF3hBKCzmvDPjO9WrhAIDOdGwVzq2m0EXWs6s4EbBAgslAOxZ9TRDmJcbRtMrlI7B9BZOp7 X5KEswTpWGeXJKT3zpB1VgXXwUtRFqtwX5gWvZ4UvXwvv91TlPNNneHq3Ul6FQD6G4gGB0jStcM Feff+sfsV6gcwieu4I7AaXJlAizXgA+O3DC+Y9d72OG/zchZy2GhWofzQrMhgazvgOh6A1xV7ny BCAojxtuJFPrl9DFlMSVOTNA9G9egs2QhAzAaV/flkrY8UMvQeuGayuJ06Ff+cB36Ls8U6Dey0w 2HxaJHwaGNuZpEEn0LF2TgLRWt2XBfYPE6f+X6WKC1l8g== X-Received: by 127.0.0.2 with SMTP id boVEYY7687511xc4qdkFhPFE; Tue, 19 Mar 2024 04:32:17 -0700 X-Received: from NAM11-DM6-obe.outbound.protection.outlook.com (NAM11-DM6-obe.outbound.protection.outlook.com [40.107.223.136]) by mx.groups.io with SMTP id smtpd.web11.12980.1710847936996505796 for ; Tue, 19 Mar 2024 04:32:17 -0700 X-Received: from BN0PR10MB4981.namprd10.prod.outlook.com (2603:10b6:408:12d::16) by DS7PR10MB7277.namprd10.prod.outlook.com (2603:10b6:8:d8::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.26; Tue, 19 Mar 2024 11:32:14 +0000 X-Received: from BN0PR10MB4981.namprd10.prod.outlook.com ([fe80::b51d:9a92:d28:9618]) by BN0PR10MB4981.namprd10.prod.outlook.com ([fe80::b51d:9a92:d28:9618%4]) with mapi id 15.20.7386.025; Tue, 19 Mar 2024 11:32:14 +0000 From: "Sivaraman Nainar via groups.io" To: "devel@edk2.groups.io" , Laszlo Ersek , Santhosh Kumar V , Saloni Kasbekar , Zachary Clark-williams CC: Raj V Akilan , Soundharia R Subject: Re: [edk2-devel] [PATCH] NetworkPkg:Resolved Consecutive Pxe-Http Boot Issue Thread-Topic: [EXTERNAL] Re: [edk2-devel] [PATCH] NetworkPkg:Resolved Consecutive Pxe-Http Boot Issue Thread-Index: AQHaZOmcTV48E41v9E6Ol22UcMz6DLEVdjGAgAAlbkCABtgbEIAipIrA Date: Tue, 19 Mar 2024 11:32:14 +0000 Message-ID: References: <20240221171347.1343-1-santhoshkumarv@ami.com> <21b2d17d-5de5-5f08-ef6b-a0a285b05917@redhat.com> <17B60D00FAC661AD.27859@groups.io> In-Reply-To: Accept-Language: en-GB, en-US X-Mentions: saloni.kasbekar@intel.com X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BN0PR10MB4981:EE_|DS7PR10MB7277:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: is4LTM96DWru4FqykSUrqEHuKreqIbIetyNatvDi6e4Yzjpq9xxeG2j6KL15jkP0hxGC58qyjMRnHqJ0xEsCGWPzislHT2Jb2jH3oPkh/HZpweaXa8WchVXktKVVIgw9kJt+3WQauQbsoXLIR0GyTEKWKamsmYpAZgF5IJ+5CjLIP5+FM4mi6F0vjsTopDlE+mgpbShmlGxDvf4tl9wMyJX9mmlDD7/cTWrs0ex7POFHsG2usm3ytDz1d5uOUwnEvKqbMicTgOc8ejtn2md8nCzKUR7wwkpwV2z3YFNaf4ToY+/cWq4OvruOEFt+MX7a3zStWacwrPmvQLgPrjLsLDP8jrNLwRnU7Ooq6p51j6fvVyekhzpsDjW3tsAjjOBRwsNqyvfPK3o1oQtnMdYV+PbdOhd97kl5zWMN1FIhaC/i0Hv/6Dl/KJ95SwV+THMz4L7ikAu+1zx88Ojs1rrxZoedFiVq6HUJtHFUYdLnp5bP4aQ/q7Lx0Npr06yKVKuTIPjogzTaHnE0LqTj82ktnYP2ThbLcFmovDryqDx0S3xGqPFUeKXZUfCCjlLM7O2j0SndLBlc65PgA79zOiMebHQxze8TNcQju+zLY93j+qc= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?SlDWGQYzTRRdx/dGV6V1Msiy5NxHMSWM5kVOByaIJ3oQZmiUnK6Xzs6lTw/+?= =?us-ascii?Q?oCuTM/d2ovmk/x6OkKMLBR9oowRudODwkVsjBy+9N1PbqG5V4EMup6w/BvsF?= =?us-ascii?Q?vE+/jx/4jtd5bfgBeC+S76byiJJX8574chNC4bTksb2AtTDX5GKwMx9t4h5b?= =?us-ascii?Q?OkYBofCz+62gpPfu12E8hYbJHzD7I6StrUYNW15NaLpXCHUR2+6TPcBpYTz2?= =?us-ascii?Q?iMHTkrQr8yx661OJZBycVN6CqXnwO0xPFvJhbmqDLG2bfP9efMEqijbX5877?= =?us-ascii?Q?EG0ITQdzShr4dLXeG2r1biykXz0XKB3SpxhCPbL4ne4yePt35WWeSS57HX9d?= =?us-ascii?Q?DQF0ZIjxtFLcC3bWOxR365wo5YImKn9sQs7HR5Asqiq+5zDXStuNekcozooc?= =?us-ascii?Q?P283gU+3CFKDJMURq83RQ4SbyQbGZORfFtlA2U8FDK442u0tEJ52RLhDusNK?= =?us-ascii?Q?D/iAlN6VTTU93XZZ0P9gvwYNqMjVRtXqOPwU5A0Saf2akAluK6brIX51++Ol?= =?us-ascii?Q?wKJt9V0Wp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?= =?us-ascii?Q?pqtT0lkPpyXKJFaY93oxs57I3eaeJr0b/FQnH3eVsX7n0sk5fm6rxY6x4YCY?= =?us-ascii?Q?/ROA+LYUHLjI809vOkMKmqQkUVsj/BksjGxH8ltq/3VX5Znho5aABT1ixpYL?= =?us-ascii?Q?NVUHMThLys6CUnsXvvJ9EW7Jz3cOk9oPH0bAN9BA?= MIME-Version: 1.0 X-OriginatorOrg: ami.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN0PR10MB4981.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ba14481f-4ab7-42d3-e530-08dc480839b5 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Mar 2024 11:32:14.4805 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 27e97857-e15f-486c-b58e-86c2b3040f93 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: fDiDU+ERJY37Avb8l5wD47BR7Qy5Kg9fnzbgS/ghzQrNypaR6FCqSqicNHDJoLNUpnFrM+18KJR1tBscsVIcIg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR10MB7277 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Tue, 19 Mar 2024 04:32:17 -0700 Reply-To: devel@edk2.groups.io,sivaramann@ami.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: QNPTxyqCRFj0JOwtMCM7PBw4x7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=lzF3hBKC; dmarc=pass (policy=none) header.from=groups.io; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io @Saloni Kasbekar, Can you please comment on the changes? Thanks Siva -----Original Message----- From: Sivaraman Nainar Sent: Monday, February 26, 2024 4:01 PM To: devel@edk2.groups.io; Sivaraman Nainar ; Laszlo Ers= ek ; Santhosh Kumar V ; Saloni K= asbekar ; Zachary Clark-williams Cc: Raj V Akilan ; Soundharia R Subject: RE: [EXTERNAL] Re: [edk2-devel] [PATCH] NetworkPkg:Resolved Consec= utive Pxe-Http Boot Issue @Saloni Kasbekar, @Zachary Clark-williams, Could you please add your feedback on the changes proposed? Thanks Siva -----Original Message----- From: devel@edk2.groups.io On Behalf Of Sivaraman Na= inar via groups.io Sent: Thursday, February 22, 2024 7:33 AM To: Laszlo Ersek ; devel@edk2.groups.io; Santhosh Kumar = V ; Saloni Kasbekar ; Za= chary Clark-williams Cc: Raj V Akilan ; Soundharia R Subject: [EXTERNAL] Re: [edk2-devel] [PATCH] NetworkPkg:Resolved Consecutiv= e Pxe-Http Boot Issue **CAUTION: The e-mail below is from an external source. Please exercise cau= tion before opening attachments, clicking links, or following guidance.** Laszlo: Thanks for the detailed feedback on the changes for this issue. Since we ar= e not sure if this change are valid / violate some purpose of SNP driver, i= t mentioned as Workaround. @Saloni Kasbekar and @Clark-williams, Zachary can add more on these changes= . As you recommended, we can have PCD which controls these changes till the c= hanges are addressed in grub. @Santhosh Kumar V is this issue can be seen only in SLES 15 or it can be fo= und in any OS having Grub 2.x? Thanks Siva -----Original Message----- From: Laszlo Ersek Sent: Thursday, February 22, 2024 5:15 AM To: devel@edk2.groups.io; Santhosh Kumar V Cc: Sivaraman Nainar ; Raj V Akilan ; So= undharia R ; Saloni Kasbekar ; Zachary Clark-williams Subject: [EXTERNAL] Re: [edk2-devel] [PATCH] NetworkPkg:Resolved Consecutiv= e Pxe-Http Boot Issue **CAUTION: The e-mail below is from an external source. Please exercise cau= tion before opening attachments, clicking links, or following guidance.** On 2/21/24 18:15, Santhosh Kumar V via groups.io wrote: > The customer has a server environment where PXE and HTTP service run in s= ame Linux Server. In this environment a SUT trying to boot to SLES 15 OS vi= a PXE from the Boot Menu. After PXE Boot file downloaded and grub Loaded wi= thout continuing for installation Exit is pressed and control back to Setup= . > Now the HTTP boot to SLES 15 OS tried in the same environment and failed = to download the file. If there is a reconnect -r performed before this HTTP= Boot then boot file download and installation is getting success. > Root cause of the issue is, when Exit from grub performed, boot Loader St= ops the SNP Driver and starts the same. This sentence feels like the key one. Are you saying that grub calls Snp->Start() just before it exits? If so, am I right to suspect that that's a grub bug? It sounds like a resou= rce leak, after all. Can you perhaps include a grub source code location / pointer in the commit= message? > During this process SNP is in Initialized State. When HTTP boot is perfor= med immediately after PXE Failure, the MNP configure method initiates the S= NP Start again. Since the SNP already started by grub it returns EFI_ALREAD= Y_STARTED and none of the upper Layer drivers are getting started. > As a work around in MNPConfigure(), if the SNP Start failed with Already = Started and in Initialized state we can return success so that rest of the = drivers can be loaded and HTTP boot can work. > > > Cc: Saloni Kasbekar > Cc: Zachary Clark-williams > > Signed-off-by: SanthoshKumar > --- > NetworkPkg/MnpDxe/MnpConfig.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/NetworkPkg/MnpDxe/MnpConfig.c > b/NetworkPkg/MnpDxe/MnpConfig.c index 93587d53aa..0f2df28d73 100644 > --- a/NetworkPkg/MnpDxe/MnpConfig.c > +++ b/NetworkPkg/MnpDxe/MnpConfig.c > @@ -1120,7 +1120,9 @@ MnpStartSnp ( > // Start the simple network. > > // > > Status =3D Snp->Start (Snp); > > - > > + if ((Status =3D=3D EFI_ALREADY_STARTED ) && (Snp->Mode->State =3D=3D > + EfiSimpleNetworkInitialized)) { > > + return EFI_SUCCESS; > > + } > > if (!EFI_ERROR (Status)) { > > // > > // Initialize the simple network. > The commit message does say this is a workaround, and I don't immediately a= ny see why this workaround (in the code) would be problematic in practice, = but it still leaves a bad taste in my mouth. Consider: the call path is the following: MnpConfigure() [NetworkPkg/MnpDxe/MnpConfig.c] -- public .Configu= re() protocol member function MnpConfigureInstance() [NetworkPkg/MnpDxe/MnpConfig.c] MnpStart() [NetworkPkg/MnpDxe/MnpConfig.c] // see notes! MnpStartSnp() [NetworkPkg/MnpDxe/MnpConfig.c] Notes: the MnpStartSnp() call in MnpStart() is conditional on two circumsta= nces (at the same time): - "If it's not a configuration update, increase the configured children num= ber." - "It's the first configured child, start the simple network." In other words, the MNP driver has just bound SNP "BY_DRIVER" (i.e., exclus= ively), installed the MNP service binding protocol for each vlan (IIUC), an= d one of those SB instances is now being used to create the first MNP insta= nce. I think that under these circumstances, it is reasonable for the MNP d= river to expect that the underlying SNP be in stopped state. :/ How long would NetworkPkg have to carry this workaround? (I.e., how long be= fore the grub issue is fixed, and the buggy version deprecated?) I'd prefer at least a comment in the code that the return path is a workaro= und for (I feel) an earlier SNP usage violation. A FeaturePCD to disable the workaround could be reasonable too (but the Net= workPkg maintainers could disagree about that). BTW, the commit message should be wrapped at 75 characters. These long line= s (in the body) will pass PatchCheck, but generate warnings. Those warnings= are tolerable for log quotes, URLs, etc, but for normal English text, wrap= ping is much preferred. Another comment on the commit message: the subject line should state someth= ing like NetworkPkg/MnpDxe: work aroung SNP state leak in grub Laszlo -The information contained in this message may be confidential and propriet= ary to American Megatrends (AMI). This communication is intended to be read= only by the individual or entity to whom it is addressed or by their desig= nee. If the reader of this message is not the intended recipient, you are o= n notice that any distribution of this message, in any form, is strictly pr= ohibited. Please promptly notify the sender by reply e-mail or by telephone= at 770-246-8600, and then delete or destroy all copies of the transmission= . -The information contained in this message may be confidential and propriet= ary to American Megatrends (AMI). This communication is intended to be read= only by the individual or entity to whom it is addressed or by their desig= nee. If the reader of this message is not the intended recipient, you are o= n notice that any distribution of this message, in any form, is strictly pr= ohibited. Please promptly notify the sender by reply e-mail or by telephone= at 770-246-8600, and then delete or destroy all copies of the transmission= . -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#116893): https://edk2.groups.io/g/devel/message/116893 Mute This Topic: https://groups.io/mt/104498511/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-