From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from IMSVA.IN.MEGATRENDS.COM (IMSVA.IN.MEGATRENDS.COM [14.98.235.2]) by mx.groups.io with SMTP id smtpd.web11.112630.1597936596110502670 for ; Thu, 20 Aug 2020 08:16:37 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=SPF record not found (domain: amiindia.co.in, ip: 14.98.235.2, mailfrom: sivaramann@amiindia.co.in) Received: from IMSVA.IN.MEGATRENDS.COM (IMSVA.IN.MEGATRENDS.COM [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 55A9C82047; Thu, 20 Aug 2020 20:55:17 +0530 (IST) Received: from IMSVA.IN.MEGATRENDS.COM (IMSVA.IN.MEGATRENDS.COM [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2764882046; Thu, 20 Aug 2020 20:55:17 +0530 (IST) Received: from webmail.amiindia.co.in (venus2.in.megatrends.com [10.0.0.7]) by IMSVA.IN.MEGATRENDS.COM (Postfix) with ESMTPS; Thu, 20 Aug 2020 20:55:17 +0530 (IST) Received: from VENUS1.in.megatrends.com ([fe80::951:7975:6ecf:eae5]) by Venus2.in.megatrends.com ([fe80::2002:4a07:4f17:c09b%14]) with mapi id 14.03.0248.002; Thu, 20 Aug 2020 20:46:29 +0530 From: "Sivaraman Nainar" To: "devel@edk2.groups.io" , "jiaxin.wu@intel.com" CC: "liming.gao@intel.com" Subject: Re: [edk2-devel] [Patch ] IP is getting Configured when IP Configuration is disabled Thread-Topic: [edk2-devel] [Patch ] IP is getting Configured when IP Configuration is disabled Thread-Index: AdZxPXodVxdlySoIS2GVfZJOgEoRegFx1ntg Date: Thu, 20 Aug 2020 15:16:28 +0000 Message-ID: References: <162AC138777CB9A5.16363@groups.io> In-Reply-To: <162AC138777CB9A5.16363@groups.io> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.0.3.181] MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-TM-AS-Product-Ver: IMSVA-9.1.0.1817-8.6.0.1013-25616.000 X-TM-AS-Result: No--21.483-5.0-31-10 X-imss-scan-details: No--21.483-5.0-31-10 X-TMASE-Version: IMSVA-9.1.0.1817-8.6.1013-25616.000 X-TMASE-Result: 10--21.483000-10.000000 X-TMASE-MatchedRID: vWvnoyq7eMxbJCKOm3VRCceD7TUFHSWn1tfDKO9elpP9+QqC7f5tvoKX gCDkjm+CSs2jYje2Pdoea0JeKHt/0/ioIsi7Sa0gaz484/EJLg2dJYS4rHLiE97Zbz5omSpuo57 /XqmV66o+DMYP1Y4XzwezB6GJ6zMhK/YFZTiDf+pQdwGfvSIlBzUh4ni/2DncyN0zGEbKmwvRxA nyGLKRgRKRdQW2L01mhHib2uPtMF2eKBD/0uNkNqVq8wcB/0fT5z54dP+IdryyOwLS0GUbGNtXY rM5EPdsIdsopcBWWrpLIfps09VJ273qIn0IK4fC+nDqnR0MvOFrYHJBlx9pJ0s68SHVdwUKO1+U hT1tETq6AT3oNaJnPX2PoiXxUAcXOhJ9m53n4aDLmsnRFz6pJjECcrZ55BeG0oXt+HgrjYFJpV9 rHFX3jwK3yA1Y0A1+wbRQ2Bpmlioay+BQxgCfhQsFkS6ogv1KEnged8+ls1sZNurkZgWa1rvXEO nO4Rems4cP9rxQ85Z+mObOePntysHDWBf/LgJ8SnXYhdlqPHnZNpe4t6HOM0cN36UB4MN7l+soB KtnVK3f8QWOo2ap2UUfqhOIibCHhlL5/PVMMhJ7uKMeruD2hu2VVVLUIzQw2X0MdweWjLjQACPg tyOvxWU/kxuVGOMeaFAKyqG5M2IZskwWqoib3BpW65Njg4aD9WXm+yhJKyhoj7nB4dv1WIcFTUP 8vi4U9ZRkVakSSW1mNCKOCsW/OoXfI/GVGhaYb1gcTJvPJGzCX0YsfK3COp5Oa1OWcC7ut7BGF0 2PPFs7oFSoH4N03A6w00GeWBFafS0Ip2eEHnyvXSmSdlcYms8943oc3p3sErIHQfb5KDcq0hzNA 57lIn8DvkUabErVeSC65CityAy7s5UtCH+YusRBZAnInEQlj8kZEgrbjqES2Bd+gIfjr37cGd19 dSFd X-TMASE-SNAP-Result: 1.821001.0001-0-1-12:0,22:0,33:0,34:0-0 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_B4DE137BDB63634BAC03BD9DE765F19702B4B3C7A4VENUS1inmegat_" --_000_B4DE137BDB63634BAC03BD9DE765F19702B4B3C7A4VENUS1inmegat_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Jiaxin: Did you get chance to review the patch? -Siva From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Siva= raman Nainar Sent: Thursday, August 13, 2020 12:21 PM To: devel@edk2.groups.io Cc: liming.gao@intel.com; jiaxin.wu@intel.com Subject: [edk2-devel] [Patch ] IP is getting Configured when IP Configurat= ion is disabled BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2873 *** E:\Work\NWStack\EDK2Tickets\IPConfigFix\Mod\Ip4Config2Impl.c = 2020-08-04 18:38:06.000000000 +05-30 --- E:\Work\NWStack\EDK2Tickets\IPConfigFix\Org\Ip4Config2Impl.c 2020-= 05-07 22:54:46.000000000 +05-30 *************** *** 1965,1978 **** IP4_CONFIG2_INSTANCE *TmpInstance; LIST_ENTRY *Entry; EFI_STATUS Status; UINTN Index; UINT16 IfIndex; IP4_CONFIG2_DATA_ITEM *DataItem; ! BOOLEAN IPConfig= Enabled =3D FALSE; ! IP4_CONFIG2_IFR_NVDATA *IfrFromNvData =3D NULL; IpSb =3D IP4_SERVICE_FROM_IP4_CONFIG2_INSTANCE (Instance); Instance->Signature =3D IP4_CONFIG2_INSTANCE_SIGNATURE; --- 1965,1977 ---- IP4_CONFIG2_INSTANCE *TmpInstance; LIST_ENTRY *Entry; EFI_STATUS Status; UINTN Index; UINT16 IfIndex; IP4_CONFIG2_DATA_ITEM *DataItem; ! IpSb =3D IP4_SERVICE_FROM_IP4_CONFIG2_INSTANCE (Instance); Instance->Signature =3D IP4_CONFIG2_INSTANCE_SIGNATURE; *************** *** 2038,2063 **** // // Try to read the config data from NV variable. // If not found, write initialized config data into NV variable // as a default config data. // ! Status =3D GetVariable2(IpSb->MacString, &gIp4Config2NvDataGuid, (VO= ID**)&IfrFromNvData, NULL); ! if(!EFI_ERROR(Status)){ ! if (IfrFromNvData->Configure =3D=3D TRUE) { ! Status =3D Ip4Config2ReadConfigData (IpSb->MacString, Instan= ce); ! if (Status =3D=3D EFI_NOT_FOUND) { ! Status =3D Ip4Config2WriteConfigData (IpSb->MacString, I= nstance); ! } ! IPConfigEnabled =3D TRUE; ! } ! FreePool(IfrFromNvData); ! } ! if(!IPConfigEnabled){ ! Status =3D Ip4Config2WriteConfigData (IpSb->MacString, Instance)= ; ! } if (EFI_ERROR (Status)) { return Status; } Instance->Ip4Config2.SetData =3D EfiIp4Config2SetData; --- 2037,2052 ---- // // Try to read the config data from NV variable. // If not found, write initialized config data into NV variable // as a default config data. // ! Status =3D Ip4Config2ReadConfigData (IpSb->MacString, Instance); ! if (Status =3D=3D EFI_NOT_FOUND) { ! Status =3D Ip4Config2WriteConfigData (IpSb->MacString, Instance); ! } if (EFI_ERROR (Status)) { return Status; } Instance->Ip4Config2.SetData =3D EfiIp4Config2SetData; This e-mail is intended for the use of the addressee only and may contain = privileged, confidential, or proprietary information that is exempt from di= sclosure under law. If you have received this message in error, please info= rm us promptly by reply e-mail, then delete the e-mail and destroy any prin= ted copy. Thank you. --_000_B4DE137BDB63634BAC03BD9DE765F19702B4B3C7A4VENUS1inmegat_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Jiaxin:

 

Did you get chance to= review the patch?

 

-Siva

From: devel@edk2.groups.io [mailto:devel@edk= 2.groups.io] On Behalf Of Sivaraman Nainar
Sent: Thursday, August 13, 2020 12:21 PM
To: devel@edk2.groups.io
Cc: liming.gao@intel.com; jiaxin.wu@intel.com
Subject: [edk2-devel] [Patch ] IP is getting Configured when IP Con= figuration is disabled

 

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2873

 

*** E:\Work\NWStack\EDK2Tickets\IPConfigFix\Mod\Ip4= Config2Impl.c          &n= bsp;    2020-08-04 18:38:06.000000000 +05-30<= /p>

--- E:\Work\NWStack\EDK2Tickets\IPConfigFix\Org\Ip4= Config2Impl.c     2020-05-07 22:54:46.000000000 +05= -30

***************

*** 1965,1978 ****

    IP4_CONFIG2_INSTANCE  *TmpI= nstance;

    LIST_ENTRY   &nbs= p;        *Entry;

    EFI_STATUS   &nbs= p;        Status;

    UINTN    &nb= sp;            Index= ;

    UINT16    &n= bsp;           IfIndex;

    IP4_CONFIG2_DATA_ITEM *DataItem;=

!   BOOLEAN      = ;            &n= bsp;            = ;            &n= bsp;           IPConfigEn= abled =3D FALSE;

!   IP4_CONFIG2_IFR_NVDATA  *IfrFrom= NvData =3D NULL;

 

    IpSb =3D IP4_SERVICE_FROM_I= P4_CONFIG2_INSTANCE (Instance);

 

    Instance->Signature =3D = IP4_CONFIG2_INSTANCE_SIGNATURE;

 

  

--- 1965,1977 ----

    IP4_CONFIG2_INSTANCE  *TmpI= nstance;

    LIST_ENTRY   &nbs= p;        *Entry;

    EFI_STATUS   &nbs= p;        Status;

    UINTN    &nb= sp;            Index= ;

    UINT16    &n= bsp;           IfIndex;

    IP4_CONFIG2_DATA_ITEM *DataItem;=

!

  

    IpSb =3D IP4_SERVICE_FROM_I= P4_CONFIG2_INSTANCE (Instance);

 

    Instance->Signature =3D = IP4_CONFIG2_INSTANCE_SIGNATURE;

 

  

***************

*** 2038,2063 ****

 

    //

    // Try to read the config data f= rom NV variable.

    // If not found, write initializ= ed config data into NV variable

    // as a default config data.

    //

!     Status =3D GetVariable2(I= pSb->MacString, &gIp4Config2NvDataGuid, (VOID**)&IfrFromNvData, = NULL);

!     if(!EFI_ERROR(Status)){

!         i= f (IfrFromNvData->Configure =3D=3D TRUE) {

!        &n= bsp;    Status =3D Ip4Config2ReadConfigData (IpSb->MacStr= ing, Instance);

!        &n= bsp;    if (Status =3D=3D EFI_NOT_FOUND) {

!        &n= bsp;        Status =3D Ip4Config2WriteCo= nfigData (IpSb->MacString, Instance);

!        &n= bsp;    }

!        &n= bsp;    IPConfigEnabled =3D TRUE;

!         }=

!         F= reePool(IfrFromNvData);

!     }

!     if(!IPConfigEnabled){

!         S= tatus =3D Ip4Config2WriteConfigData (IpSb->MacString, Instance);

!     }

 

    if (EFI_ERROR (Status)) {

      return Status;<= /o:p>

    }

 

    Instance->Ip4Config2.Set= Data            = ;  =3D EfiIp4Config2SetData;

--- 2037,2052 ----

 

    //

    // Try to read the config data f= rom NV variable.

    // If not found, write initializ= ed config data into NV variable

    // as a default config data.

    //

!   Status =3D Ip4Config2ReadConfigData (= IpSb->MacString, Instance);

!   if (Status =3D=3D EFI_NOT_FOUND) {

!     Status =3D Ip4Config2Writ= eConfigData (IpSb->MacString, Instance);

!   }

 

    if (EFI_ERROR (Status)) {

      return Status;<= /o:p>

    }

 

    Instance->Ip4Config2.Set= Data            = ;  =3D EfiIp4Config2SetData;

This e-mail is intended for the use= of the addressee only and may contain privileged, confidential, or proprie= tary information that is exempt from disclosure under law. If you have received this message in error, please inform us promptly by = reply e-mail, then delete the e-mail and destroy any printed copy. Thank yo= u.

--_000_B4DE137BDB63634BAC03BD9DE765F19702B4B3C7A4VENUS1inmegat_--