From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.126; helo=mga18.intel.com; envelope-from=jiaxin.wu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (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 1D7C320081A62 for ; Wed, 13 Feb 2019 16:55:24 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Feb 2019 16:55:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,367,1544515200"; d="scan'208";a="320212415" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga005.fm.intel.com with ESMTP; 13 Feb 2019 16:55:23 -0800 Received: from shsmsx106.ccr.corp.intel.com (10.239.4.159) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 13 Feb 2019 16:55:23 -0800 Received: from shsmsx107.ccr.corp.intel.com ([169.254.9.162]) by SHSMSX106.ccr.corp.intel.com ([169.254.10.174]) with mapi id 14.03.0415.000; Thu, 14 Feb 2019 08:55:21 +0800 From: "Wu, Jiaxin" To: "Fu, Siyuan" , "edk2-devel@lists.01.org" CC: Michael Turner , "Ye, Ting" Thread-Topic: [PATCH v2] NetworkPkg/Ip6Dxe: Clean the invalid IPv6 configuration during driver start. Thread-Index: AQHUwmx9rFXz6n0LAkGC7eUjo+IUR6Xa0tyAgAOmmhA= Date: Thu, 14 Feb 2019 00:55:20 +0000 Message-ID: <895558F6EA4E3B41AC93A00D163B727416ED0CD6@SHSMSX107.ccr.corp.intel.com> References: <20190212004705.16408-1-Jiaxin.wu@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzhlZjNmM2UtNTZmNS00NTY5LTlhMjYtMzMzZDYyODMzMGQ3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiUDFBckRNeStkQTJ1QytnSUFVQXh0QUU3dSs3K3Y0c1JlQTVnNlkzeEh4UlBaM0J0eFg3bjhwck1CUGhHU0FESCJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH v2] NetworkPkg/Ip6Dxe: Clean the invalid IPv6 configuration during driver start. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Feb 2019 00:55:24 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Siyuan, Both of them should be fine to clear the invalid configuration data. In my = opinion, since the error returned from SetData(), we will treat it as inval= id except the asynchronous process (EFI_NOT_READY). That's already have bee= n checked in the if condition. Thanks, Jiaxin > -----Original Message----- > From: Fu, Siyuan > Sent: Tuesday, February 12, 2019 9:05 AM > To: Wu, Jiaxin ; edk2-devel@lists.01.org > Cc: Michael Turner ; Ye, Ting > > Subject: RE: [PATCH v2] NetworkPkg/Ip6Dxe: Clean the invalid IPv6 > configuration during driver start. >=20 > Hi, Jiaxin >=20 > I think the Ip6Cfg->SetData() may return other error, which not only beca= use > invalid config data is used. Why not just check the config data in > Ip6ConfigReadConfigData()? >=20 > BestRegards > Fu Siyuan >=20 >=20 > > -----Original Message----- > > From: Wu, Jiaxin > > Sent: Tuesday, February 12, 2019 8:47 AM > > To: edk2-devel@lists.01.org > > Cc: Michael Turner ; Ye, Ting > > ; Fu, Siyuan ; Wu, Jiaxin > > > > Subject: [PATCH v2] NetworkPkg/Ip6Dxe: Clean the invalid IPv6 > configuration > > during driver start. > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1448 > > > > *v2: Add the warning debug message. > > > > This patch is to clean the invalid data and continue to start IP6 drive= r. > > > > Cc: Michael Turner > > Cc: Ye Ting > > Cc: Fu Siyuan > > Contributed-under: TianoCore Contribution Agreement 1.1 > > Signed-off-by: Wu Jiaxin > > --- > > NetworkPkg/Ip6Dxe/Ip6Driver.c | 22 ++++++++++++++++++++-- > > 1 file changed, 20 insertions(+), 2 deletions(-) > > > > diff --git a/NetworkPkg/Ip6Dxe/Ip6Driver.c > b/NetworkPkg/Ip6Dxe/Ip6Driver.c > > index 4c607125a6..7ec74f6ebc 100644 > > --- a/NetworkPkg/Ip6Dxe/Ip6Driver.c > > +++ b/NetworkPkg/Ip6Dxe/Ip6Driver.c > > @@ -586,11 +586,20 @@ Ip6DriverBindingStart ( > > Ip6ConfigDataTypeManualAddress, > > DataItem->DataSize, > > DataItem->Data.Ptr > > ); > > if (EFI_ERROR(Status) && Status !=3D EFI_NOT_READY) { > > - goto UNINSTALL_PROTOCOL; > > + // > > + // Clean the invalid ManualAddress configuration. > > + // > > + Status =3D Ip6Cfg->SetData ( > > + Ip6Cfg, > > + Ip6ConfigDataTypeManualAddress, > > + 0, > > + NULL > > + ); > > + DEBUG ((EFI_D_WARN, "Ip6DriverBindingStart: Clean the invalid > > ManualAddress configuration.\n")); > > } > > } > > > > // > > // If there is any default gateway address, set it. > > @@ -602,11 +611,20 @@ Ip6DriverBindingStart ( > > Ip6ConfigDataTypeGateway, > > DataItem->DataSize, > > DataItem->Data.Ptr > > ); > > if (EFI_ERROR(Status)) { > > - goto UNINSTALL_PROTOCOL; > > + // > > + // Clean the invalid Gateway configuration. > > + // > > + Status =3D Ip6Cfg->SetData ( > > + Ip6Cfg, > > + Ip6ConfigDataTypeGateway, > > + 0, > > + NULL > > + ); > > + DEBUG ((EFI_D_WARN, "Ip6DriverBindingStart: Clean the invalid > Gateway > > configuration.\n")); > > } > > } > > > > // > > // ready to go: start the receiving and timer > > -- > > 2.17.1.windows.2