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 66956D80056 for ; Fri, 19 Jan 2024 03:39:07 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=v0iT/9EHyIihp1/LEefyvopxBYtOSlgz+gsVRDlIiRw=; 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:msip_labels: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; s=20140610; t=1705635546; v=1; b=F8gXKW8/DfSeoozBZDW4+Y4oYqOIHLmg2LKenFTkWWRUrOfjtBYPLNNf3RfAyY3LBu0ibMu4 hT8v+hqa72amr3D0m6unUjOdZ5R5u78kHw/OueU757JP6kGXE7xbw0FkkUVT21iM9c0JrG7lxt6 /wHha8MJml90uCLRMwj3Uy40= X-Received: by 127.0.0.2 with SMTP id 2GHdYY7687511xLFQIx2mXil; Thu, 18 Jan 2024 19:39:06 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web10.13904.1705635545300747013 for ; Thu, 18 Jan 2024 19:39:05 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10956"; a="397815447" X-IronPort-AV: E=Sophos;i="6.05,204,1701158400"; d="scan'208,217";a="397815447" X-Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2024 19:38:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,204,1701158400"; d="scan'208,217";a="550367" X-Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmviesa004.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 18 Jan 2024 19:38:51 -0800 X-Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 18 Jan 2024 19:38:49 -0800 X-Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 18 Jan 2024 19:38:49 -0800 X-Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Thu, 18 Jan 2024 19:38:49 -0800 X-Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.41) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Thu, 18 Jan 2024 19:38:48 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VMELK2h681Yw85TIwvu7YLtE1jOJFGF6RXyQw3dG075AZXmf/96k7cTvgQgciKXCiDswPEuoMWQzWaPCQA+ZZq+CVnv5XOaCeFiFagXZBo4CUXcdrCKEtn0VjPXBX6tfLVfnqv94JHalOncXONbYqBubHmS5Z3uyuR7xyhimUw9gLaQibgsJwxF9D8msYgpkY97VhO0EHdLP2a+gxvsLL3vIRTj5BZxs400phJSAquzXmvNEqycKL7s9Vp35ar3rseq2MXnqYiIIVq1GoXmE4l5w40rvaysV2NNlYkxtEx2ZKLG+5bm1jgg11osu8Jg+QNDZR8hNi95jPmj7Jtv45A== 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=Guj7XSF65ZAjS7rdjWk6oQ96nXkSGFnmaaYg7A/p2dg=; b=e2RygAbKftrpVnsrOpytJR1ZRpv8rrUKebctvuyxa6+8uRhtlhj6QZSSZOrCrcvHYBq/EcmEJ8vdxn8RJyLjIDSdmPr9m4gnbMcvWIaRlLsEiQjC54jyaM8+a+NO1P2UKtCOQQO/C67j5pXFltLunDVwp/Ge5kMQWMasfX5jLLBNkKcbpQE1uGHKuQbMHfXMxyYmMkDIQl+5Ij21SP/g2PrH0Vc/MwhZDW5of/gikaqAab70XGDmuwH1paoBCRvCpQvPR6DMVaywx36d07DleLEe27V/1IqbdoQTxJ4nUy/F71I/MgqgC56m5pFCUUAS2HUFvMf2VvsCyzingTeyBA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none X-Received: from CO1PR11MB4929.namprd11.prod.outlook.com (2603:10b6:303:6d::19) by BN9PR11MB5546.namprd11.prod.outlook.com (2603:10b6:408:103::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.24; Fri, 19 Jan 2024 03:38:46 +0000 X-Received: from CO1PR11MB4929.namprd11.prod.outlook.com ([fe80::4382:5b03:f13:88ff]) by CO1PR11MB4929.namprd11.prod.outlook.com ([fe80::4382:5b03:f13:88ff%4]) with mapi id 15.20.7202.024; Fri, 19 Jan 2024 03:38:46 +0000 From: "Michael D Kinney" To: Ashish Singhal , "Kasbekar, Saloni" , "devel@edk2.groups.io" , "Clark-williams, Zachary" , Jeff Brasen , "Gao, Liming" CC: "Kinney, Michael D" Subject: Re: [edk2-devel] [PATCH] NetworkPkg/Ip4Dxe: Fix Reset To Default Thread-Topic: [PATCH] NetworkPkg/Ip4Dxe: Fix Reset To Default Thread-Index: AQHaSnqJXamgs6Y3ZkGnhLa8X2OHrLDgfP+A Date: Fri, 19 Jan 2024 03:38:46 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CO1PR11MB4929:EE_|BN9PR11MB5546:EE_ x-ms-office365-filtering-correlation-id: 038dde23-34e7-489e-e8d6-08dc18a02441 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: Tj0Hh5Efj5vzxPXXIlwuCdIlCED3zYXSptQ/ZcwIY1Ce/Mzscr0RLclf0Vl+1BHvZQw8HIl9zFOKEBhTLfpV5jUo3mg/ClfRswrI6EYHRqXasnskVtNBqRlCKnAjmFtsiw4S9ThhszY2brVk3oGG/zHhX5q8NA486sgNqJJUMJtc96xhZ3GRW/jxx+LoZxnxD15OnnSdAHsO5TifTKdNRiqVc4iY9LgPAsxkywkOtl+/PLpH16LW5TcG8AoWfY3ntRrbGqM5Re213cgptYvZfsLwNmV7Gw3K8hr+vchxqGCRxGJUjWLp6WpSUaV5qh37PsdeZMGhm6hyyi7FHC47RSTjBBloeljMll37pjUNTr/n9jRer3kbN/1nr2uuzIbkdGiwxddCVCje4uUQcxatGECth7dstmcLwlQ4yXhhW+zZUj0R+oWwhJHPs6cJ0k3W3o6tseo1VdxSY0KtGJ51y3HSs4gMuOPstvWZyoanXbiqfL6hWXtAB13KuAt0n1TUyxIxwuxrNrnELNpZSOPVfgQ9q4QI94OAoX2Fvd//sszXV1KO/j/MA+AenFxiyJYeef5T2qH4fX6pLzyeQ6WWvuYJDFFavnsjG8HWZN5KsWlijASj0HHTGgq1VpG9LmGtMWcFSEvQzSyMUQqf4lV7FYypGk9jrUVpSKE/DHZu6z+ZQPtWDehRUBOhIHJppnof x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?P06EGuSwGfOUjHR87FFYcjRR1vxDUJ0C9wRWKM/UVNj8u+3gb8M3kOrPiBTb?= =?us-ascii?Q?FGAurQDuxNZf8gMAeqfetB8jqDvEeU5tQUVnZlyp9U4RJ0NO8KRqVItPsyh+?= =?us-ascii?Q?2bn9i8J6Zs1oLtB1QhjkC/mlmJ14zYetTi9F/RJdw30Teu/HxMesvADh8WTW?= =?us-ascii?Q?IYzzbMsdflEp8633xbMe7spk3qAJ8FY5xDp2LrpSfx7sZBPgTYAv99JqZoS1?= =?us-ascii?Q?2ySsxeQNYzcli1O1GMKpIlnQCYgqXwMxFVWq0m8u9VlOa+9NSSFYs/RmALrX?= =?us-ascii?Q?tdo2Csvr8F1sz4t9InQ9MBUJjiUSOrlPTlSKZpnYxuGpbIocFd5xxCe8X3QB?= =?us-ascii?Q?pT8scuNZrSVUXTBkJgSbYjt0mdReYBWVEh71jBVy7VxdnLil8bSgctLWhxHb?= =?us-ascii?Q?3sRxuGp0OsKs6Hf+Qy8cBwFm0aAw0zdnXYSM+dFhra3g/3DHqJdtDOZvYxvd?= =?us-ascii?Q?fxOd3nle+FpjB6yYihJ7KWnSZ5FU4IpTyZaYmHbuAkyF5bXr2I26G6tcPF8K?= =?us-ascii?Q?ia3gH5BU9prtTEFTuG69tWxYWsGq+unxO387dWOQw95UsKjSDO2DpTBys5Hk?= =?us-ascii?Q?8T+qmCtfo/neMU6DLNMkLX1fgRfW4F7MzLRDdP8bAaoeHuX37z1HzoW8km8g?= =?us-ascii?Q?7N38/oL07lhKx+yKtvXComQr++erwJ0s40NEXAAV4e/dmkblM4XZi2xiAukJ?= =?us-ascii?Q?Y/PkOfgeNYPG36YvMHyoREmrH/F9BFTwv0Nx8OG5oRIgbT4+Zv1Ly2QMg0kg?= =?us-ascii?Q?UGDpSaQWA1PTSVvfXlWsFYtOAiF5IZt5SCfse7dmYtX9zqbe1KyNmCiqwS0p?= =?us-ascii?Q?EQZOyItfPjiz7ztCK7MDH3iNLFqi0nstXcGpi7P+zVDoNJpHc2u22psMkSGm?= =?us-ascii?Q?KDfOFi0Dz+FL80Cb/empWrt4itXFwy3Z+AAYGBCn7ad39wK7yENDfeQbpkiZ?= =?us-ascii?Q?w7kQSCnVfCEytz+4xixzhkiuoRigD2GQ8YFQOMrAtJYVxCk5oVuzMfZZ3epF?= =?us-ascii?Q?D9Zz/gNHKCfVV00mrfDmoqQnxVWqhwTUCpreyPZGLoencDGpcikv286+6WsD?= =?us-ascii?Q?nCbH/12W6v+LYHZZv5GQjQHOqBcbGE9JHEFXHgfi7jNL/kIAdr2tpTXw8JtB?= =?us-ascii?Q?tKB8nPbvLZlE9wi+1Oi/5IbZ37d4z+VJPgIrFpRvsL15Ltw8IwC8Hz8gjMVI?= =?us-ascii?Q?CquyEBieHDBS1nIS5V8MaozMHwTo0EBBN9c6SgikpfVwJILml5Yv6U86ZqQR?= =?us-ascii?Q?oUpxqMCOD8Sjq45zfnS7MHbIItnoFE0wCmDj17gGLhEGRyxEJ0cXu5bOHfZb?= =?us-ascii?Q?fATyx/TARx7IqLvCRgkVBGkvgAJEIxCERTeWNQ3EET6LwHl4gfyKn0psSiR6?= =?us-ascii?Q?8GiPOWfR6HVQoTa5NKhBaN0ne38b1m0Hcm+yV0+M1rnz+fiN/Tz6YAhMs76H?= =?us-ascii?Q?4+zNJgC/bwrXwyyvFUZRwlEPVUmXO0iYlNDJCOPxuxhWbBsRIKm/lduK7A7j?= =?us-ascii?Q?DQUVM7AfkUZJfAIJVp6dooALn/3opzUFgX0OjEky5PkbQtTe+NLY0NG+BHIa?= =?us-ascii?Q?4XXay+nUxt5sp8WBsC1dsfsX0LqeREAEztIPmdGpPLLxgSQ3w0lxlfqiwya8?= =?us-ascii?Q?+w=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO1PR11MB4929.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 038dde23-34e7-489e-e8d6-08dc18a02441 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Jan 2024 03:38:46.1514 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: V2dz4D27yj1xgoRVm+PpsWjbOfnqZzZJOmsZ6YWxmEzvtn7UgoYj7UTlx3G1oZFAYrnYy4VdRO9hTzN+gqBKmrsULnisgr8a+hryLmRSpCM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR11MB5546 X-OriginatorOrg: intel.com 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,michael.d.kinney@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: mlWBP13etAZEbBRflSdCfHg1x7686176AA= Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_CO1PR11MB49296C16699AF3953B8C0962D2702CO1PR11MB4929namp_" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b="F8gXKW8/"; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}") --_000_CO1PR11MB49296C16699AF3953B8C0962D2702CO1PR11MB4929namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Merged: https://github.com/tianocore/edk2/pull/5274 Mike From: Ashish Singhal Sent: Thursday, January 18, 2024 5:55 PM To: Kinney, Michael D ; Kasbekar, Saloni ; devel@edk2.groups.io; Clark-williams, Zachary ; Jeff Brasen ; Gao, Liming= Subject: Re: [PATCH] NetworkPkg/Ip4Dxe: Fix Reset To Default Replied too soon. I saw you had already closed mine. Thanks Ashish ________________________________ From: Ashish Singhal > Sent: Friday, January 19, 2024 7:23 AM To: Kinney, Michael D >; Kasbekar, Saloni >; devel@edk2.groups.io >; Clark-williams, Zachary >; Jeff= Brasen >; Gao, Liming > Subject: Re: [PATCH] NetworkPkg/Ip4Dxe: Fix Reset To Default Hi Michael, If you are going to create a new PR yourself instead of using the one I alr= eady created (https://github.com/tianocore/edk2/pull/5150), should I close = this one? Thanks Ashish ________________________________ From: Kinney, Michael D > Sent: Friday, January 19, 2024 4:57 AM To: Kasbekar, Saloni >; Ashish Singhal >; devel@edk2.groups.io >; Clark-williams, Zachary >; Jeff Brasen <= jbrasen@nvidia.com>; Gao, Liming > Cc: Kinney, Michael D > Subject: RE: [PATCH] NetworkPkg/Ip4Dxe: Fix Reset To Default External email: Use caution opening links or attachments Acked-by: Michael D Kinney > I will prepare PR for merge From: Kasbekar, Saloni > Sent: Wednesday, January 17, 2024 9:27 AM To: Ashish Singhal = >; devel@edk2.groups.io; Clark-williams, Zacha= ry >; Jeff Brasen >; Kinney, M= ichael D >; G= ao, Liming > Subject: RE: [PATCH] NetworkPkg/Ip4Dxe: Fix Reset To Default Liming, Mike, Could you please help merge this PR? Thanks, Saloni From: Ashish Singhal Sent: Wednesday, January 17, 2024 6:08 AM To: Kasbekar, Saloni ; mailto:devel@edk2.= groups.io; Clark-williams, Zachary ; Jeff Brasen Subject: Re: [PATCH] NetworkPkg/Ip4Dxe: Fix Reset To Default Hello, Checking back for an update on when this PR can be merged or if there are a= ny other changes you recommend. Thanks Ashish ________________________________________ From: Ashish Singhal Sent: Saturday, January 6, 2024 5:53 AM To: Kasbekar, Saloni ; mailto:devel@edk2.= groups.io ; Clark-williams, Zachary ; Jeff Brasen Subject: Re: [PATCH] NetworkPkg/Ip4Dxe: Fix Reset To Default Thanks Saloni. PR for getting this merged is available at https://github.co= m/tianocore/edk2/pull/5150 Thanks Ashish ________________________________________ From: Kasbekar, Saloni Sent: Saturday, January 6, 2024 1:31 AM To: Ashish Singhal ; mailto:devel@edk2.grou= ps.io ; Clark-williams, Zachary ; Jeff Brasen Subject: RE: [PATCH] NetworkPkg/Ip4Dxe: Fix Reset To Default External email: Use caution opening links or attachments Yes, SetData does reset the previous configuration. Reviewed-by: Saloni Kasbekar Thanks, Saloni From: Ashish Singhal Sent: Friday, January 5, 2024 2:34 AM To: Kasbekar, Saloni ; mailto:devel@edk2.= groups.io; Clark-williams, Zachary ; Jeff Brasen Subject: Re: [PATCH] NetworkPkg/Ip4Dxe: Fix Reset To Default I do not recommend doing that. Setting policy via SetData does enough to wi= pe out any previous manual configuration and that is the goal for reset to = default. ________________________________________ From: Kasbekar, Saloni Sent: Friday, January 5, 2024 2:30 AM To: Ashish Singhal ; mailto:devel@edk2.grou= ps.io ; Clark-williams, Zachary ; Jeff Brasen Subject: RE: [PATCH] NetworkPkg/Ip4Dxe: Fix Reset To Default External email: Use caution opening links or attachments Makes sense. Should we also set IfrNvData->DhcpEnable =3D TRUE when updatin= g the Policy then? From: Ashish Singhal Sent: Wednesday, January 3, 2024 8:52 AM To: Kasbekar, Saloni ; mailto:devel@edk2.= groups.io; Clark-williams, Zachary ; Jeff Brasen Subject: Re: [PATCH] NetworkPkg/Ip4Dxe: Fix Reset To Default Hello Saloni, Thanks for the feedback. After the reset, or when we disable configure from= menu, GetData returns policy to static as the enum value is 0. However, se= tting value as static does not have any benefit as it forces to reuse the o= ld network settings. Using DHCP really mimics the reset behavior that we se= e without any configuration done manually. Thanks Ashish ________________________________________ From: Kasbekar, Saloni Sent: Tuesday, January 2, 2024 1:47 PM To: Ashish Singhal ; mailto:devel@edk2.grou= ps.io ; Clark-williams, Zachary ; Jeff Brasen Subject: RE: [PATCH] NetworkPkg/Ip4Dxe: Fix Reset To Default External email: Use caution opening links or attachments Hi Ashish, + Ip4NvData->Policy =3D Ip4Config2PolicyDhcp; + Status =3D Ip4Cfg2->SetData ( + Ip4Cfg2, + Ip4Config2DataTypePolicy, + sizeof (EFI_IP4_CONFIG2_POLICY), + &Ip4NvData->Policy + ); Here we're assuming IfrFormNvData->DhcpEnable is TRUE. Should we check it b= efore setting the policy and calling SetData()? Thanks, Saloni From: Ashish Singhal Sent: Monday, January 1, 2024 8:48 AM To: mailto:devel@edk2.groups.io; Kasbekar, Saloni ; Clark-williams, Zachary ; Jeff Brasen Subject: Re: [PATCH] NetworkPkg/Ip4Dxe: Fix Reset To Default Hello, Checking again for some feedback on this. Thanks Ashish ________________________________________ From: Ashish Singhal Sent: Thursday, December 14, 2023 4:42 PM To: mailto:devel@edk2.groups.io ; mailto:salon= i.kasbekar@intel.com ; mailto:zachary.cla= rk-williams@intel.com ; Jeff Brase= n Cc: Ashish Singhal Subject: [PATCH] NetworkPkg/Ip4Dxe: Fix Reset To Default Exercising reset to default does not reset the settings. Add handler code for the case where configuration is disabled. Signed-off-by: Ashish Singhal --- NetworkPkg/Ip4Dxe/Ip4Config2Nv.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/NetworkPkg/Ip4Dxe/Ip4Config2Nv.c b/NetworkPkg/Ip4Dxe/Ip4Config= 2Nv.c index e0b6a4d4a9..dac5817b7c 100644 --- a/NetworkPkg/Ip4Dxe/Ip4Config2Nv.c +++ b/NetworkPkg/Ip4Dxe/Ip4Config2Nv.c @@ -586,6 +586,31 @@ Ip4Config2ConvertIfrNvDataToConfigNvData ( } if (IfrFormNvData->Configure !=3D TRUE) { + if (Ip4NvData->DnsAddress !=3D NULL) { + FreePool (Ip4NvData->DnsAddress); + Ip4NvData->DnsAddress =3D NULL; + Ip4NvData->DnsAddressCount =3D 0; + } + + if (Ip4NvData->GatewayAddress !=3D NULL) { + FreePool (Ip4NvData->GatewayAddress); + Ip4NvData->GatewayAddress =3D NULL; + Ip4NvData->GatewayAddressCount =3D 0; + } + + if (Ip4NvData->ManualAddress !=3D NULL) { + FreePool (Ip4NvData->ManualAddress); + Ip4NvData->ManualAddress =3D NULL; + Ip4NvData->ManualAddressCount =3D 0; + } + + Ip4NvData->Policy =3D Ip4Config2PolicyDhcp; + Status =3D Ip4Cfg2->SetData ( + Ip4Cfg2, + Ip4Config2DataTypePolicy, + sizeof (EFI_IP4_CONFIG2_POLICY), + &Ip4NvData->Policy + ); return EFI_SUCCESS; } -- 2.17.1 Hello, Hello Saloni, Thanks -=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 (#114023): https://edk2.groups.io/g/devel/message/114023 Mute This Topic: https://groups.io/mt/103181314/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/19134562= 12/xyzzy [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- --_000_CO1PR11MB49296C16699AF3953B8C0962D2702CO1PR11MB4929namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Merged: https://github.com/tianocore/edk2/pull/5274

 

Mike

 

From: Ashish Singhal <ashishsingha@nvidia.= com>
Sent: Thursday, January 18, 2024 5:55 PM
To: Kinney, Michael D <michael.d.kinney@intel.com>; Kasbekar, = Saloni <saloni.kasbekar@intel.com>; devel@edk2.groups.io; Clark-willi= ams, Zachary <zachary.clark-williams@intel.com>; Jeff Brasen <jbra= sen@nvidia.com>; Gao, Liming <gaoliming@byosoft.com.cn>
Subject: Re: [PATCH] NetworkPkg/Ip4Dxe: Fix Reset To Default

 

Replied too soon. I saw you had already closed mine.<= /o:p>

 

Thanks

Ashish

 


From: Ashish Singhal <ashishsingha@nvidia.com>
Sent: Friday, January 19, 2024 7:23 AM
To: Kinney, Michael D <michael.d.kinney@intel.com>; Kasbekar, Saloni <saloni.kasbekar@intel.com>; devel@edk2.groups.io <devel@edk2.groups.io>; Clark-willi= ams, Zachary <zachar= y.clark-williams@intel.com>; Jeff Brasen <jbrasen@nvidia.com>; Gao, Liming <gaoliming@byos= oft.com.cn>
Subject: Re: [PATCH] NetworkPkg/Ip4Dxe: Fix Reset To Default

 

Hi Michael,

 

If you are going to create a new PR yourself instead of us= ing the one I already created (https://git= hub.com/tianocore/edk2/pull/5150), should I close this one?

 

Thanks

Ashish


From: Kinney, Michael D <michael.d.kinney@intel.com>
Sent: Friday, January 19, 2024 4:57 AM
To: Kasbekar, Saloni <saloni.kasbekar@intel.com>; Ashish Singhal <ashishsingha@nvidia.com>; devel@edk2.groups.io <devel@edk2.groups.io>; Clark-willi= ams, Zachary <zachar= y.clark-williams@intel.com>; Jeff Brasen <jbrasen@nvidia.com>; Gao, Liming <gaoliming@byos= oft.com.cn>
Cc: Kinney, Michael D <michael.d.kinney@intel.com>
Subject: RE: [PATCH] NetworkPkg/Ip4Dxe: Fix Reset To Default

 

External email: Use caution opening links or attachm= ents


Acked-by: Michael D Kinney <michael.d.kinney@intel.com>

I will prepare PR for merge




From: Kasbekar, Saloni <sal= oni.kasbekar@intel.com>
Sent: Wednesday, January 17, 2024 9:27 AM
To: Ashish Singhal <ashishsin= gha@nvidia.com>; devel@edk2.groups.io; Clark-wil= liams, Zachary <zach= ary.clark-williams@intel.com>; Jeff Brasen <jbrasen@nvidia.com>; Kinney, Michael D <michael.d.kinn= ey@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>
Subject: RE: [PATCH] NetworkPkg/Ip4Dxe: Fix Reset To Default

Liming, Mike,

Could you please help merge this PR?

Thanks,
Saloni

From: Ashish Singhal <mailto:= ashishsingha@nvidia.com>
Sent: Wednesday, January 17, 2024 6:08 AM
To: Kasbekar, Saloni <mailt= o:saloni.kasbekar@intel.com>; mailto:devel@edk2.groups.io; Cl= ark-williams, Zachary <mailto:zachary.clark-williams@intel.com>; Jeff Brasen <mailto:jbrasen@nvidia.com>
Subject: Re: [PATCH] NetworkPkg/Ip4Dxe: Fix Reset To Default

Hello,

Checking back for an update on when this PR can be merged or if there are a= ny other changes you recommend.

Thanks
Ashish

________________________________________
From: Ashish Singhal <mailto:= ashishsingha@nvidia.com>
Sent: Saturday, January 6, 2024 5:53 AM
To: Kasbekar, Saloni <mailt= o:saloni.kasbekar@intel.com>; mailto:devel@edk2.groups.io&nbs= p;<mailto:devel@edk2.groups.io>; Clark-williams, Zachary <mailto:zachary.clark-williams@intel.com>; Jeff Brasen <mailto:jbrasen@nvidi= a.com>
Subject: Re: [PATCH] NetworkPkg/Ip4Dxe: Fix Reset To Default

Thanks Saloni. PR for getting this merged is available at https://github.com/tianocore/edk2/pull/5150

Thanks
Ashish

________________________________________
From: Kasbekar, Saloni <mai= lto:saloni.kasbekar@intel.com>
Sent: Saturday, January 6, 2024 1:31 AM
To: Ashish Singhal <mailto:as= hishsingha@nvidia.com>; mailto:devel@edk2.groups.io&nbs= p;<mailto:devel@edk2.groups.io>; Clark-williams, Zachary <mailto:zachary.clark-williams@intel.com>; Jeff Brasen <mailto:jbrasen@nvidi= a.com>
Subject: RE: [PATCH] NetworkPkg/Ip4Dxe: Fix Reset To Default

External email: Use caution opening links or attachments

Yes, SetData does reset the previous configuration.

Reviewed-by: Saloni Kasbekar <mailto:saloni.kasbekar@intel.com>

Thanks,
Saloni

From: Ashish Singhal <mailto:= ashishsingha@nvidia.com>
Sent: Friday, January 5, 2024 2:34 AM
To: Kasbekar, Saloni <mailt= o:saloni.kasbekar@intel.com>; mailto:devel@edk2.groups.io; Cl= ark-williams, Zachary <mailto:zachary.clark-williams@intel.com>; Jeff Brasen <mailto:jbrasen@nvidia.com>
Subject: Re: [PATCH] NetworkPkg/Ip4Dxe: Fix Reset To Default

I do not recommend doing that. Setting policy via SetData does enough to wi= pe out any previous manual configuration and that is the goal for reset to = default.
________________________________________
From: Kasbekar, Saloni <mai= lto:saloni.kasbekar@intel.com>
Sent: Friday, January 5, 2024 2:30 AM
To: Ashish Singhal <mailto:as= hishsingha@nvidia.com>; mailto:devel@edk2.groups.io&nbs= p;<mailto:devel@edk2.groups.io>; Clark-williams, Zachary <mailto:zachary.clark-williams@intel.com>; Jeff Brasen <mailto:jbrasen@nvidi= a.com>
Subject: RE: [PATCH] NetworkPkg/Ip4Dxe: Fix Reset To Default

External email: Use caution opening links or attachments

Makes sense. Should we also set IfrNvData->DhcpEnable =3D TRUE when upda= ting the Policy then?

From: Ashish Singhal <mailto:= ashishsingha@nvidia.com>
Sent: Wednesday, January 3, 2024 8:52 AM
To: Kasbekar, Saloni <mailt= o:saloni.kasbekar@intel.com>; mailto:devel@edk2.groups.io; Cl= ark-williams, Zachary <mailto:zachary.clark-williams@intel.com>; Jeff Brasen <mailto:jbrasen@nvidia.com>
Subject: Re: [PATCH] NetworkPkg/Ip4Dxe: Fix Reset To Default

Hello Saloni,

Thanks for the feedback. After the reset, or when we disable configure from= menu, GetData returns policy to static as the enum value is 0. However, se= tting value as static does not have any benefit as it forces to reuse the o= ld network settings. Using DHCP really mimics the reset behavior that we see without any configuration don= e manually.

Thanks
Ashish

________________________________________
From: Kasbekar, Saloni <mai= lto:saloni.kasbekar@intel.com>
Sent: Tuesday, January 2, 2024 1:47 PM
To: Ashish Singhal <mailto:as= hishsingha@nvidia.com>; mailto:devel@edk2.groups.io&nbs= p;<mailto:devel@edk2.groups.io>; Clark-williams, Zachary <mailto:zachary.clark-williams@intel.com>; Jeff Brasen <mailto:jbrasen@nvidi= a.com>
Subject: RE: [PATCH] NetworkPkg/Ip4Dxe: Fix Reset To Default

External email: Use caution opening links or attachments

Hi Ashish,

+    Ip4NvData->Policy =3D Ip4Config2PolicyDhcp;
+    Status        &= nbsp;   =3D Ip4Cfg2->SetData (
+            &n= bsp;            = ;          Ip4Cfg2,
+            &n= bsp;            = ;          Ip4Config2DataTypeP= olicy,
+            &n= bsp;            = ;          sizeof (EFI_IP4_CON= FIG2_POLICY),
+            &n= bsp;            = ;          &Ip4NvData->= Policy
+            &n= bsp;            = ;          );

Here we're assuming IfrFormNvData->DhcpEnable is TRUE. Should we check i= t before setting the policy and calling SetData()?

Thanks,
Saloni


From: Ashish Singhal <mailto:= ashishsingha@nvidia.com>
Sent: Monday, January 1, 2024 8:48 AM
To: mailto:devel@edk2.groups.io= ; Kasbekar, Saloni <mailto:= saloni.kasbekar@intel.com>; Clark-williams, Zachary <mailto:zachary.clark-williams@intel= .com>; Jeff Brasen <mailto:jbrasen@nvidi= a.com>
Subject: Re: [PATCH] NetworkPkg/Ip4Dxe: Fix Reset To Default

Hello,

Checking again for some feedback on this.

Thanks
Ashish

________________________________________
From: Ashish Singhal <mailto:= ashishsingha@nvidia.com>
Sent: Thursday, December 14, 2023 4:42 PM
To: mailto:devel@edk2.groups.io=  <mailto:devel@edk2.groups.= io>; mailto:saloni.kasbekar@intel.c= om <mailto:saloni.= kasbekar@intel.com>; mailto:zachary.clark-wi= lliams@intel.com <mailto:zachary.clark-williams@intel.com>; Jeff Brasen <mailto:jbrasen@nvidia.com>
Cc: Ashish Singhal <mailto:as= hishsingha@nvidia.com>
Subject: [PATCH] NetworkPkg/Ip4Dxe: Fix Reset To Default

Exercising reset to default does not reset the settings.
Add handler code for the case where configuration is
disabled.

Signed-off-by: Ashish Singhal <mailto:ashishsingha@nvidia.com>
---
 NetworkPkg/Ip4Dxe/Ip4Config2Nv.c | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/NetworkPkg/Ip4Dxe/Ip4Config2Nv.c b/NetworkPkg/Ip4Dxe/Ip4Config= 2Nv.c
index e0b6a4d4a9..dac5817b7c 100644
--- a/NetworkPkg/Ip4Dxe/Ip4Config2Nv.c
+++ b/NetworkPkg/Ip4Dxe/Ip4Config2Nv.c
@@ -586,6 +586,31 @@ Ip4Config2ConvertIfrNvDataToConfigNvData (
   }

   if (IfrFormNvData->Configure !=3D TRUE) {
+    if (Ip4NvData->DnsAddress !=3D NULL) {
+      FreePool (Ip4NvData->DnsAddress);
+      Ip4NvData->DnsAddress   &= nbsp;  =3D NULL;
+      Ip4NvData->DnsAddressCount =3D 0;
+    }
+
+    if (Ip4NvData->GatewayAddress !=3D NULL) {
+      FreePool (Ip4NvData->GatewayAddress); +      Ip4NvData->GatewayAddress  &nb= sp;   =3D NULL;
+      Ip4NvData->GatewayAddressCount =3D 0; +    }
+
+    if (Ip4NvData->ManualAddress !=3D NULL) {
+      FreePool (Ip4NvData->ManualAddress);
+      Ip4NvData->ManualAddress  &nbs= p;   =3D NULL;
+      Ip4NvData->ManualAddressCount =3D 0;
+    }
+
+    Ip4NvData->Policy =3D Ip4Config2PolicyDhcp;
+    Status        &= nbsp;   =3D Ip4Cfg2->SetData (
+            &n= bsp;            = ;          Ip4Cfg2,
+            &n= bsp;            = ;          Ip4Config2DataTypeP= olicy,
+            &n= bsp;            = ;          sizeof (EFI_IP4_CON= FIG2_POLICY),
+            &n= bsp;            = ;          &Ip4NvData->= Policy
+            &n= bsp;            = ;          );
     return EFI_SUCCESS;
   }

--
2.17.1
Hello,
Hello Saloni,
Thanks

_._,_._,_

Groups.io Links:

=20 You receive all messages sent to this group. =20 =20

View/Reply Online (#114023) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--_000_CO1PR11MB49296C16699AF3953B8C0962D2702CO1PR11MB4929namp_--