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 7A13BAC0E9A for ; Mon, 26 Feb 2024 10:31:02 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=n+MfNxlZkhxSEo4aQmSYmQczWo4Pfa5qxl9bgIxxLUg=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results: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:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1708943461; v=1; b=lFXKnRcJ3oHbMS/5hP7rwshGg3a1fRlalNDZQ9Anj/aH65vAAoCBr0woCl3opEKAH0mYXTYG yDWG/RXTaH/2DNJD1ppVBWn4CF7X0gnnhGeMmOHtzW9O+naOx3IA3K2Q9YhXUy7S1NTHBldZ1Xc 0324ldnqfs817tNDDGD878D0= X-Received: by 127.0.0.2 with SMTP id QUsIYY7687511xF4U6ZAjtyc; Mon, 26 Feb 2024 02:31:01 -0800 X-Received: from NAM11-DM6-obe.outbound.protection.outlook.com (NAM11-DM6-obe.outbound.protection.outlook.com [40.107.223.93]) by mx.groups.io with SMTP id smtpd.web11.17386.1708943459976841168 for ; Mon, 26 Feb 2024 02:31:00 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lagoFERdl45263uHYSB830sVLIqdh5Iyny8F68/L/XpSxCnDP7vqqeUS7jX+VSehjWklVuV4wtTPvMQNjS0HmxVbB1SnlljZozLA8atLeK6r24ux+AlKoTIgccZO28fFIxYOiCys9d2oV70zb79nC6A44wZkBFIJWMvCoM7f9gD5F0IabqDNyCyxUtuGmfAQ0PJPklBqzpBMbdAvqmsQ0WEZvUWGAyatJ551UJLRPvA0HfbezQZzGqQBHsu2jhgbhMMQAAYS1ZDQL3HPYRSkdpSvhb3YcrW6bm0LRkoTAHeOrURZwp4DtEyfKoTg37Uydyr6WX/2MnECwflb1V22Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=hOUCmBvIRhg2bWOjoPTpHhvlNUbqofRszS04XjzddXA=; b=B2/71qPmnhBJcD0k8bfwTRdOSFNka5GV2d0TU6a3loKbvwzDZxan4Ep/f0wL+5iUJdDiY0pvo/siGuTzHNTzOZZYZgKMUQb3NwwcWB7MOSyEdshvnGKt0OA/u24xGQDqV7Pj1qkgLfCg5w5uil0TIcVvvjmYTExaEz4BD4IdVVByd3FwxBeO+jYljU1JjcnqvtzGavDZMIiVtJqBXVc0adpyGMQnQ0OkUDHuUw73Y93lur5meFkLf27QBK7KmMfOGrjnB4qq8mDRL+rqnpLiDXR3JsX0esUIRJnDLajIIxRIlu9Dx6H5q4nTH4Ww+U0n3qGXko65H5MkoFvBtvQbEA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ami.com; dmarc=pass action=none header.from=ami.com; dkim=pass header.d=ami.com; arc=none X-Received: from BN0PR10MB4981.namprd10.prod.outlook.com (2603:10b6:408:12d::16) by PH0PR10MB4599.namprd10.prod.outlook.com (2603:10b6:510:39::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.34; Mon, 26 Feb 2024 10:30:57 +0000 X-Received: from BN0PR10MB4981.namprd10.prod.outlook.com ([fe80::3d5d:c1c5:8ac0:255e]) by BN0PR10MB4981.namprd10.prod.outlook.com ([fe80::3d5d:c1c5:8ac0:255e%7]) with mapi id 15.20.7316.035; Mon, 26 Feb 2024 10:30:57 +0000 From: "Sivaraman Nainar via groups.io" To: "devel@edk2.groups.io" , Sivaraman Nainar , 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: AQHaZOmcTV48E41v9E6Ol22UcMz6DLEVdjGAgAAlbkCABtgbEA== Date: Mon, 26 Feb 2024 10:30:57 +0000 Message-ID: References: <20240221171347.1343-1-santhoshkumarv@ami.com> <21b2d17d-5de5-5f08-ef6b-a0a285b05917@redhat.com> <17B60D00FAC661AD.27859@groups.io> In-Reply-To: <17B60D00FAC661AD.27859@groups.io> Accept-Language: en-GB, en-US X-Mentions: saloni.kasbekar@intel.com,zachary.clark-williams@intel.com X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BN0PR10MB4981:EE_|PH0PR10MB4599:EE_ x-ms-office365-filtering-correlation-id: 69aba2d6-75b1-4726-66e1-08dc36b60508 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: w6RI8wU/uC5HKj/paYdaYOaHPEo4m04TVaygF5OA0J128Jl1MOa1Nk7EpplpmOPciG/ZW8FPxMyGal0u56Iho3QLCW0heBToOqsBfLD0mvaekpii2hYyJjDuWL3C8R04TnZ0S0EIIZpzlNYqn4kpD1hMT2ZRi2QqGFIFULB/Uq7pBfaEfSoIN7SVS5KOGW9UO9E1bJSJwdKCMkaN57qhAhv61aqMYUwGCveWb/EETGDCFrLv88EqoGC6B8EA3+yWhgjtNLZAAI4XEOsNowImx0t7YfEsbyS57J5O66eAZe4NK0dRb/SAfdl/zPZAnNlz2zjRKF178gu+BLH9XtcP0YP572vX6Ff7vcUL325bMKmlHh5DUa/nn0sLhnMKA3HJs81dntlMxRSIvJmGxhq2bWLNto9gzRpj0QjCxfBE24dZQFOkhpADYSjP2UxYR15HRZnZ+cSB/ZrET2TaTXMWwdV3qDPyBdrb1CAEe91ongNByiESHdTftU3Z6UZsRQpvBONr8Ryp5u4j8EReaQbaep01noI8aenyqf+aKj56wgWniLJatjtsvQJJR10weJXjgkPaBsYPFtl9g9MzRIUgf6FvifOMtXC9kvpSKTC6BTSPBNXFKyr8MjAm33NxsZUUoU2OAQG+TPsK4rLuffFJAvL3+cvIz0j2mny702R6rxvrZroMAQoqwJppnav+LztcikkJC44dAZy84S337r0h/w== x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?/aBoxWUG64GLu0HE1cya22DrSZJ3S+5safSruL75VluyZE79Us3Q3jbxp3iu?= =?us-ascii?Q?OjlvvnjWYcO7A2AhDdgoOoiMqMwz3cPz7oQWmDCSWvbbr/pdJElmNZQO0X1z?= =?us-ascii?Q?TxEP3hXuuElIf6VtCdLxAlPHBx0pUsQHdkPev796In0tvlcPlpvMACWP9fpM?= =?us-ascii?Q?eBt3LHmezvMwfDGUA77GoZZuUjA55DHKThsHv3ertXdfvG4a8cMNOhCMG6tl?= =?us-ascii?Q?AMaEWoaOteAHqXgSSQNK5fXTJSGEZre7qgus/jfvvTcVIJqXLLqbKOd3Zgc4?= =?us-ascii?Q?yfd/Vh/Cf0daTWa6yOcVvbiBQ/PuFP3aar+L7z0qssUsR/Sg0ZFyEQeyPHsb?= =?us-ascii?Q?Si+qFFZDI74eX4XyIpgc8HJ0Ye24J4KBXVlYyzTcLQia+5MCNHrgH+dmxW/Y?= =?us-ascii?Q?5l3MP0JMjou2myZgc+wj9bqZqYCMX/W26vxLWxkZzzoJHa4xPPlkyKVH80a2?= =?us-ascii?Q?hhfRruXVJxdzyNrtdP9EGNRZmcwGU4+foe+w7LRIldA7SvTEz4S/b9rN+CRq?= =?us-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pI6E1vcdMofGusAm2Xy3KfVUnB?= =?us-ascii?Q?i5R21o4GAUNjK8BhDkZhCk5uPf51pCOtgSQvNNew+qVqMHNbwo9E8gcn0xty?= =?us-ascii?Q?M058rPzoBNts7IFMwv7JWU838nVVNLT34lIZ3WFsz6VZVtP8ULTAhjCP7POQ?= =?us-ascii?Q?iGf45XUDq0ahrYOq03s=3D?= 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: 69aba2d6-75b1-4726-66e1-08dc36b60508 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Feb 2024 10:30:57.5575 (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: qyITfgoFVM8P8szxuY29ZnYIqBUBimCj3RkHmmy+eMBrhhxB3im+QJuLoMPXflfF1Srzzn8WVlG55cbyf2Z9Dg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR10MB4599 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 Reply-To: devel@edk2.groups.io,sivaramann@ami.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: xCOXvpvMccoWU6e9loMiMlD7x7686176AA= 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=20140610 header.b=lFXKnRcJ; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); 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, @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 (#115948): https://edk2.groups.io/g/devel/message/115948 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-