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 3EF44941173 for ; Tue, 27 Feb 2024 04:49:59 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=IJDbdXkW0oAxSWZXdxLaEYo41a7M+ybHFkxWvOU2Ufg=; 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=1709009398; v=1; b=MK2N++uZX23EnsFdRAl2cXuVunC6JqDwCZDclLHV2XEsMq2w1Ls+gVafRI4Ykj39fEDT+Dtt JdIw8yC8NsvuMcG1XJ/MIOYVv3VXzskgvNKSN/s2VpmagXRQbLZqxhIyLJZXwGhodzmZKeGrfYD mW0xg/eX1EYmpa6BjgIVgXmM= X-Received: by 127.0.0.2 with SMTP id kdecYY7687511x7zgGku4Y1n; Mon, 26 Feb 2024 20:49:58 -0800 X-Received: from NAM10-DM6-obe.outbound.protection.outlook.com (NAM10-DM6-obe.outbound.protection.outlook.com [40.107.93.139]) by mx.groups.io with SMTP id smtpd.web10.5978.1709009397536416730 for ; Mon, 26 Feb 2024 20:49:58 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KC9ysBo7EzlM3CIgaftRGALcbTdVwHDLxTNquvJvoF+TPBN0tn6ldE9s/CRBsrF2zyitPhfp7hfHgoP/l6ARksHDY67hbSxcsjl0jrVUkoHy+SUe+sa0rY/zGSKK+AMzRLfI0kqYxQ356INO0f2A6GJ50Yl4+KlIbIf1SkuH5faGQoJBQ9o+LTAHP+RjMfS/du0l673dIi92emftPxslTOX3KmbfdlPbewZTB78DwjLi6FFDyt6W0kHaj//iOuXlCPdo5h/L31QyI2XjYGWm58J4h4BT+DtQ5lAkg9KXfAXkADwaRkN7RvlgmCS4iU3xV2um6oWtFxo4YL6n7lYxnw== 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=glvcOArqI5pz5McmfD6yEF1/WuXrCC6gPPjk/u4GipA=; b=GeJYIIIV1klcmyUMuRaui2lIVMC5RQEkZASGlQL9LUo3XlLTnpAGEH72nhegog1ExYqT6jQwyB7xVLKiDQbfmk52QDVz+PLKIumhcUeNWLIuR15KGqOiNN70NrVmPopBg9wslHtFr5DclaKqbGhQq5qKCkdUTu8+iVWou1h37XcKbeepKFZ6utAIsgAPcvYKuNWli23TO30xv0dfzzA2OBWga1edwoKSVtxmbmFz8jJ/92HwJ+CiEra3BCPC+ZAqPMRFrVOVvicb4feomtRIKXh4MckiywS/e74/Rc7HcKh/riaNJw9loAD3X82M83+Olek6Y4gfWAhC2QMKwvJtXg== 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 SJ2PR10MB7826.namprd10.prod.outlook.com (2603:10b6:a03:56b::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.39; Tue, 27 Feb 2024 04:49:52 +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; Tue, 27 Feb 2024 04:49:52 +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: AQHaZOmcTV48E41v9E6Ol22UcMz6DLEVdjGAgAAlbkCABtgbEIABMwHQ Date: Tue, 27 Feb 2024 04:49:51 +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-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BN0PR10MB4981:EE_|SJ2PR10MB7826:EE_ x-ms-office365-filtering-correlation-id: ebb1440e-a1be-4c17-ddcb-08dc374f88ff x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: HwtgEru+q5dyBaKxI490lxZMLNHpL7cMJAAC2NT4WQg2ztq2C88A1hqtm+ZkA292RyY66aizmDq6UVxNhdVowRwuBphbDZ49MpWCgdX/l6EYcxCrSIs+ZG2T+Oyk3Gfdis6v0uzyIbP7R2CcGOnOLAO1VYODKMR0nGKLaNzi+BTFbgDKpjrdBRkfvN+mCw2FITR/dXE0lYswd41M/U+G2J1vjHJJXVuqYDPlvZHvpmW5zWdRHOUESU1NG5lDqlGnDR+n8bLUi46FafRVGcK4Cz+73ByjKMD9m1Wr6O3/t2zLzm4ARB30C8clIeXhWniCPJrgNyN9Mr38JR1r9ghozTfJWstQUxWihMuIPUglxS4JHai3KqK686j5mPiL+R4hEQ1oZmWZHCYdTCp6tg8onVkNnrUoNwzxJgLkohqoUGlLMiqsZhYfCiNJ4ah4yfkeAAR9Ma2QNY1wH3UeJn6TwJDNP0KmZBLG6A4i5YUFuHlrwR9RPe9BO/VUrmVdVv1q8/xIct4nfmalmkyEG1gC0fz5YAHI4UJU7dTfEqY2NsFZoaEiVOthf2Y/CUbUfxQdTRfpOJF6MZ58YyGaV/a2rjIf2XZuEry7rIBGxygci8g39TaoOL3JB32FGs3ZNFWfBSf1CiOhVS9IjL9Fib653gXmkcNXf67LeYdiKCuMMlu3IViqEn/JYWEUZ/hUGxivjthq7HCrb/Dd0/dNqsvo7A== x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?q+lpSH2KfDm1/GR6eKlbQHLeRud17Qa6N5dM7J47Jr/nYhXIkDxNbouWoQpj?= =?us-ascii?Q?i6XqI+O/N4VCrxXxuB9DnE4E3+VBeQyf7CEwHd5UtnB37sXpR2pYkIH4Os7l?= =?us-ascii?Q?jfJwUMww+5PGdiBHUX37fX+HaWSsRG9Tkdywfk5Cy+aBHWnhsUfYVZ74OU1j?= =?us-ascii?Q?w8qbgXt/N+nsegF7Zmssf53FI08DOQTk+ePn2WoCLcJuCIxiFOClxCHHSor3?= =?us-ascii?Q?F7MCHvQYw3MgBT+rduhJAUFyTs8fiWUjafx7HtfQtJy4mQk8HzyStOi3chhD?= =?us-ascii?Q?mwgpL45UHZDXbV3UFyxjLKx1/Ximow0yGAe9JyukyZLk/4wODp5+zK7NNugz?= =?us-ascii?Q?yVvTVI/Sx0bN+NCTIA9A9JGpam0MqFsbn455RuhePEX4SMUytNMFbo+O20kS?= =?us-ascii?Q?alu9lZzOgYABlLSOtcRTs9Z5xtuMSLAho4s/x2/u2Yb7cmpAv/i2GA4gUqef?= =?us-ascii?Q?cE/1U3XlI4WInHlpWwhi2ZLfW1tvQQR8AKg6F1Hpb9NYczP2+fD5wWMd97ph?= =?us-ascii?Q?SRy64hQiVfl87OdZQQsk89wiN9l6TwpXn03VfEKS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C4z3jFnUwgM3pI1zDUcUgTcQs09kxdl5/OS3PAhaRU?= =?us-ascii?Q?l5yeEa/+yvBLwMohd64e3s3mIp1zPolrbO8+BQpubesdouW6QaStPreGIoQU?= =?us-ascii?Q?etZ7bd4+p/9J4WXpS+olK+3t1SV4Bh1zcoNCGNt8?= 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: ebb1440e-a1be-4c17-ddcb-08dc374f88ff X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Feb 2024 04:49:52.0028 (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: iyZfmyCJBFY53UTiDtvjomlG+d8W9Vf9OQotulFRcyphzX4MmHzJjNMy+LWNanr8am/IzbCp9p3BcuJVyx8SNQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR10MB7826 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: yluuovSCkMiJ43z7YtyiGki7x7686176AA= 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=MK2N++uZ; 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 Hi Laszlo, We can see the issue not only with SLES, it can be seen with Ubuntu 22 also= . Do we have any channel to work with grub team to fix this issue? 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 (#116001): https://edk2.groups.io/g/devel/message/116001 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-