Re: [edk2] [Patch] NetworkPkg: Fix Duplicate FreePool Error in WCM

2019-02-28 Thread Fu, Siyuan
Hi, Fan

The patch also cancel a timer in driver binding stop, please describe this 
change
in commit message, or separate it to another patch.

Reviewed-by: Siyuan Fu 

> -Original Message-
> From: Wang, Fan
> Sent: Thursday, February 28, 2019 5:10 PM
> To: edk2-devel@lists.01.org
> Cc: Ye, Ting ; Fu, Siyuan ; Wu, Jiaxin
> 
> Subject: [Patch] NetworkPkg: Fix Duplicate FreePool Error in WCM
> 
> * REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1577
> 
> In WiFi Connection Manager scan process, the result received
> from WiFi device driver will be freed twice, and will cause
> unexpected errors, and even system crash.
> 
> This issue also exists in some other places potentially, this
> patch is to fix these issues.
> 
> Cc: Ye Ting 
> Cc: Fu Siyuan 
> Cc: Wu Jiaxin 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Wang Fan 
> ---
>  NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrDriver.c| 1 +
>  NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrFileUtil.c  | 1 +
>  .../WifiConnectionManagerDxe/WifiConnectionMgrHiiConfigAccess.c  | 9
> +
>  NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrImpl.c  | 1 -
>  4 files changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrDriver.c
> b/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrDriver.c
> index 1431cdc7ea..63b0670c63 100644
> --- a/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrDriver.c
> +++ b/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrDriver.c
> @@ -409,10 +409,11 @@ WifiMgrDxeDriverBindingStop (
>}
> 
>//
>// Close Event
>//
> +  gBS->SetTimer (Nic->TickTimer, TimerCancel, 0);
>gBS->CloseEvent (Nic->TickTimer);
> 
>//
>// Clean Supported Suites
>//
> diff --git a/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrFileUtil.c
> b/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrFileUtil.c
> index 6db1626f2d..0224823431 100644
> --- a/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrFileUtil.c
> +++ b/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrFileUtil.c
> @@ -251,10 +251,11 @@ UpdatePage(
>  }
>} else {
> 
>  if (Private->FileContext->FileName != NULL) {
>FreePool (Private->FileContext->FileName);
> +  Private->FileContext->FileName = NULL;
>  }
>  Private->FileContext->FileName = FileName;
> 
>  if (FormId == FORMID_ENROLL_CERT) {
>HiiSetString (Private->RegisteredHandle,
> diff --git
> a/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrHiiConfigAccess.c
> b/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrHiiConfigAccess.c
> index bfb6b6e5ca..d0d55f46da 100644
> --- a/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrHiiConfigAccess.c
> +++ b/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrHiiConfigAccess.c
> @@ -445,10 +445,12 @@ WifiMgrRefreshNetworkList (
>  UnicodeSPrint (PortString, PortStringSize, L"AKMSuite: %s
> CipherSuite: %s", AKMListDisplay, CipherListDisplay);
>  PortHelpToken = HiiSetString (Private->RegisteredHandle, 0,
> PortString, NULL);
>}
>FreePool (AKMListDisplay);
>FreePool (CipherListDisplay);
> +  AKMListDisplay= NULL;
> +  CipherListDisplay = NULL;
> 
>HiiCreateGotoOpCode (
>  StartOpCodeHandle,
>  FORMID_CONNECT_NETWORK,
>  PortPromptToken,
> @@ -530,10 +532,12 @@ WifiMgrRefreshNetworkList (
>goto Exit;
>  }
>}
>FreePool (AKMListDisplay);
>FreePool (CipherListDisplay);
> +  AKMListDisplay= NULL;
> +  CipherListDisplay = NULL;
> 
>HiiCreateGotoOpCode (
>  StartOpCodeHandle,
>  FORMID_CONNECT_NETWORK,
>  PortPromptToken,
> @@ -610,10 +614,12 @@ WifiMgrRefreshNetworkList (
>AKMListDisplay, CipherListDisplay
>);
>}
>FreePool (AKMListDisplay);
>FreePool (CipherListDisplay);
> +  AKMListDisplay= NULL;
> +  CipherListDisplay = NULL;
> 
>PortHelpToken = HiiSetString (Private->RegisteredHandle, 0, PortString,
> NULL);
> 
>HiiCreateGotoOpCode (
>  StartOpCodeHandle,
> @@ -1655,10 +1661,11 @@ WifiMgrDxeHiiConfigAccessCallback (
>  Profile = Private->CurrentNic->UserSelectedProfile;
>  if (Profile->PrivateKeyData != NULL) {
> 
>ZeroMem (Profile->PrivateKeyData, Profile->PrivateKeyDataSize);
>FreePool (Profile->PrivateKeyData);
> +  Profile->Private

Re: [edk2] [PATCH v1] NetworkPkg/DnsDxe: Check the received packet size before parsing the message.

2019-02-26 Thread Fu, Siyuan
Reviewed-by: Siyuan Fu 

> -Original Message-
> From: Wu, Jiaxin
> Sent: Tuesday, February 26, 2019 4:14 PM
> To: edk2-devel@lists.01.org
> Cc: Ye, Ting ; Fu, Siyuan ; Wang, Fan
> ; Wu, Jiaxin 
> Subject: [PATCH v1] NetworkPkg/DnsDxe: Check the received packet size before
> parsing the message.
> 
> Fix CVE-2018-12178
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=809
> 
> The DNS driver only checks the received packet size against the
> minimum DNS header size in DnsOnPacketReceived(), later it accesses
> the QueryName and QuerySection beyond the header scope, which might
> cause the pointer within DNS driver points to an invalid entry or
> modifies the memory content beyond the header scope.
> 
> This patch is to fix above problem.
> 
> Cc: Ye Ting 
> Cc: Fu Siyuan 
> Cc: Wang Fan 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Wu Jiaxin 
> ---
>  NetworkPkg/DnsDxe/DnsImpl.c | 77 -
>  NetworkPkg/DnsDxe/DnsImpl.h |  2 +
>  2 files changed, 69 insertions(+), 10 deletions(-)
> 
> diff --git a/NetworkPkg/DnsDxe/DnsImpl.c b/NetworkPkg/DnsDxe/DnsImpl.c
> index 89ea755cb2..26a718987c 100644
> --- a/NetworkPkg/DnsDxe/DnsImpl.c
> +++ b/NetworkPkg/DnsDxe/DnsImpl.c
> @@ -1112,26 +1112,29 @@ IsValidDnsResponse (
>  /**
>Parse Dns Response.
> 
>@param  Instance  The DNS instance
>@param  RxString  Received buffer.
> +  @param  LengthReceived buffer length.
>@param  Completed Flag to indicate that Dns response is valid.
> 
>@retval EFI_SUCCESS   Parse Dns Response successfully.
>@retval OthersFailed to parse Dns Response.
> 
>  **/
>  EFI_STATUS
>  ParseDnsResponse (
>IN OUT DNS_INSTANCE  *Instance,
>IN UINT8 *RxString,
> +  IN UINT32Length,
>   OUT BOOLEAN   *Completed
>)
>  {
>DNS_HEADER*DnsHeader;
> 
>CHAR8 *QueryName;
> +  UINT32QueryNameLen;
>DNS_QUERY_SECTION *QuerySection;
> 
>CHAR8 *AnswerName;
>DNS_ANSWER_SECTION*AnswerSection;
>UINT8 *AnswerData;
> @@ -1153,10 +1156,11 @@ ParseDnsResponse (
> 
>DNS_RESOURCE_RECORD   *Dns4RR;
>DNS6_RESOURCE_RECORD  *Dns6RR;
> 
>EFI_STATUSStatus;
> +  UINT32RemainingLength;
> 
>EFI_TPL   OldTpl;
> 
>Item = NULL;
>Dns4TokenEntry   = NULL;
> @@ -1176,10 +1180,21 @@ ParseDnsResponse (
>Dns4RR   = NULL;
>Dns6RR   = NULL;
> 
>*Completed   = TRUE;
>Status   = EFI_SUCCESS;
> +  RemainingLength  = Length;
> +
> +  //
> +  // Check whether the remaining packet length is avaiable or not.
> +  //
> +  if (RemainingLength <= sizeof (DNS_HEADER)) {
> +*Completed = FALSE;
> +return EFI_ABORTED;
> +  } else {
> +RemainingLength -= sizeof (DNS_HEADER);
> +  }
> 
>//
>// Get header
>//
>DnsHeader = (DNS_HEADER *) RxString;
> @@ -1189,26 +1204,42 @@ ParseDnsResponse (
>DnsHeader->QuestionsNum = NTOHS (DnsHeader->QuestionsNum);
>DnsHeader->AnswersNum = NTOHS (DnsHeader->AnswersNum);
>DnsHeader->AuthorityNum = NTOHS (DnsHeader->AuthorityNum);
>DnsHeader->AditionalNum = NTOHS (DnsHeader->AditionalNum);
> 
> +  //
> +  // There is always one QuestionsNum in DNS message. The capability to
> handle more
> +  // than one requires to redesign the message format. Currently, it's not
> supported.
> +  //
> +  if (DnsHeader->QuestionsNum > 1) {
> +*Completed = FALSE;
> +return EFI_UNSUPPORTED;
> +  }
> +
>//
>// Get Query name
>//
>QueryName = (CHAR8 *) (RxString + sizeof (*DnsHeader));
> 
> +  QueryNameLen = (UINT32) AsciiStrLen (QueryName) + 1;
> +
>//
> -  // Get query section
> +  // Check whether the remaining packet length is avaiable or not.
>//
> -  QuerySection = (DNS_QUERY_SECTION *) (QueryName + AsciiStrLen (QueryName) +
> 1);
> -  QuerySection->Type = NTOHS (QuerySection->Type);
> -  QuerySection->Class = NTOHS (QuerySection->Class);
> +  if (RemainingLength <= QueryNameLen + sizeof (DNS_QUERY_SECTION)) {
> +*Completed = FALSE;
> +return EFI_ABORTED;
> +  } else {
> +RemainingLength -= (QueryNameLen + sizeof (DNS_QUERY_SECTION));
> +  }
> 
>//
> -  // Get Answer name
> +  // Get query section
>//
> -  AnswerName = (CHAR8 *)

Re: [edk2] [PATCH v3] NetworkPkg/Ip6Dxe: Clean the invalid IPv6 configuration during driver start.

2019-02-17 Thread Fu, Siyuan
Reviewed-by: Siyuan Fu 

> -Original Message-
> From: Wu, Jiaxin
> Sent: Monday, February 18, 2019 9:15 AM
> To: edk2-devel@lists.01.org
> Cc: Michael Turner ; Ye, Ting
> ; Fu, Siyuan ; Wu, Jiaxin
> 
> Subject: [PATCH v3] NetworkPkg/Ip6Dxe: Clean the invalid IPv6 configuration
> during driver start.
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1448
> 
> *v3: Change the if condition check to only clean the invalid configuration.
> 
> *v2: Add the warning debug message.
> 
> This patch is to clean the invalid data and continue to start IP6 driver.
> 
> 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 | 26 ++
>  1 file changed, 22 insertions(+), 4 deletions(-)
> 
> diff --git a/NetworkPkg/Ip6Dxe/Ip6Driver.c b/NetworkPkg/Ip6Dxe/Ip6Driver.c
> index 4c607125a6..7a96315ccf 100644
> --- a/NetworkPkg/Ip6Dxe/Ip6Driver.c
> +++ b/NetworkPkg/Ip6Dxe/Ip6Driver.c
> @@ -585,12 +585,21 @@ Ip6DriverBindingStart (
> Ip6Cfg,
> Ip6ConfigDataTypeManualAddress,
> DataItem->DataSize,
> DataItem->Data.Ptr
> );
> -if (EFI_ERROR(Status) && Status != EFI_NOT_READY) {
> -  goto UNINSTALL_PROTOCOL;
> +if (Status == EFI_INVALID_PARAMETER || Status == EFI_BAD_BUFFER_SIZE) {
> +  //
> +  // Clean the invalid ManualAddress configuration.
> +  //
> +  Status = 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.
> @@ -601,12 +610,21 @@ Ip6DriverBindingStart (
> Ip6Cfg,
> Ip6ConfigDataTypeGateway,
> DataItem->DataSize,
> DataItem->Data.Ptr
> );
> -if (EFI_ERROR(Status)) {
> -  goto UNINSTALL_PROTOCOL;
> +if (Status == EFI_INVALID_PARAMETER || Status == EFI_BAD_BUFFER_SIZE) {
> +  //
> +  // Clean the invalid Gateway configuration.
> +  //
> +  Status = 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

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v2] NetworkPkg/Ip6Dxe: Clean the invalid IPv6 configuration during driver start.

2019-02-11 Thread Fu, Siyuan
Hi, Jiaxin

I think the Ip6Cfg->SetData() may return other error, which not only because 
invalid config data is used. Why not just check the config data in 
Ip6ConfigReadConfigData()?

BestRegards
Fu Siyuan


> -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=1448
> 
> *v2: Add the warning debug message.
> 
> This patch is to clean the invalid data and continue to start IP6 driver.
> 
> 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 != EFI_NOT_READY) {
> -  goto UNINSTALL_PROTOCOL;
> +  //
> +  // Clean the invalid ManualAddress configuration.
> +  //
> +  Status = 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 = 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

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v1] NetworkPkg/Ip6Dxe: Clean the invalid IPv6 configuration during driver start.

2019-02-11 Thread Fu, Siyuan
Yes, Jiaxin. You should not use popup messages unless you 100 percent sure the 
code is running in setup browser.

BestRegards
Fu Siyuan


> -Original Message-
> From: Mike Turner [mailto:michael.tur...@microsoft.com]
> Sent: Monday, February 11, 2019 11:10 PM
> To: Wu, Jiaxin ; Ye, Ting ; edk2-
> de...@lists.01.org
> Cc: Fu, Siyuan 
> Subject: RE: [PATCH v1] NetworkPkg/Ip6Dxe: Clean the invalid IPv6
> configuration during driver start.
> 
> I haven't seen any patch for a popup, but message popups during driver binding
> start are not a good thing.
> 
> Michael R Turner
> Surface UEFI Development
> Microsoft Corporation
> One Redmond Way
> Redmond WA 98052
> 
> 425-705-0928
> 
> This email message may contain confidential and privileged information.  Any
> unauthorized use is prohibited.  If you are not the intended recipient, please
> contact the sender by reply email and destroy all copies of the original
> message.
> 
> 
> -Original Message-
> From: Wu, Jiaxin 
> Sent: Sunday, February 10, 2019 7:10 PM
> To: Ye, Ting ; edk2-devel@lists.01.org
> Cc: Mike Turner ; Fu, Siyuan
> 
> Subject: RE: [PATCH v1] NetworkPkg/Ip6Dxe: Clean the invalid IPv6
> configuration during driver start.
> 
> Agree, thanks the comment. I will update the patch.
> 
> 
> 
> > -Original Message-
> > From: Ye, Ting
> > Sent: Monday, February 11, 2019 11:09 AM
> > To: Wu, Jiaxin ; edk2-devel@lists.01.org
> > Cc: Michael Turner ; Fu, Siyuan
> > 
> > Subject: RE: [PATCH v1] NetworkPkg/Ip6Dxe: Clean the invalid IPv6
> > configuration during driver start.
> >
> > Hi Jiaxin,
> >
> > I agree we need start IPv6 stack no matter the configuration is valid or 
> > not.
> > However I would suggest to add more comments and pop up warning
> > messages to let user know we continue to start IPv6 stack without
> > using previously saved configuration.
> >
> > Thanks,
> > Ting
> >
> > -Original Message-
> > From: Wu, Jiaxin
> > Sent: Sunday, February 3, 2019 2:24 PM
> > To: edk2-devel@lists.01.org
> > Cc: Michael Turner ; Ye, Ting
> > ; Fu, Siyuan ; Wu, Jiaxin
> > 
> > Subject: [PATCH v1] NetworkPkg/Ip6Dxe: Clean the invalid IPv6
> > configuration during driver start.
> >
> > REF:
> > https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugz
> > illa.tianocore.org%2Fshow_bug.cgi%3Fid%3D1448&data=02%7C01%7CMicha
> > el.Turner%40microsoft.com%7C93fb5d7f003b48c6561d08d68fce66f4%7C72f988b
> > f86f141af91ab2d7cd011db47%7C1%7C0%7C636854514000398927&sdata=bCAbT
> > njjX9bmuRiASoCkPiZtdqUY14BDMgyLd%2BYNNx4%3D&reserved=0
> >
> > This patch is to clean the invalid data and continue to start IP6 driver.
> >
> > Cc: Michael Turner 
> > Cc: Ye Ting 
> > Cc: Fu Siyuan 
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Wu Jiaxin 
> > Signed-off-by: Michael Turner 
> > ---
> >  NetworkPkg/Ip6Dxe/Ip6Driver.c | 20 ++--
> >  1 file changed, 18 insertions(+), 2 deletions(-)
> >
> > diff --git a/NetworkPkg/Ip6Dxe/Ip6Driver.c
> > b/NetworkPkg/Ip6Dxe/Ip6Driver.c index 4c607125a6..1bd1c61da8 100644
> > --- a/NetworkPkg/Ip6Dxe/Ip6Driver.c
> > +++ b/NetworkPkg/Ip6Dxe/Ip6Driver.c
> > @@ -586,11 +586,19 @@ Ip6DriverBindingStart (
> > Ip6ConfigDataTypeManualAddress,
> > DataItem->DataSize,
> > DataItem->Data.Ptr
> > );
> >  if (EFI_ERROR(Status) && Status != EFI_NOT_READY) {
> > -  goto UNINSTALL_PROTOCOL;
> > +  //
> > +  // Clean the invalid ManualAddress configuration.
> > +  //
> > +  Status = Ip6Cfg->SetData (
> > + Ip6Cfg,
> > + Ip6ConfigDataTypeManualAddress,
> > + 0,
> > + NULL
> > + );
> >  }
> >}
> >
> >//
> >// If there is any default gateway address, set it.
> > @@ -602,11 +610,19 @@ Ip6DriverBindingStart (
> > Ip6ConfigDataTypeGateway,
> > DataItem->DataSize,
> > DataItem->Data.Ptr
> > );
> >  if (EFI_ERROR(Status)) {
> > -  goto UNINSTALL_PROTOCOL;
> > +  //
> > +  // Clean the invalid Gateway configuration.
> > +  //
> > +  Status = Ip6Cfg->SetData (
> > + Ip6Cfg,
> > + Ip6ConfigDataTypeGateway,
> > + 0,
> > + NULL
> > + );
> >  }
> >}
> >
> >//
> >// ready to go: start the receiving and timer
> > --
> > 2.17.1.windows.2

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] Network Stack Budgeting

2019-01-29 Thread Fu, Siyuan
Hi, Tomas

> -Original Message-
> From: Tomas Pilar (tpilar) [mailto:tpi...@solarflare.com]
> Sent: Tuesday, January 29, 2019 6:54 PM
> To: Fu, Siyuan ; Wu, Jiaxin ; Laszlo
> Ersek ; edk2-devel@lists.01.org
> Cc: Ye, Ting 
> Subject: Re: [edk2] Network Stack Budgeting
> 
> 
> 
> On 29/01/2019 03:20, Fu, Siyuan wrote:
> > Hi, Tomas
> >
> >> -Original Message-
> >> From: Tomas Pilar (tpilar) [mailto:tpi...@solarflare.com]
> >> Sent: Monday, January 28, 2019 7:24 PM
> >> To: Fu, Siyuan ; Wu, Jiaxin ;
> Laszlo
> >> Ersek ; edk2-devel@lists.01.org
> >> Cc: Ye, Ting 
> >> Subject: Re: [edk2] Network Stack Budgeting
> >>
> >> Hi Siyuan,
> >>
> >> I had to do some tweaks due to the fact that people in the wild want to PXE
> >> boot whole WDS installations which are upwards of 300MB.
> >>
> >> I have an internal set of queues where the NIC receives into. Snp.Receive()
> >> will get a packet from this store. I had to implement a separate queue for
> >> unicast/multicast/broadcast traffic so that I could reprioritise and
> deliver
> >> unicast traffic while under ARP spam. I tied internal poll to receive and
> >> transmit, so Snp.Receive() will poll the NIC and then dequeue a packet
> while
> >> Snp.Transmit() will transmit the packet and then poll the NIC to get a
> >> completion. I also implemented a busy poll for 100us or until the next
> packet
> >> comes in when the NIC is polled.
> > I see some problems here. Both Snp.Receive() and Snp.Transmit() should be
> non-blocking
> > interface in current design and UEFI spec, but it's not true in your driver.
> > For Receive(), it could poll the NIC only once and return either a received
> packet
> > or an error, it should not do any blocking poll to wait for a packet.
> On some platforms (tftp clients), if the Snp.Receive() returns EFI_NOT_READY
> they do not poll the NIC until the next MnpSystemPoll(). Hence the delay
> before returning EFI_NOT_READY in case the packet is still incoming.

OK, that's really not good practice.

> > For Transmit(), it just need to put the packet into the TX queue and return
> directly,
> > without checking if the TX is completed.
> > Instead of that, Snp.GetStatus() should be
> > used to check if the packet has really been sent out.
> I've seen quite a few platforms where GetStatus was only called by the
> MnpSystemPoll() and the application would not call it. This means our hardware
> rings are stuffed with completions and we stop being able to transmit. Yes,
> you could say that we should solve the application, but unfortunately I can't
> do that.

The application doesn't need to call Snp.GetStatus() to recycle the TX buffer, 
the
Mnp.Transmit() will do this automatically when it found the SNP's TX buffer is 
full.
See MnpSyncSendPacket() and MnpRecycleTxBuf(). 

> >
> > May I know how did you control the 100us timeout of the busy poll (by which
> API?),
> > and what's the TPL of this busy poll?
> >
> Create a timeout timer with value of 1000. Then busy poll in a loop until
> packet is received or a timer is triggered.
> This runs at TPL_CALLBACK while the EfxPoll function itself runs at 
> TPL_NOTIFY.
> 
> --
>   /* Set the poll moderation timeout to 100us */
>   gBS->SetTimer(NetDev->PollModeratorTimer, TimerRelative, 1000);
> 
>   while (!InterruptStatus) {
>     EfxPoll(NULL, NetDev->Efx);
>     InterruptStatus = EfxStatus(NetDev->Efx);
> 
>     if (gBS->CheckEvent(NetDev->PollModeratorTimer))
>   return InterruptStatus;
>   }
> 
>   return InterruptStatus;
> --

This is exactly the case what I worried about. Some platform has a minimum timer
interval (like 1ms or 10ms), so if you set a timer interval shorter than that,
it will actually be signaled after the minimum value. Please check if your
platform could support a such a short timeout (100us).

> 
> >> Otherwise I have seen a pathological case where the TFTP client would pull
> one
> >> packet per second but the TFTP_RETRANSMIT interval on the server was also
> one
> >> second and everything was awful.
> > Why TFTP client just pull one packet per second? I think it’s not correct
> and it
> > could use the poll() function to accelerate the receive. Why you trying to
> solve a
> > TFTP layer problem in SNP layer? It breaks the design principle of network
> layer model.
> Yes, I appreciate the principle. However, in practice we don't get to sell
> adapters that do not PXE boot and it's pointless to argue with customers tha

Re: [edk2] Network Stack Budgeting

2019-01-28 Thread Fu, Siyuan
Hi, Tomas

> -Original Message-
> From: Tomas Pilar (tpilar) [mailto:tpi...@solarflare.com]
> Sent: Monday, January 28, 2019 7:24 PM
> To: Fu, Siyuan ; Wu, Jiaxin ; Laszlo
> Ersek ; edk2-devel@lists.01.org
> Cc: Ye, Ting 
> Subject: Re: [edk2] Network Stack Budgeting
> 
> Hi Siyuan,
> 
> I had to do some tweaks due to the fact that people in the wild want to PXE
> boot whole WDS installations which are upwards of 300MB.
> 
> I have an internal set of queues where the NIC receives into. Snp.Receive()
> will get a packet from this store. I had to implement a separate queue for
> unicast/multicast/broadcast traffic so that I could reprioritise and deliver
> unicast traffic while under ARP spam. I tied internal poll to receive and
> transmit, so Snp.Receive() will poll the NIC and then dequeue a packet while
> Snp.Transmit() will transmit the packet and then poll the NIC to get a
> completion. I also implemented a busy poll for 100us or until the next packet
> comes in when the NIC is polled.

I see some problems here. Both Snp.Receive() and Snp.Transmit() should be 
non-blocking
interface in current design and UEFI spec, but it's not true in your driver.
For Receive(), it could poll the NIC only once and return either a received 
packet
or an error, it should not do any blocking poll to wait for a packet.
For Transmit(), it just need to put the packet into the TX queue and return 
directly,
without checking if the TX is completed. Instead of that, Snp.GetStatus() 
should be
used to check if the packet has really been sent out.

May I know how did you control the 100us timeout of the busy poll (by which 
API?),
and what's the TPL of this busy poll?

> 
> Otherwise I have seen a pathological case where the TFTP client would pull one
> packet per second but the TFTP_RETRANSMIT interval on the server was also one
> second and everything was awful.

Why TFTP client just pull one packet per second? I think it’s not correct and it
could use the poll() function to accelerate the receive. Why you trying to 
solve a
TFTP layer problem in SNP layer? It breaks the design principle of network 
layer model.
> 
> In theory the busy poll moderator might cause an issue in a pathological case,
> if it stalls the machine for 100us for each packet - with 100 packets per
> second this would eat only 10ms.

Not only 10ms, it's at least 10ms, and in theory. If you have multiple NICs in 
the
system, this time will double. If someone tries to poll the NIC, the time will 
increase
significantly. It also depends on who you measure the 100us timeout, I did see 
some
platform which has a minimum timer interval limitation, that you thought you 
are using
a 100us timeout but it’s actually 1ms or even 10ms.

So my suggestion is do NOT add any busy wait in SNP layer API, keep it as 
unblocking,
and the try to solve the application layer problem in application layer.

Best Regards,
Siyuan

> 
> Cheers,
> Tom
> 
> On 27/01/2019 14:28, Fu, Siyuan wrote:
> > Hi, Tom
> >
> >> -Original Message-
> >> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Tomas
> >> Pilar (tpilar)
> >> Sent: Friday, January 25, 2019 8:09 PM
> >> To: Wu, Jiaxin ; Laszlo Ersek ;
> edk2-
> >> de...@lists.01.org
> >> Cc: Ye, Ting 
> >> Subject: Re: [edk2] Network Stack Budgeting
> >>
> >> Yeah, that makes sense I suppose. The end result is however that the
> network
> >> device is 'opened' as soon as ConnectController() is called rather than
> when
> >> someone wants to do networking. This seems wrong and directly leads to a
> DoS
> >> of a platform in case of heavy network load (unless we implement budgeting
> in
> >> the network driver, which is a really not what it should be doing).
> > It's true that a configured MNP will start a background system poll to
> receive
> > network packets, but normally it won't lead to a DoS, because the receive
> frequency
> > is actually very low. The MNP driver only tries to receive 1 packet from SNP
> for every
> > 10 milliseconds (see MNP_SYS_POLL_INTERVAL, MnpSystemPoll() and related
> timer event).
> > So no matter how heavy the network is, MNP driver (and upper layer stack)
> will
> > only process at most 100 packets per second, all other packets should be
> dropped
> > by UNDI driver directly.
> >
> > So if there is nobody doing busy network receiving, the network stack cost
> will be
> > at most 100 packets per NIC device and per second.
> >
> > In your first email you mentioned "some performance improvements to my
> network driver",
> > may I know what's the improvement method you are

Re: [edk2] Network Stack Budgeting

2019-01-27 Thread Fu, Siyuan
Hi, Tom

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Tomas
> Pilar (tpilar)
> Sent: Friday, January 25, 2019 8:09 PM
> To: Wu, Jiaxin ; Laszlo Ersek ; edk2-
> de...@lists.01.org
> Cc: Ye, Ting 
> Subject: Re: [edk2] Network Stack Budgeting
> 
> Yeah, that makes sense I suppose. The end result is however that the network
> device is 'opened' as soon as ConnectController() is called rather than when
> someone wants to do networking. This seems wrong and directly leads to a DoS
> of a platform in case of heavy network load (unless we implement budgeting in
> the network driver, which is a really not what it should be doing).

It's true that a configured MNP will start a background system poll to receive
network packets, but normally it won't lead to a DoS, because the receive 
frequency 
is actually very low. The MNP driver only tries to receive 1 packet from SNP 
for every
10 milliseconds (see MNP_SYS_POLL_INTERVAL, MnpSystemPoll() and related timer 
event).
So no matter how heavy the network is, MNP driver (and upper layer stack) will
only process at most 100 packets per second, all other packets should be dropped
by UNDI driver directly.

So if there is nobody doing busy network receiving, the network stack cost will 
be
at most 100 packets per NIC device and per second.

In your first email you mentioned "some performance improvements to my network 
driver",
may I know what's the improvement method you are using?

Best Regards,
Siyuan

> 
> How do you suggest we solve this problem?
> 
> Cheers,
> Tom
> 
> On 25/01/2019 08:44, Wu, Jiaxin wrote:
> > Hi Tom,
> >
> > One thing I want to highlight is that our design of network stack is not
> only for the PXE/HTTP boot trigged in BootManager, but also to make sure it's
> workable once there is any MNP instance configured by upper drivers
> (ARP/IPv4/IPv6).
> >
> > Take ARP/IP as an example, once ARP/IP are started, we need a heartbeat to
> process any ARP requests, which is required by ARP functionality. In such a
> case, SNP must be started to make ARP/IP drivers works well.
> >
> > Thanks,
> > Jiaxin
> >
> >> -Original Message-
> >> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> >> Tomas Pilar (tpilar)
> >> Sent: Friday, January 25, 2019 1:43 AM
> >> To: Laszlo Ersek ; edk2-devel@lists.01.org
> >> Subject: Re: [edk2] Network Stack Budgeting
> >>
> >>
> >>
> >> On 24/01/2019 16:49, Laszlo Ersek wrote:
> >>> On 01/24/19 14:25, Tomas Pilar (tpilar) wrote:
>  Hmm,
> 
>  Mnp->Configure() will eventually call MnpStartSnp().
> 
>  A grep for Mnp->Configure shows that:
>  * ArpDxe performs this on DriverBinding.Start()
>  * Ip6Dxe performs this on DriverBinding.Start()
> 
>  Ipv4 and DnsDhcp do this as a part of their Configure() they expose in
> the
> >> API.
> >>> Yes, that makes sense. All of the above drivers are UEFI drivers that
> >>> follow the UEFI driver model, AIUI. As long as the controller is not
> >>> connected from BDS, no BindingStart() function should be called in these.
> >> Ah, but I would expect the BDS to call ConnectController() on the NIC, but
> I
> >> would not expect the network stack to be started unless the device is
> >> actually chosen for PXE booting. In other words, the above protocols should
> >> follow the example of EFI_DNS4_PROTOCOL that binds against the device
> >> during BDS but .Configure() is not automatically called by
> >> DriverBinding.Start().
> >>
> >> .Configure() should be called by the BootManager if networking is actually
> to
> >> be done. That in turn will configure Mnp and start Snp.
> >>
> >> Cheers,
> >> Tom
> >>
> >> ___
> >> edk2-devel mailing list
> >> edk2-devel@lists.01.org
> >> https://lists.01.org/mailman/listinfo/edk2-devel
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v2 1/3] MdeModulePkg/Dhcp4Dxe: Remove unnecessary NULL pointer check.

2019-01-17 Thread Fu, Siyuan
Hi, Jiaxin

Yes the full patch series is needed for a v2 version.

And also, why you removed the "(Instance->Token != NULL)" check in the if 
condition?

BestRegards
Fu Siyuan


> -Original Message-
> From: Wu, Hao A
> Sent: Friday, January 18, 2019 1:22 PM
> To: Wu, Jiaxin ; edk2-devel@lists.01.org
> Cc: Ye, Ting ; Fu, Siyuan ; Gao,
> Liming 
> Subject: RE: [PATCH v2 1/3] MdeModulePkg/Dhcp4Dxe: Remove unnecessary NULL
> pointer check.
> 
> Hi Jiaxin,
> 
> A comment that is not related with the content of the patch itself:
> Please help to send the full patch series when a new version is needed.
> 
> Best Regards,
> Hao Wu
> 
> > -Original Message-
> > From: Wu, Jiaxin
> > Sent: Friday, January 18, 2019 1:16 PM
> > To: edk2-devel@lists.01.org
> > Cc: Ye, Ting; Fu, Siyuan; Wu, Hao A; Gao, Liming; Wu, Jiaxin
> > Subject: [PATCH v2 1/3] MdeModulePkg/Dhcp4Dxe: Remove unnecessary
> > NULL pointer check.
> >
> > v2: The DHCP Instance might be destroyed in PxeDhcpDone. So,
> > we need safe-delete.
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1469
> >
> > Since the value of Instance is retrieved from the list Entry,
> > it can't be the NULL pointer, so just remove the unnecessary
> > check.
> >
> > Cc: Ye Ting 
> > Cc: Fu Siyuan 
> > Cc: Wu Hao A 
> > Cc: Gao Liming 
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Wu Jiaxin 
> > ---
> >  MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c | 11 ---
> >  1 file changed, 4 insertions(+), 7 deletions(-)
> >
> > diff --git a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c
> > b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c
> > index 98a22a77b4..780f8b4224 100644
> > --- a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c
> > +++ b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c
> > @@ -1,9 +1,9 @@
> >  /** @file
> >EFI DHCP protocol implementation.
> >
> > -Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
> > +Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
> >  This program and the accompanying materials
> >  are licensed and made available under the terms and conditions of the BSD
> > License
> >  which accompanies this distribution.  The full text of the license may be
> > found at
> >  http://opensource.org/licenses/bsd-license.php
> >
> > @@ -1646,16 +1646,13 @@ ON_EXIT:
> >//
> >// Iterate through all the DhcpSb Children.
> >//
> >NET_LIST_FOR_EACH_SAFE (Entry, Next, &DhcpSb->Children) {
> >  Instance = NET_LIST_USER_STRUCT (Entry, DHCP_PROTOCOL, Link);
> > -
> > -if ((Instance != NULL) && (Instance->Token != NULL)) {
> > -  Instance->Timeout--;
> > -  if (Instance->Timeout == 0) {
> > -PxeDhcpDone (Instance);
> > -  }
> > +Instance->Timeout--;
> > +if (Instance->Timeout == 0) {
> > +  PxeDhcpDone (Instance);
> >  }
> >}
> >
> >return ;
> >
> > --
> > 2.17.1.windows.2

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v1 1/3] MdeModulePkg/Dhcp4Dxe: Remove unnecessary NULL pointer check.

2019-01-17 Thread Fu, Siyuan
Hi, Jiaxin

> -Original Message-
> From: Wu, Jiaxin
> Sent: Thursday, January 17, 2019 9:01 AM
> To: edk2-devel@lists.01.org
> Cc: Ye, Ting ; Fu, Siyuan ; Wu, Hao A
> ; Gao, Liming ; Wu, Jiaxin
> 
> Subject: [PATCH v1 1/3] MdeModulePkg/Dhcp4Dxe: Remove unnecessary NULL pointer
> check.
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1469
> 
> Since the value of Instance is retrieved from the list Entry,
> it can't be the NULL pointer, so just remove the unnecessary
> check.
> 
> Cc: Ye Ting 
> Cc: Fu Siyuan 
> Cc: Wu Hao A 
> Cc: Gao Liming 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Wu Jiaxin 
> ---
>  MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c | 15 ++-
>  1 file changed, 6 insertions(+), 9 deletions(-)
> 
> diff --git a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c
> b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c
> index 98a22a77b4..04d47e0759 100644
> --- a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c
> +++ b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c
> @@ -1,9 +1,9 @@
>  /** @file
>EFI DHCP protocol implementation.
> 
> -Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
> +Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
>  This program and the accompanying materials
>  are licensed and made available under the terms and conditions of the BSD
> License
>  which accompanies this distribution.  The full text of the license may be
> found at
>  http://opensource.org/licenses/bsd-license.php
> 
> @@ -1493,15 +1493,15 @@ DhcpOnTimerTick (
>IN EFI_EVENT  Event,
>IN VOID   *Context
>)
>  {
>LIST_ENTRY*Entry;
> -  LIST_ENTRY*Next;
>DHCP_SERVICE  *DhcpSb;
>DHCP_PROTOCOL *Instance;
>EFI_STATUSStatus;
> 
> +  Entry= NULL;
>DhcpSb   = (DHCP_SERVICE *) Context;
>Instance = DhcpSb->ActiveChild;
> 
>//
>// 0x is the maximum supported value for elapsed time according to RFC.
> @@ -1644,18 +1644,15 @@ DhcpOnTimerTick (
> 
>  ON_EXIT:
>//
>// Iterate through all the DhcpSb Children.
>//
> -  NET_LIST_FOR_EACH_SAFE (Entry, Next, &DhcpSb->Children) {
> +  NET_LIST_FOR_EACH (Entry, &DhcpSb->Children) {

The DHCP Instance might be destroyed in PxeDhcpDone (it singals upper layer 
that the DHCP is completed), and the NET_LIST_FOR_EACH is not delete-safe, you 
should not replace it with NET_LIST_FOR_EACH.

>  Instance = NET_LIST_USER_STRUCT (Entry, DHCP_PROTOCOL, Link);
> -
> -if ((Instance != NULL) && (Instance->Token != NULL)) {
> -  Instance->Timeout--;
> -  if (Instance->Timeout == 0) {
> -PxeDhcpDone (Instance);
> -  }
> +Instance->Timeout--;
> +if (Instance->Timeout == 0) {
> +  PxeDhcpDone (Instance);
>  }
>}
> 
>return ;
> 
> --
> 2.17.1.windows.2

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v1 2/2] NetworkPkg/Dhcp6Dxe: Remove an unused global variable.

2019-01-14 Thread Fu, Siyuan
Reviewed-by: Siyuan Fu 



> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Songpeng Li
> Sent: Monday, January 14, 2019 5:25 PM
> To: edk2-devel@lists.01.org
> Cc: Fu, Siyuan ; Wu, Jiaxin 
> Subject: [edk2] [PATCH v1 2/2] NetworkPkg/Dhcp6Dxe: Remove an unused global
> variable.
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1413
> 
> The global variable mAllDhcpServersAddress has never
> been used, this patch is to clean it.
> 
> Cc: Jiaxin Wu 
> Cc: Siyuan Fu 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Songpeng Li 
> ---
>  NetworkPkg/Dhcp6Dxe/Dhcp6Impl.c | 2 --
>  NetworkPkg/Dhcp6Dxe/Dhcp6Impl.h | 1 -
>  2 files changed, 3 deletions(-)
> 
> diff --git a/NetworkPkg/Dhcp6Dxe/Dhcp6Impl.c b/NetworkPkg/Dhcp6Dxe/Dhcp6Impl.c
> index 9ace833b98f7..6506453c0dad 100644
> --- a/NetworkPkg/Dhcp6Dxe/Dhcp6Impl.c
> +++ b/NetworkPkg/Dhcp6Dxe/Dhcp6Impl.c
> @@ -19,10 +19,8 @@
>  // Well-known multi-cast address defined in section-24.1 of rfc-3315
>  //
>  //   ALL_DHCP_Relay_Agents_and_Servers address: FF02::1:2
> -//   ALL_DHCP_Servers address:  FF05::1:3
>  //
>  EFI_IPv6_ADDRESS   mAllDhcpRelayAndServersAddress = {{0xFF, 2, 0, 0, 0, 0, 0,
> 0, 0, 0, 0, 0, 0, 1, 0, 2}};
> -EFI_IPv6_ADDRESS   mAllDhcpServersAddress = {{0xFF, 5, 0, 0, 0, 0, 0,
> 0, 0, 0, 0, 0, 0, 1, 0, 3}};
> 
>  EFI_DHCP6_PROTOCOL gDhcp6ProtocolTemplate = {
>EfiDhcp6GetModeData,
> diff --git a/NetworkPkg/Dhcp6Dxe/Dhcp6Impl.h b/NetworkPkg/Dhcp6Dxe/Dhcp6Impl.h
> index f21b79668a8b..e91f4da41451 100644
> --- a/NetworkPkg/Dhcp6Dxe/Dhcp6Impl.h
> +++ b/NetworkPkg/Dhcp6Dxe/Dhcp6Impl.h
> @@ -68,7 +68,6 @@ typedef struct _DHCP6_INSTANCE DHCP6_INSTANCE;
>  #define DHCP6_SERVICE_FROM_THIS(Service)   CR ((Service), DHCP6_SERVICE,
> ServiceBinding, DHCP6_SERVICE_SIGNATURE)
> 
>  extern EFI_IPv6_ADDRESS   mAllDhcpRelayAndServersAddress;
> -extern EFI_IPv6_ADDRESS   mAllDhcpServersAddress;
>  extern EFI_DHCP6_PROTOCOL gDhcp6ProtocolTemplate;
> 
>  //
> --
> 2.18.0.windows.1
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v1 1/2] NetworkPkg/IScsiDxe: Remove unused global variables.

2019-01-14 Thread Fu, Siyuan
Reviewed-by: Siyuan Fu 

> -Original Message-
> From: Li, Songpeng
> Sent: Monday, January 14, 2019 5:25 PM
> To: edk2-devel@lists.01.org
> Cc: Wu, Jiaxin ; Fu, Siyuan 
> Subject: [PATCH v1 1/2] NetworkPkg/IScsiDxe: Remove unused global variables.
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1413
> 
> Global variables mIScsiDeviceListUpdated and
> mNumberOfIScsiDevices have never been used, this patch
> is to clean them.
> 
> Cc: Jiaxin Wu 
> Cc: Siyuan Fu 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Songpeng Li 
> ---
>  NetworkPkg/IScsiDxe/IScsiConfig.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/NetworkPkg/IScsiDxe/IScsiConfig.c
> b/NetworkPkg/IScsiDxe/IScsiConfig.c
> index 893eca61d5b1..83644f51d8d5 100644
> --- a/NetworkPkg/IScsiDxe/IScsiConfig.c
> +++ b/NetworkPkg/IScsiDxe/IScsiConfig.c
> @@ -15,8 +15,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER
> EXPRESS OR IMPLIED.
>  #include "IScsiImpl.h"
> 
>  CHAR16  mVendorStorageName[] = L"ISCSI_CONFIG_IFR_NVDATA";
> -BOOLEAN mIScsiDeviceListUpdated  = FALSE;
> -UINTN   mNumberOfIScsiDevices= 0;
>  ISCSI_FORM_CALLBACK_INFO  *mCallbackInfo = NULL;
> 
>  HII_VENDOR_DEVICE_PATH  mIScsiHiiVendorDevicePath = {
> --
> 2.18.0.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v2 2/4] NetworkPkg/IScsiDxe: Use UEFILib APIs to uninstall protocols.

2019-01-06 Thread Fu, Siyuan
Hi, Ashish

The changes to NetworkPkg is good to me. Please add the package maintainer's 
name to the cc list of the patch mail in future, thanks.

Reviewed-by: Fu Siyuan 


> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Ashish
> Singhal
> Sent: Saturday, January 5, 2019 7:07 AM
> To: edk2-devel@lists.01.org
> Cc: Ashish Singhal 
> Subject: [edk2] [PATCH v2 2/4] NetworkPkg/IScsiDxe: Use UEFILib APIs to
> uninstall protocols.
> 
> During cleanup in case of initialization failure, some driver
> bindings are not installed. Using abstractions in UEFILib takes
> care of it.
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1428
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ashish Singhal 
> ---
>  NetworkPkg/IScsiDxe/IScsiDriver.c | 31 +++
>  1 file changed, 11 insertions(+), 20 deletions(-)
> 
> diff --git a/NetworkPkg/IScsiDxe/IScsiDriver.c
> b/NetworkPkg/IScsiDxe/IScsiDriver.c
> index 91176e6..8747de7 100644
> --- a/NetworkPkg/IScsiDxe/IScsiDriver.c
> +++ b/NetworkPkg/IScsiDxe/IScsiDriver.c
> @@ -1,6 +1,7 @@
>  /** @file
>The entry point of IScsi driver.
> 
> +Copyright (c) 2019, NVIDIA Corporation. All rights reserved.
>  Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
>  (C) Copyright 2017 Hewlett Packard Enterprise Development LP
> 
> @@ -1861,28 +1862,18 @@ Error3:
>   );
> 
>  Error2:
> -  gBS->UninstallMultipleProtocolInterfaces (
> - gIScsiIp6DriverBinding.DriverBindingHandle,
> - &gEfiDriverBindingProtocolGuid,
> - &gIScsiIp6DriverBinding,
> - &gEfiComponentName2ProtocolGuid,
> - &gIScsiComponentName2,
> - &gEfiComponentNameProtocolGuid,
> - &gIScsiComponentName,
> - NULL
> - );
> +  EfiLibUninstallDriverBindingComponentName2 (
> +&gIScsiIp6DriverBinding,
> +&gIScsiComponentName,
> +&gIScsiComponentName2
> +);
> 
>  Error1:
> -  gBS->UninstallMultipleProtocolInterfaces (
> - ImageHandle,
> - &gEfiDriverBindingProtocolGuid,
> - &gIScsiIp4DriverBinding,
> - &gEfiComponentName2ProtocolGuid,
> - &gIScsiComponentName2,
> - &gEfiComponentNameProtocolGuid,
> - &gIScsiComponentName,
> - NULL
> - );
> +  EfiLibUninstallDriverBindingComponentName2 (
> +&gIScsiIp4DriverBinding,
> +&gIScsiComponentName,
> +&gIScsiComponentName2
> +);
> 
>return Status;
>  }
> --
> 2.7.4
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v2 4/4] NetworkPkg/IScsiDxe: Update UEFILib Usage

2019-01-06 Thread Fu, Siyuan
Reviewed-by: Siyuan Fu 


> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Ashish
> Singhal
> Sent: Saturday, January 5, 2019 7:07 AM
> To: edk2-devel@lists.01.org
> Cc: Ashish Singhal 
> Subject: [edk2] [PATCH v2 4/4] NetworkPkg/IScsiDxe: Update UEFILib Usage
> 
> Update interfaces as exposed by UEFILib for protocol
> installation and uninstallation abstraction.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ashish Singhal 
> ---
>  NetworkPkg/IScsiDxe/IScsiDriver.c | 6 ++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/NetworkPkg/IScsiDxe/IScsiDriver.c
> b/NetworkPkg/IScsiDxe/IScsiDriver.c
> index 8747de7..fa0ea00 100644
> --- a/NetworkPkg/IScsiDxe/IScsiDriver.c
> +++ b/NetworkPkg/IScsiDxe/IScsiDriver.c
> @@ -1863,14 +1863,20 @@ Error3:
> 
>  Error2:
>EfiLibUninstallDriverBindingComponentName2 (
> +ImageHandle,
> +SystemTable,
>  &gIScsiIp6DriverBinding,
> +NULL,
>  &gIScsiComponentName,
>  &gIScsiComponentName2
>  );
> 
>  Error1:
>EfiLibUninstallDriverBindingComponentName2 (
> +ImageHandle,
> +SystemTable,
>  &gIScsiIp4DriverBinding,
> +NULL,
>  &gIScsiComponentName,
>  &gIScsiComponentName2
>  );
> --
> 2.7.4
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH 2/2] NetworkPkg: Remove some clarification from TCP/PXE/ISCSI driver INF.

2018-12-18 Thread Fu Siyuan
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1278

This patch is to remove the clarification about usage/difference between
those drivers in MdeModulePkg and NetworkPkg, since the MdeModulePkg ones
have been deleted now.

Cc: Jiaxin Wu 
Cc: Ye Ting 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Fu Siyuan 
---
 NetworkPkg/IScsiDxe/IScsiDxe.inf | 10 --
 NetworkPkg/TcpDxe/TcpDxe.inf |  6 --
 NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf |  6 --
 3 files changed, 22 deletions(-)

diff --git a/NetworkPkg/IScsiDxe/IScsiDxe.inf b/NetworkPkg/IScsiDxe/IScsiDxe.inf
index 195dc191250f..bdf1313aa957 100644
--- a/NetworkPkg/IScsiDxe/IScsiDxe.inf
+++ b/NetworkPkg/IScsiDxe/IScsiDxe.inf
@@ -4,16 +4,6 @@
 #  The iSCSI driver provides iSCSI service in the preboot environment and 
supports
 #  booting over iSCSI. This driver supports both IPv4 and IPv6 network stack.
 #
-#  Notes:
-#  1) This driver can't co-work with the IScsiDxe driver in MdeModulePkg.
-#  2) This driver includes more bug fixes and supports more features (e.g. 
IPv6, Dns
-# support for target URL configuration, iSCSI keyword support) than the 
IscsiDxe
-# driver in MdeModulePkg. So, we recommend using this driver even though 
both of
-# them can be used.
-#  3) This driver depends on OpenSSL. To use this driver, please follow the
-# instructions found in the file "OpenSSL-HOWTO.txt" located in
-# CryptoPkg\Library\OpensslLib to enable the OpenSSL building first.
-#
 # Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
 # This program and the accompanying materials
 # are licensed and made available under the terms and conditions of the BSD 
License
diff --git a/NetworkPkg/TcpDxe/TcpDxe.inf b/NetworkPkg/TcpDxe/TcpDxe.inf
index 9433fb875cba..c4e3de7ec5ce 100644
--- a/NetworkPkg/TcpDxe/TcpDxe.inf
+++ b/NetworkPkg/TcpDxe/TcpDxe.inf
@@ -5,12 +5,6 @@
 #  It might provide TCPv4 Protocol or TCPv6 Protocol or both of them that 
depends on which network
 #  stack has been loaded in system. This driver supports both IPv4 and IPv6 
network stack.
 #
-#  Notes:
-#  1) This driver can't co-work with the Tcp4Dxe driver in MdeModulePkg.
-#  2) This driver includes more bug fixes and supports more features (e.g. 
IPv6, TCP Cancel
-# function) than the Tcp4Dxe driver in MdeModulePkg. So, we recommend 
using this driver
-# even though both of them can be used.
-#
 #  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
 #
 #  This program and the accompanying materials
diff --git a/NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf 
b/NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
index 130a5456e2c1..63430711e71b 100644
--- a/NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
+++ b/NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
@@ -5,12 +5,6 @@
 #  PXE-compatible device for network access or booting. This driver supports
 #  both IPv4 and IPv6 network stack.
 #
-#  Notes:
-#  1) This driver can't co-work with the UefiPxeBcDxe driver in MdeModulePkg.
-#  2) This driver includes more bug fixes and supports more features (e.g. 
IPv6,
-# MTFTP windowsize) than the UefiPxeBcDxe driver in MdeModulePkg. So, we
-# recommend using this driver even though both of them can be used.
-#
 #  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
 #
 #  This program and the accompanying materials
-- 
2.19.1.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH 0/2] Delete TCP, PXE, iSCSI driver in MdeModulePkg

2018-12-18 Thread Fu Siyuan
This patch series is to delete the Tcp4Dxe, UefiPxeBcDxe and IScsi4Dxe
drivers in MdeModulePkg. These drivers will not be maintained and can't
co-work with the dual-stack drivers in NetworkPkg.

In future, people should use below NetworkPkg drivers instead:
  NetworkPkg/IScsiDxe/IScsiDxe.inf
  NetworkPkg/TcpDxe/TcpDxe.inf
  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
These drivers are actively maintained with more bug fixes and new feature
support.

All edk2 platforms DSC/FDF have already been updated to use the NetworkPkg
drivers in privious patch.

Bugzilla link: https://bugzilla.tianocore.org/show_bug.cgi?id=1278

Fu Siyuan (2):
  MdeModulePkg: Delete the TCP/PXE/ISCSI drivers in MdeModulePkg.
  NetworkPkg: Remove some clarification from TCP/PXE/ISCSI driver INF.

 .../Network/IScsiDxe/ComponentName.c  |  283 --
 .../Universal/Network/IScsiDxe/IScsiCHAP.c|  430 ---
 .../Universal/Network/IScsiDxe/IScsiConfig.c  | 1264 ---
 .../Universal/Network/IScsiDxe/IScsiDhcp.c|  472 ---
 .../Universal/Network/IScsiDxe/IScsiDriver.c  |  676 
 .../Network/IScsiDxe/IScsiExtScsiPassThru.c   |  412 ---
 .../Universal/Network/IScsiDxe/IScsiIbft.c|  539 ---
 .../Network/IScsiDxe/IScsiInitiatorName.c |  116 -
 .../Universal/Network/IScsiDxe/IScsiMisc.c|  948 --
 .../Universal/Network/IScsiDxe/IScsiProto.c   | 2799 ---
 .../Universal/Network/IScsiDxe/IScsiTcp4Io.c  |  487 ---
 MdeModulePkg/Universal/Network/IScsiDxe/Md5.c |  350 --
 .../Universal/Network/Tcp4Dxe/ComponentName.c |  433 ---
 .../Universal/Network/Tcp4Dxe/SockImpl.c  | 1201 ---
 .../Universal/Network/Tcp4Dxe/SockInterface.c |  990 --
 .../Network/Tcp4Dxe/Tcp4Dispatcher.c  |  717 
 .../Universal/Network/Tcp4Dxe/Tcp4Driver.c|  782 -
 .../Universal/Network/Tcp4Dxe/Tcp4Input.c | 1497 -
 .../Universal/Network/Tcp4Dxe/Tcp4Io.c|  112 -
 .../Universal/Network/Tcp4Dxe/Tcp4Main.c  |  674 
 .../Universal/Network/Tcp4Dxe/Tcp4Misc.c  |  940 --
 .../Universal/Network/Tcp4Dxe/Tcp4Option.c|  352 --
 .../Universal/Network/Tcp4Dxe/Tcp4Output.c| 1238 ---
 .../Universal/Network/Tcp4Dxe/Tcp4Timer.c |  584 
 .../Network/UefiPxeBcDxe/ComponentName.c  |  365 --
 .../Network/UefiPxeBcDxe/PxeBcDhcp.c  | 1999 ---
 .../Network/UefiPxeBcDxe/PxeBcDriver.c|  665 
 .../Network/UefiPxeBcDxe/PxeBcImpl.c  | 2989 -
 .../Network/UefiPxeBcDxe/PxeBcMtftp.c |  454 ---
 .../Network/UefiPxeBcDxe/PxeBcSupport.c   |  221 --
 MdeModulePkg/MdeModulePkg.dsc |3 -
 .../Network/IScsiDxe/ComponentName.h  |  165 -
 .../Universal/Network/IScsiDxe/IScsi4Dxe.uni  |   25 -
 .../Network/IScsiDxe/IScsi4DxeExtra.uni   |   20 -
 .../Universal/Network/IScsiDxe/IScsiCHAP.h|  106 -
 .../Universal/Network/IScsiDxe/IScsiCommon.h  |   22 -
 .../Universal/Network/IScsiDxe/IScsiConfig.h  |  166 -
 .../Network/IScsiDxe/IScsiConfigDxe.vfr   |  219 --
 .../IScsiDxe/IScsiConfigDxeStrings.uni|   62 -
 .../Network/IScsiDxe/IScsiConfigNVDataStruc.h |  109 -
 .../Universal/Network/IScsiDxe/IScsiDhcp.h|   55 -
 .../Universal/Network/IScsiDxe/IScsiDriver.h  |  140 -
 .../Universal/Network/IScsiDxe/IScsiDxe.inf   |  134 -
 .../Network/IScsiDxe/IScsiExtScsiPassThru.h   |   22 -
 .../Universal/Network/IScsiDxe/IScsiIbft.h|   38 -
 .../Universal/Network/IScsiDxe/IScsiImpl.h|  168 -
 .../Network/IScsiDxe/IScsiInitiatorName.h |   74 -
 .../Universal/Network/IScsiDxe/IScsiMisc.h|  317 --
 .../Universal/Network/IScsiDxe/IScsiProto.h   | 1005 --
 .../Universal/Network/IScsiDxe/IScsiTcp4Io.h  |  142 -
 MdeModulePkg/Universal/Network/IScsiDxe/Md5.h |   80 -
 .../Universal/Network/Tcp4Dxe/SockImpl.h  |  131 -
 .../Universal/Network/Tcp4Dxe/Socket.h|  954 --
 .../Universal/Network/Tcp4Dxe/Tcp4Driver.h|  342 --
 .../Universal/Network/Tcp4Dxe/Tcp4Dxe.inf |   94 -
 .../Universal/Network/Tcp4Dxe/Tcp4Dxe.uni |   23 -
 .../Network/Tcp4Dxe/Tcp4DxeExtra.uni  |   20 -
 .../Universal/Network/Tcp4Dxe/Tcp4Func.h  |  781 -
 .../Universal/Network/Tcp4Dxe/Tcp4Main.h  |  494 ---
 .../Universal/Network/Tcp4Dxe/Tcp4Option.h|  130 -
 .../Universal/Network/Tcp4Dxe/Tcp4Proto.h |  357 --
 .../Network/UefiPxeBcDxe/PxeBcDhcp.h  |  502 ---
 .../Network/UefiPxeBcDxe/PxeBcDriver.h|  102 -
 .../Network/UefiPxeBcDxe/PxeBcImpl.h  |  189 --
 .../Network/UefiPxeBcDxe/PxeBcMtftp.h |  137 -
 .../Network/UefiPxeBcDxe/PxeBcSupport.h   |  134 -
 .../Network/UefiPxeBcDxe/UefiPxe4BcDxe.uni|   25 -
 .../UefiPxeBcDxe/UefiPxe4BcDxeExtra.uni   |   20 -
 .../Network/UefiPxeBcDxe/UefiPxeBcDxe.inf |  102 -
 NetworkPkg/IScsiDxe/IScsiDxe.inf  |   10 -
 NetworkPkg/TcpDxe/TcpDxe.inf  |6 -
 NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf  |6 -
 72 files changed, 32620 deletions(-)
 d

Re: [edk2] [PATCH] Edk2Platforms: Replace MdeModulePkg PXE/iSCSI/TCP with NetworkPkg Drivers.

2018-12-17 Thread Fu, Siyuan
Hi, Jiewen and Kubacki

Do you have any comments for this patch?

BestRegards
Fu Siyuan


> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Fu
> Siyuan
> Sent: Friday, December 14, 2018 2:32 PM
> To: edk2-devel@lists.01.org
> Cc: Yao, Jiewen ; Kubacki, Michael A
> 
> Subject: [edk2] [PATCH] Edk2Platforms: Replace MdeModulePkg PXE/iSCSI/TCP with
> NetworkPkg Drivers.
> 
> The PXE/iSCSI/TCP drivers in MdeModulePkg are going to be deprecated. All
> platform DSC/FDF files should be updated to use the dual-stack drivers in
> NetworkPkg.
> 
> Cc: Michael A Kubacki 
> Cc: Jiewen Yao 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Fu Siyuan 
> ---
>  Platform/Intel/AdvancedFeaturePkg/Include/Dsc/CoreAdvancedDxeInclude.dsc  | 7
> ++-
>  Platform/Intel/AdvancedFeaturePkg/Include/Fdf/CoreAdvancedLateInclude.fdf | 7
> ++-
>  Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc   | 3
> +--
>  3 files changed, 5 insertions(+), 12 deletions(-)
> 
> diff --git
> a/Platform/Intel/AdvancedFeaturePkg/Include/Dsc/CoreAdvancedDxeInclude.dsc
> b/Platform/Intel/AdvancedFeaturePkg/Include/Dsc/CoreAdvancedDxeInclude.dsc
> index 4d70db6062..6764d46131 100644
> --- a/Platform/Intel/AdvancedFeaturePkg/Include/Dsc/CoreAdvancedDxeInclude.dsc
> +++ b/Platform/Intel/AdvancedFeaturePkg/Include/Dsc/CoreAdvancedDxeInclude.dsc
> @@ -1,7 +1,7 @@
>  ## @file
>  #  Platform description.
>  #
> -# Copyright (c) 2017, Intel Corporation. All rights reserved.
> +# Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.
>  #
>  # This program and the accompanying materials are licensed and made available
> under
>  # the terms and conditions of the BSD License which accompanies this
> distribution.
> @@ -26,10 +26,7 @@
>MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
>MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
>MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
> -  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
>MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
> -  MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
> -  #MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
> 
>NetworkPkg/Ip6Dxe/Ip6Dxe.inf
>NetworkPkg/TcpDxe/TcpDxe.inf
> @@ -42,7 +39,7 @@
>NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf
>NetworkPkg/HttpBootDxe/HttpBootDxe.inf
> 
> -  #NetworkPkg/IScsiDxe/IScsiDxe.inf
> +  NetworkPkg/IScsiDxe/IScsiDxe.inf
>NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
>  !endif
> 
> diff --git
> a/Platform/Intel/AdvancedFeaturePkg/Include/Fdf/CoreAdvancedLateInclude.fdf
> b/Platform/Intel/AdvancedFeaturePkg/Include/Fdf/CoreAdvancedLateInclude.fdf
> index 0be408d13b..64f1dd5872 100644
> ---
> a/Platform/Intel/AdvancedFeaturePkg/Include/Fdf/CoreAdvancedLateInclude.fdf
> +++
> b/Platform/Intel/AdvancedFeaturePkg/Include/Fdf/CoreAdvancedLateInclude.fdf
> @@ -1,7 +1,7 @@
>  ## @file
>  #  FDF file of Platform.
>  #
> -# Copyright (c) 2017, Intel Corporation. All rights reserved.
> +# Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.
>  #
>  # This program and the accompanying materials are licensed and made available
> under
>  # the terms and conditions of the BSD License which accompanies this
> distribution.
> @@ -27,9 +27,6 @@ INF  MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
>  INF  MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
>  INF  MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
>  INF  MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
> -#INF  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
> -INF  MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
> -#INF  MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
> 
>  INF  NetworkPkg/Ip6Dxe/Ip6Dxe.inf
>  INF  NetworkPkg/TcpDxe/TcpDxe.inf
> @@ -42,7 +39,7 @@ INF  NetworkPkg/HttpDxe/HttpDxe.inf
>  INF  NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf
>  INF  NetworkPkg/HttpBootDxe/HttpBootDxe.inf
> 
> -#INF  NetworkPkg/IScsiDxe/IScsiDxe.inf
> +INF  NetworkPkg/IScsiDxe/IScsiDxe.inf
>  INF  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
>  !endif
> 
> diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
> b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
> index 2174eaa609..dd0173a1af 100644
> --- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
> +++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
> @@ -1,7 +1,7 @@
>  ## @file
>  #  Platform description.
>  #
> -# Copyright (c) 2017, Intel Corporation. All rights reserved.
> +# Copyright (c) 2017 - 2018, Intel Corporation. All right

Re: [edk2] [PATCH] ArmVirtPkg/ArmVirt.dsc.inc: define TcpIoLib resolution unconditionally

2018-12-16 Thread Fu, Siyuan
Thanks Liming, I will try it.

BestRegards
Fu Siyuan

> -Original Message-
> From: Gao, Liming
> Sent: Monday, December 17, 2018 11:07 AM
> To: Fu, Siyuan ; Laszlo Ersek ; Ard
> Biesheuvel 
> Cc: edk2-devel@lists.01.org
> Subject: RE: [PATCH] ArmVirtPkg/ArmVirt.dsc.inc: define TcpIoLib resolution
> unconditionally
> 
> Siyuan:
>   I know the windows GCC pre built binary can be downloaded from
> https://sourceforge.net/projects/edk2developertoolsforwindows/files/Tool%20Cha
> in%20Binaries/. Although pre-built binary GCC is three years ago, they can
> still work. For example, after you download gcc492 arm, then you can set
> GCC49_ARM_PREFIX and GCC49_DLL to point ARM GCC path, then build ARM platform
> with -a ARM arch and -t GCC49 tool chain. Below is my setting:
>  set GCC49_ARM_PREFIX=D:\Tools\GCC\gcc492-arm\bin\
>  set GCC49_DLL=D:\Tools\GCC\gcc492-arm\dll\
> 
> Thanks
> Liming
> >-Original Message-
> >From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Fu,
> >Siyuan
> >Sent: Monday, December 17, 2018 9:51 AM
> >To: Laszlo Ersek ; Ard Biesheuvel
> >
> >Cc: edk2-devel@lists.01.org
> >Subject: Re: [edk2] [PATCH] ArmVirtPkg/ArmVirt.dsc.inc: define TcpIoLib
> >resolution unconditionally
> >
> >Hi, Laszlo
> >
> >> -Original Message-
> >> From: Laszlo Ersek [mailto:ler...@redhat.com]
> >> Sent: Friday, December 14, 2018 9:56 PM
> >> To: Ard Biesheuvel ; Fu, Siyuan
> >> 
> >> Cc: edk2-devel@lists.01.org; julien.gr...@linaro.org
> >> Subject: Re: [PATCH] ArmVirtPkg/ArmVirt.dsc.inc: define TcpIoLib resolution
> >> unconditionally
> >>
> >> On 12/14/18 12:22, Ard Biesheuvel wrote:
> >> > Commit 9a67ba261fe9 ("ArmVirtPkg: Replace obsoleted network drivers
> >> > from platform DSC/FDF") failed to take into account that the now
> >> > unconditionally included IScsiDxe.inf from NetworkPkg requires a
> >> > resolution for TcpIoLib.
> >>
> >> I don't understand why this happened.
> >>
> >>
> >> (a) I warned *precisely* about this issue, when I reviewed the v2
> >> version of said commit. See bullet (5) in the following message:
> >>
> >> http://mid.mail-archive.com/cdd81f4c-1bdc-8bae-63a9-
> >58eb4eb2a...@redhat.com
> >>
> >>
> >> (b) What's more, my comments for the v3 version were summarily ignored
> >> as well. See bullet (2) in:
> >>
> >> http://mid.mail-archive.com/91d253ae-9d0c-e28b-1bda-
> >1be98cee4...@redhat.com
> >>
> >> And now, the BaseCryptLib, OpensslLib and IntrinsicLib resolutions for
> >> [LibraryClasses.common.UEFI_DRIVER] have been added to
> >> "ArmVirtPkg/ArmVirtQemuKernel.dsc", despite their being redundant and
> >my
> >> having pointed out that fact. Worse, "ArmVirtQemuKernel.dsc" uses
> >> "OpensslLib.inf", while "OpensslLibCrypto.inf" from "ArmVirt.dsc.inc" is
> >> perfectly sufficient.
> >>
> >>
> >> Commit 9a67ba261fe9 does not carry my R-b, and that's not a random fact.
> >> The v3 patch was *not* ready for being pushed, to my eyes. And I was
> >> pretty explicit about that.
> >>
> >>
> >> > Since specifying such a resolution is harmless
> >> > for platforms that have no networking enabled, let's just fix things
> >> > by dropping the conditionals around it.
> >> >
> >> > Contributed-under: TianoCore Contribution Agreement 1.1
> >> > Signed-off-by: Ard Biesheuvel 
> >> > ---
> >> >  ArmVirtPkg/ArmVirt.dsc.inc | 2 --
> >> >  1 file changed, 2 deletions(-)
> >> >
> >> > diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc
> >> > index c3549c84d4c6..89c2db074711 100644
> >> > --- a/ArmVirtPkg/ArmVirt.dsc.inc
> >> > +++ b/ArmVirtPkg/ArmVirt.dsc.inc
> >> > @@ -80,9 +80,7 @@
> >> >DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
> >> >UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf
> >> >IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf
> >> > -!if $(NETWORK_IP6_ENABLE) == TRUE
> >> >TcpIoLib|MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.inf
> >> > -!endif
> >> >  !if $(HTTP_BOOT_ENABLE) == TRUE
> >> >HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf
> >> >  !endif
> >> >
> >&g

Re: [edk2] [PATCH] ArmVirtPkg/ArmVirt.dsc.inc: define TcpIoLib resolution unconditionally

2018-12-16 Thread Fu, Siyuan
Hi, Laszlo

> -Original Message-
> From: Laszlo Ersek [mailto:ler...@redhat.com]
> Sent: Friday, December 14, 2018 9:56 PM
> To: Ard Biesheuvel ; Fu, Siyuan
> 
> Cc: edk2-devel@lists.01.org; julien.gr...@linaro.org
> Subject: Re: [PATCH] ArmVirtPkg/ArmVirt.dsc.inc: define TcpIoLib resolution
> unconditionally
> 
> On 12/14/18 12:22, Ard Biesheuvel wrote:
> > Commit 9a67ba261fe9 ("ArmVirtPkg: Replace obsoleted network drivers
> > from platform DSC/FDF") failed to take into account that the now
> > unconditionally included IScsiDxe.inf from NetworkPkg requires a
> > resolution for TcpIoLib.
> 
> I don't understand why this happened.
> 
> 
> (a) I warned *precisely* about this issue, when I reviewed the v2
> version of said commit. See bullet (5) in the following message:
> 
> cdd81f4c-1bdc-8bae-63a9-58eb4eb2afbd@redhat.com">http://mid.mail-archive.com/cdd81f4c-1bdc-8bae-63a9-58eb4eb2afbd@redhat.com
> 
> 
> (b) What's more, my comments for the v3 version were summarily ignored
> as well. See bullet (2) in:
> 
> 91d253ae-9d0c-e28b-1bda-1be98cee4340@redhat.com">http://mid.mail-archive.com/91d253ae-9d0c-e28b-1bda-1be98cee4340@redhat.com
> 
> And now, the BaseCryptLib, OpensslLib and IntrinsicLib resolutions for
> [LibraryClasses.common.UEFI_DRIVER] have been added to
> "ArmVirtPkg/ArmVirtQemuKernel.dsc", despite their being redundant and my
> having pointed out that fact. Worse, "ArmVirtQemuKernel.dsc" uses
> "OpensslLib.inf", while "OpensslLibCrypto.inf" from "ArmVirt.dsc.inc" is
> perfectly sufficient.
> 
> 
> Commit 9a67ba261fe9 does not carry my R-b, and that's not a random fact.
> The v3 patch was *not* ready for being pushed, to my eyes. And I was
> pretty explicit about that.
> 
> 
> > Since specifying such a resolution is harmless
> > for platforms that have no networking enabled, let's just fix things
> > by dropping the conditionals around it.
> >
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Ard Biesheuvel 
> > ---
> >  ArmVirtPkg/ArmVirt.dsc.inc | 2 --
> >  1 file changed, 2 deletions(-)
> >
> > diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc
> > index c3549c84d4c6..89c2db074711 100644
> > --- a/ArmVirtPkg/ArmVirt.dsc.inc
> > +++ b/ArmVirtPkg/ArmVirt.dsc.inc
> > @@ -80,9 +80,7 @@
> >DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
> >UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf
> >IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf
> > -!if $(NETWORK_IP6_ENABLE) == TRUE
> >TcpIoLib|MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.inf
> > -!endif
> >  !if $(HTTP_BOOT_ENABLE) == TRUE
> >HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf
> >  !endif
> >
> 
> I'm *very strongly* tempted to simply revert 9a67ba261fe9, for blatantly
> ignoring my explicit requests for updates. However, that would only
> result in my having to review more (possibly incomplete) iterations of
> the patch.
> 
> At least, this incremental fix is in line with my request in (a) -- "we
> should make the current TcpIoLib class resolution unconditional". Please
> go ahead and push it.
> 
> Reviewed-by: Laszlo Ersek 
> 
> I should really file a TianoCore BZ about the wrong / redundant
> OpensslLib resolution in ArmVirtQemuKernel.dsc too. It's difficult for
> me to find te motivation for that right now, seeing the disregard for my
> earlier reviews.
> 
> Laszlo

My apologies for missed your review email of the v3 patch and pushed the
changes. The original patch set was made one month ago and I didn't carefully
checked all the review feedback emails when I started to work on it again
in the last week.

I have created a new patch upon this fix to remove the redundant libraries
and adjust driver order, please check this patch mail.
https://lists.01.org/pipermail/edk2-devel/2018-December/034070.html

And I'm also sorry that this new patch are also not tested for build, I tried
to search the wiki patch for setting up the ARM build toolchain on my windows
OS but failed to make it. I will appreciate if you can help to provide a guide
or any link for ARM package build on windows machine, so I could test my patch
in future.

Best Regards,
Siyuan

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH 1/1] ArmVirtPkg: Remove redundant library instances in ArmVirtQemuKernel.dsc

2018-12-16 Thread Fu Siyuan
Commit 9a67ba261fe9 ("ArmVirtPkg: Replace obsoleted network drivers
from platform DSC/FDF") incorrectly added the BaseCryptLib, OpensslLib
and IntrinsicLib to "ArmVirtPkg/ArmVirtQemuKernel.dsc", it's redundant
and the library instances from "ArmVirt.dsc.inc" is already sufficient.

This patch also adjust the order of network drivers in "ArmVirtPkg/
ArmVirtQemuFvMain.fdf.inc" to make it same as the DSC file.

Cc: Laszlo Ersek 
Cc: Ard Biesheuvel 
Cc: Julien Grall 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Fu Siyuan 
---
 ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc | 2 +-
 ArmVirtPkg/ArmVirtQemuKernel.dsc | 3 ---
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc 
b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
index 3316f982695f..dc6a0a2bcdc7 100644
--- a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
+++ b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
@@ -126,9 +126,9 @@ [FV.FvMain]
   INF MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
   INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
   INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
+  INF NetworkPkg/TcpDxe/TcpDxe.inf
   INF NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
   INF NetworkPkg/IScsiDxe/IScsiDxe.inf
-  INF NetworkPkg/TcpDxe/TcpDxe.inf
 !if $(NETWORK_IP6_ENABLE) == TRUE
   INF NetworkPkg/Ip6Dxe/Ip6Dxe.inf
   INF NetworkPkg/Udp6Dxe/Udp6Dxe.inf
diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc
index 812c71e772ec..6c2d6488d499 100644
--- a/ArmVirtPkg/ArmVirtQemuKernel.dsc
+++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc
@@ -67,9 +67,6 @@ [LibraryClasses.common]
 
 [LibraryClasses.common.UEFI_DRIVER]
   UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
-  BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
-  OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
-  IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
 
 [BuildOptions.common.EDKII.SEC, BuildOptions.common.EDKII.BASE]
   #
-- 
2.19.1.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH] Edk2Platforms: Replace MdeModulePkg PXE/iSCSI/TCP with NetworkPkg Drivers.

2018-12-13 Thread Fu Siyuan
The PXE/iSCSI/TCP drivers in MdeModulePkg are going to be deprecated. All
platform DSC/FDF files should be updated to use the dual-stack drivers in
NetworkPkg.

Cc: Michael A Kubacki 
Cc: Jiewen Yao 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Fu Siyuan 
---
 Platform/Intel/AdvancedFeaturePkg/Include/Dsc/CoreAdvancedDxeInclude.dsc  | 7 
++-
 Platform/Intel/AdvancedFeaturePkg/Include/Fdf/CoreAdvancedLateInclude.fdf | 7 
++-
 Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc   | 3 
+--
 3 files changed, 5 insertions(+), 12 deletions(-)

diff --git 
a/Platform/Intel/AdvancedFeaturePkg/Include/Dsc/CoreAdvancedDxeInclude.dsc 
b/Platform/Intel/AdvancedFeaturePkg/Include/Dsc/CoreAdvancedDxeInclude.dsc
index 4d70db6062..6764d46131 100644
--- a/Platform/Intel/AdvancedFeaturePkg/Include/Dsc/CoreAdvancedDxeInclude.dsc
+++ b/Platform/Intel/AdvancedFeaturePkg/Include/Dsc/CoreAdvancedDxeInclude.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  Platform description.
 #
-# Copyright (c) 2017, Intel Corporation. All rights reserved.
+# Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.
 #
 # This program and the accompanying materials are licensed and made available 
under
 # the terms and conditions of the BSD License which accompanies this 
distribution.
@@ -26,10 +26,7 @@
   MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
   MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
   MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
-  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
   MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
-  MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
-  #MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
 
   NetworkPkg/Ip6Dxe/Ip6Dxe.inf
   NetworkPkg/TcpDxe/TcpDxe.inf
@@ -42,7 +39,7 @@
   NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf
   NetworkPkg/HttpBootDxe/HttpBootDxe.inf
 
-  #NetworkPkg/IScsiDxe/IScsiDxe.inf
+  NetworkPkg/IScsiDxe/IScsiDxe.inf
   NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
 !endif
 
diff --git 
a/Platform/Intel/AdvancedFeaturePkg/Include/Fdf/CoreAdvancedLateInclude.fdf 
b/Platform/Intel/AdvancedFeaturePkg/Include/Fdf/CoreAdvancedLateInclude.fdf
index 0be408d13b..64f1dd5872 100644
--- a/Platform/Intel/AdvancedFeaturePkg/Include/Fdf/CoreAdvancedLateInclude.fdf
+++ b/Platform/Intel/AdvancedFeaturePkg/Include/Fdf/CoreAdvancedLateInclude.fdf
@@ -1,7 +1,7 @@
 ## @file
 #  FDF file of Platform.
 #
-# Copyright (c) 2017, Intel Corporation. All rights reserved.
+# Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.
 #
 # This program and the accompanying materials are licensed and made available 
under
 # the terms and conditions of the BSD License which accompanies this 
distribution.
@@ -27,9 +27,6 @@ INF  MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
 INF  MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
 INF  MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
 INF  MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
-#INF  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
-INF  MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
-#INF  MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
 
 INF  NetworkPkg/Ip6Dxe/Ip6Dxe.inf
 INF  NetworkPkg/TcpDxe/TcpDxe.inf
@@ -42,7 +39,7 @@ INF  NetworkPkg/HttpDxe/HttpDxe.inf
 INF  NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf
 INF  NetworkPkg/HttpBootDxe/HttpBootDxe.inf
 
-#INF  NetworkPkg/IScsiDxe/IScsiDxe.inf
+INF  NetworkPkg/IScsiDxe/IScsiDxe.inf
 INF  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
 !endif
 
diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc 
b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
index 2174eaa609..dd0173a1af 100644
--- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
+++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  Platform description.
 #
-# Copyright (c) 2017, Intel Corporation. All rights reserved.
+# Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.
 #
 # This program and the accompanying materials are licensed and made available 
under
 # the terms and conditions of the BSD License which accompanies this 
distribution.
@@ -83,7 +83,6 @@
   UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf
   TcpIoLib|MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.inf
   DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
-  TcpIoLib|MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.inf
   
OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
   CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
 
-- 
2.19.1.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v3 1/1] ArmVirtPkg: Replace obsoleted network drivers from platform DSC/FDF.

2018-12-13 Thread Fu, Siyuan
Hi, Arb

Do you think if it's ok to commit this patch to ArmVirtPkg now?

BestRegards
Fu Siyuan

> -Original Message-
> From: Fu, Siyuan
> Sent: Wednesday, November 7, 2018 8:59 AM
> To: Ard Biesheuvel 
> Cc: edk2-devel@lists.01.org; Julien Grall ; Laszlo
> Ersek 
> Subject: RE: [PATCH v3 1/1] ArmVirtPkg: Replace obsoleted network drivers from
> platform DSC/FDF.
> 
> Hi, Arb
> 
> > -Original Message-
> > From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org]
> > Sent: Wednesday, November 7, 2018 12:39 AM
> > To: Laszlo Ersek 
> > Cc: Fu, Siyuan ; edk2-devel@lists.01.org; Julien
> > Grall 
> > Subject: Re: [PATCH v3 1/1] ArmVirtPkg: Replace obsoleted network drivers
> > from platform DSC/FDF.
> >
> > On 6 November 2018 at 16:24, Laszlo Ersek  wrote:
> > > On 11/06/18 13:32, Ard Biesheuvel wrote:
> > >> On 6 November 2018 at 02:24, Fu Siyuan  wrote:
> > >>> V3:
> > >>> Remove duplicate library added in v2 patch, since ArmVirtPkg.dsc.inc
> > >>> already have them. Just remove the if...end there is enough.
> > >>>
> > >>> V2:
> > >>> Add missing library instance for NetworkPkg iSCSI driver.
> > >>>
> > >>
> > >> Please don't put the patch revision history in the commit log. Put it
> > >> below the ---
> > >>
> > >>> This patch replaces the MdeModulePkg TCP, PXE and iSCSI driver with
> > those
> > >>> ones in NetworkPkg. These 3 drivers in MdeModulePkg are not being
> > actively
> > >>> maintained and will be removed from edk2 master soon.
> > >>>
> > >>> Cc: Laszlo Ersek 
> > >>> Cc: Ard Biesheuvel 
> > >>> Cc: Julien Grall 
> > >>> Contributed-under: TianoCore Contribution Agreement 1.1
> > >>> Signed-off-by: Fu Siyuan 
> > >>> ---
> > >>
> > >> ... here ...
> > >>
> > >> The patch looks fine to me
> > >>
> > >> Reviewed-by: Ard Biesheuvel 
> > >>
> > >> but please don't merge it until after the next stable tag has been
> > created
> > >
> > > This is not a bad idea (see also your discussion with Leif); however it
> > > does create a bit of inconsistency with how the other platform DSC/FDF
> > > files have been handled. (The changes have been pushed for those.)
> > >
> > > Again, I don't disagree, and I don't mind if ArmVirt is handled
> > > differently. It's just that we should have handled this more uniformly,
> > > I believe.
> > >
> >
> > Yes - as I replied to Leif, I am not going to obsess about this. But
> > the point of stable tags is not to rush things in at the last minute.
> 
> OK I will not commit this change to ArmVirt until the stable tag is made.
> Sorry for the last minute notification of this change, and I can fully
> understand your concern, that's why we accepted Leif that still keep
> these MdeModulePkg drivers in this stable tag.
> 
> Thanks for review.
> Siyuan
> 
> >
> > >
> > > In retrospect, I would have also appreciated if the patches had
> > > referenced <https://bugzilla.tianocore.org/show_bug.cgi?id=1278>, even
> > > though they only implement "prep" work for now, on the platform DSC/FDF
> > > level, and not the actual driver removal.
> > >
> > > For example, the important explanation about MdeModulePkg's iSCSI driver
> > > implementing its own MD5 algo cannot be connected to the OVMF commit now
> > > (d2f1f6423bd1). I have copied the most relevant passage from the cover
> > > letter of this series into TianoCore BZ#1278, but the commit in question
> > > doesn't reference any BZ, so the link cannot be established.
> > >
> > > Thanks
> > > Laszlo
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v2 2/2] Edk2Platforms: Replace MdeModulePkg PXE/iSCSI/TCP with NetworkPkg drivers.

2018-11-27 Thread Fu, Siyuan
Hi, Thomas

> -Original Message-
> From: Thomas Abraham [mailto:thomas.abra...@arm.com]
> Sent: Friday, November 9, 2018 9:56 PM
> To: Leif Lindholm 
> Cc: Fu, Siyuan ; Kinney, Michael D
> ; edk2-devel@lists.01.org
> Subject: Re: [edk2] [PATCH v2 2/2] Edk2Platforms: Replace MdeModulePkg
> PXE/iSCSI/TCP with NetworkPkg drivers.
> 
> On Wed, Nov 7, 2018 at 1:55 PM Leif Lindholm  wrote:
> >
> > Hi Fu Siyan,
> >
> > On Wed, Nov 07, 2018 at 08:12:55AM +, Fu, Siyuan wrote:
> > > Hi, Leif and Ard
> > >
> > > I just realized that you may not be CCed in this email. I resent these
> patches a few minutes ago, my Git Bash send-email reports it added you to CC
> receiver, but the Outlook received email still doesn't have your name in CC
> list.
> > >
> > > Do you have any comments for this v2 patch of the edk2platforms?
> > >
> > >
> > > BestRegards
> > > Fu Siyuan
> > >
> > > > -Original Message-
> > > > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Fu
> > > > Siyuan
> > > > Sent: Monday, November 5, 2018 9:33 AM
> > > > To: edk2-devel@lists.01.org
> > > > Cc: Kinney, Michael D 
> > > > Subject: [edk2] [PATCH v2 2/2] Edk2Platforms: Replace MdeModulePkg
> > > > PXE/iSCSI/TCP with NetworkPkg drivers.
> > > >
> > > > V2:
> > > > Additional fixups required for NetworkPkg migration
> >
> > Revision history like this belongs in the cover letter.
> >
> > > > The PXE/iSCSI/TCP drivers in MdeModulePkg are going to be deprecated.
> All
> > > > platform DSC/FDF files should be updated to use the dual-stack drivers
> in
> > > > NetworkPkg.
> > > >
> > > > The NetworkPkg driver have all the functionality compared with
> > > > MdeModulePkg
> > > > one, with more bug fixes and new feature added. While its image size
> will
> > > > be a little bigger because it contains both IPv4 and IPv6 stack support,
> > > > so it may cause build error in a platform if the flash space is very
> tight.
> > > > Basically, this patch won't cause any other problem if build could pass.
> > > >
> > > > I haven't built all the updated platform because the repo ReadMe doesn't
> > > > provide a method to build them on Windows Environment, so I would very
> > > > appreciate if anybody can help to test the build or tell me how to build
> > > > it on Windows.
> >
> > And comments like the paragraph above belong in the cover letter or
> > below the ---
> > If you are OK with me deleting these bits before committing:
> > Reviewed-by: Leif Lindholm 
> >
> > /
> > Leif
> >
> > > >
> > > > Cc: Ard Biesheuvel 
> > > > Cc: Leif Lindholm 
> > > > Cc: Michael D Kinney 
> > > > Contributed-under: TianoCore Contribution Agreement 1.1
> > > > Signed-off-by: Fu Siyuan 
> > > > Signed-off-by: Leif Lindholm 
> > > > ---
> > > >  Platform/AMD/OverdriveBoard/OverdriveBoard.dsc  |  6 +++---
> > > >  Platform/AMD/OverdriveBoard/OverdriveBoard.fdf  |  6 +++---
> > > >  Platform/ARM/SgiPkg/SgiPlatform.fdf |  6 +++---
> > > >  Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.dsc   |  1 +
> > > >  Platform/ARM/VExpressPkg/ArmVExpress-networking.fdf.inc |  6 +++---
> > > >  Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc| 13
> +++-
> > > > -
> > > >  Platform/Comcast/RDKQemu/RDKQemu.dsc| 10 +++---
> --
> > > > --
> > > >  Platform/Hisilicon/D03/D03.dsc  |  4 ++--
> > > >  Platform/Hisilicon/D03/D03.fdf  |  4 ++--
> > > >  Platform/Hisilicon/D05/D05.dsc  | 11 +++---
> --
> > > > ---
> > > >  Platform/Hisilicon/D05/D05.fdf  |  9 +++---
> --
> > > > -
> > > >  Platform/Hisilicon/D06/D06.dsc  | 11 +++---
> --
> > > > ---
> > > >  Platform/Hisilicon/D06/D06.fdf  |  9 +++---
> --
> > > > -
> > > >  Platform/Hisilicon/HiKey/HiKey.dsc  |  4 ++--
> > > >  Platform/Hisilicon/HiKey/HiKey.fdf  |  4 ++--
> &g

Re: [edk2] [PATCH v2] NetworkPkg/IScsiDxe: add debug logs for failed SetVariable attempts

2018-11-22 Thread Fu, Siyuan
Reviewed-by: Fu Siyuan 

> -Original Message-
> From: Vijayenthiran Subramaniam [mailto:vijayenthiran.subraman...@arm.com]
> Sent: Wednesday, November 21, 2018 11:36 PM
> To: edk2-devel@lists.01.org; Fu, Siyuan ; Wu, Jiaxin
> 
> Cc: Vijayenthiran Subramaniam 
> Subject: [PATCH v2] NetworkPkg/IScsiDxe: add debug logs for failed
> SetVariable attempts
> 
> Add debug messages for failed attempts to write to a variable.
> 
> Cc: Siyuan Fu 
> Cc: Jiaxin Wu 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Vijayenthiran Subramaniam
> 
> ---
> Made the log messages bit more useful.
> 
> Thanks,
> Vijayenthiran
> 
>  NetworkPkg/IScsiDxe/IScsiMisc.c | 8 
>  1 file changed, 8 insertions(+)
> 
> diff --git a/NetworkPkg/IScsiDxe/IScsiMisc.c
> b/NetworkPkg/IScsiDxe/IScsiMisc.c
> index dd0d32dcda16..7bed95a8fba3 100644
> --- a/NetworkPkg/IScsiDxe/IScsiMisc.c
> +++ b/NetworkPkg/IScsiDxe/IScsiMisc.c
> @@ -845,6 +845,10 @@ IScsiCreateAttempts (
>  );
>  FreePool (AttemptConfigOrder);
>  if (EFI_ERROR (Status)) {
> +  DEBUG ((DEBUG_ERROR,
> +"%a: Failed to set 'InitialAttemptOrder' with Guid (%g): "
> +"%r\n",
> +__FUNCTION__, &gIScsiConfigGuid, Status));
>return Status;
>  }
> 
> @@ -887,6 +891,10 @@ IScsiCreateAttempts (
>  );
>  FreePool (AttemptConfigData);
>  if (EFI_ERROR (Status)) {
> +DEBUG ((DEBUG_ERROR,
> +  "%a: Failed to set variable (mPrivate->PortString) with Guid
> (%g): "
> +  "%r\n",
> +  __FUNCTION__, &gEfiIScsiInitiatorNameProtocolGuid, Status));
>return Status;
>  }
>}
> --
> 2.17.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v2 1/6] NetworkPkg: Add DSC/FDF include segment files to NetworkPkg.

2018-11-22 Thread Fu, Siyuan
Hi, Ray

It was one single file in v1 patch and I split it to 4 files in v2. Because 
there will be some problems if we include the section header, see Laszlo's 
comments on  https://lists.01.org/pipermail/edk2-devel/2018-November/032774.html


BestRegards
Fu Siyuan

> -Original Message-
> From: Ni, Ruiyu
> Sent: Thursday, November 22, 2018 5:57 PM
> To: Fu, Siyuan ; edk2-devel@lists.01.org
> Cc: Ye, Ting ; Wu, Jiaxin ; Gao,
> Liming 
> Subject: RE: [edk2] [PATCH v2 1/6] NetworkPkg: Add DSC/FDF include segment
> files to NetworkPkg.
> 
> Siyuan,
> Can you merge all the dsc.inc together like below content?
> [Defines]
> ...
> [LIbraryClasses]
> ...
> ...
> 
> Through this way, platform only needs include once in DSC.
> 
> Thanks/Ray
> 
> > -Original Message-
> > From: edk2-devel  On Behalf Of Fu
> > Siyuan
> > Sent: Thursday, November 22, 2018 1:22 PM
> > To: edk2-devel@lists.01.org
> > Cc: Ye, Ting ; Wu, Jiaxin 
> > Subject: [edk2] [PATCH v2 1/6] NetworkPkg: Add DSC/FDF include segment
> > files to NetworkPkg.
> >
> > This patch provides a set of include segment files for platform owner to
> easily
> > enable/disable network stack support on their platform.
> >
> > For DSC, there are:
> > - a "NetworkDefines.dsc.inc" for the [Defines] section(s),
> > - a "NetworkLibs.dsc.inc" for the [LibraryClasses*] section(s),
> > - a "NetworkPcds.dsc.inc" for the [Pcds*] section(s),
> > - a "NetworkComponents.dsc.inc" for the [Components*] section(s).
> > For FDF, there is:
> > - a "Network.fdf.inc" for the [Fv*] section(s).
> >
> > These files can be added to the platform DSC/FDF file by using
> >   !include NetworkPkg/xxx
> > where "xxx" is the *.inc file name.
> >
> > A set of flags can be changed before the include line or in build
> command line
> > ("-D FLAG=VALUE") to enable or disable related feature set, please check
> > "NetworkDefines.dsc.inc" for a detail description of each flag.
> >
> > The default value of these flags are:
> >   DEFINE NETWORK_ENABLE = TRUE
> >   DEFINE NETWORK_SNP_ENABLE = TRUE
> >   DEFINE NETWORK_IP4_ENABLE = TRUE
> >   DEFINE NETWORK_IP6_ENABLE = TRUE
> >   DEFINE NETWORK_TLS_ENABLE = TRUE
> >   DEFINE NETWORK_HTTP_BOOT_ENABLE   = TRUE
> >   DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = FALSE
> >   DEFINE NETWORK_IPSEC_ENABLE   = TRUE
> >   DEFINE NETWORK_ISCSI_ENABLE   = TRUE
> >   DEFINE NETWORK_VLAN_ENABLE= TRUE
> >
> > Related BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1293
> >
> > Cc: Jiaxin Wu 
> > Cc: Ting Ye 
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Fu Siyuan 
> > ---
> >
> > Notes:
> > v2:
> > 1. Split the "Network.dsc.inc" in to 4 files for different sections
> in DSC
> > file. This could provide more flexibility to platform owner to use
> the
> > include files.
> > 2. Clarify the OpenSSL dependency of TLS, iSCSI and IPsec enable
> flag.
> > 3. Use "!error" statement for incorrect flag value check.
> > 4. Other decoration work according to Laszlo's comments.
> >
> >  NetworkPkg/Network.fdf.inc   |  69 ++
> >  NetworkPkg/NetworkComponents.dsc.inc |  71 ++
> >  NetworkPkg/NetworkDefines.dsc.inc| 138 
> >  NetworkPkg/NetworkLibs.dsc.inc   |  25 
> >  NetworkPkg/NetworkPcds.dsc.inc   |  22 
> >  NetworkPkg/NetworkPkg.dsc|  28 +---
> >  6 files changed, 331 insertions(+), 22 deletions(-)
> >
> > diff --git a/NetworkPkg/Network.fdf.inc b/NetworkPkg/Network.fdf.inc new
> > file mode 100644 index ..abd4c6c363d5
> > --- /dev/null
> > +++ b/NetworkPkg/Network.fdf.inc
> > @@ -0,0 +1,69 @@
> > +## @file
> > +# Network FDF include file for All Architectures.
> > +#
> > +# This file can be included to a platform FDF by using "!include
> > NetworkPkg/Network.fdf.inc"
> > +# to add EDKII network stack drivers according to the value of flags
> > +described in # "NetworkDefines.dsc.inc".
> > +#
> > +# Copyright (c) 2018, Intel Corporation. All rights reserved. #
> > +#This program and the accompanying materials
> > +#are licensed and made available under the terms and conditions of
> the
> > BSD License
> > +#which acco

[edk2] [PATCH v2 5/6] OvmfPkg: Update DSC/FDF to use NetworkPkg's include fragment file.

2018-11-21 Thread Fu Siyuan
This patch updates the platform DSC/FDF files to use the include fragment
files provided by NetworkPkg.
The feature enabling flags in [Defines] section have been updated to use
the NetworkPkg's terms, and the value has been overridden with the original
default value on this platform.

This patch also rename the TLS_ENABLE flag to PLATFORM_TLS_ENABLE for the
platform specific configuration for TLS support.

Cc: Jordan Justen 
Cc: Laszlo Ersek 
Cc: Ard Biesheuvel 
Cc: Anthony Perard 
Cc: Julien Grall 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Fu Siyuan 
---

Notes:
v2:
Rename TLS_ENABLE flag to PLATFORM_TLS_ENABLE flag for platform specific 
configuration for TLS support.

 OvmfPkg/OvmfPkgIa32.dsc| 75 +--
 OvmfPkg/OvmfPkgIa32.fdf| 27 +--
 OvmfPkg/OvmfPkgIa32X64.dsc | 76 +---
 OvmfPkg/OvmfPkgIa32X64.fdf | 27 +--
 OvmfPkg/OvmfPkgX64.dsc | 75 +--
 OvmfPkg/OvmfPkgX64.fdf | 27 +--
 6 files changed, 102 insertions(+), 205 deletions(-)

diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
index eccf34d3d1cb..adedd2240a8a 100644
--- a/OvmfPkg/OvmfPkgIa32.dsc
+++ b/OvmfPkg/OvmfPkgIa32.dsc
@@ -35,12 +35,25 @@ [Defines]
   # -D FLAG=VALUE
   #
   DEFINE SECURE_BOOT_ENABLE  = FALSE
-  DEFINE NETWORK_IP6_ENABLE  = FALSE
-  DEFINE HTTP_BOOT_ENABLE= FALSE
   DEFINE SMM_REQUIRE = FALSE
-  DEFINE TLS_ENABLE  = FALSE
   DEFINE TPM2_ENABLE = FALSE
 
+  #
+  # PLATFORM_TLS_ENABLE flag is used to control platform specific 
configuration for TLS support,
+  # which add a NULL class library instance to TlsAuthConfigDxe.inf for 
downloading the necessary
+  # data from QEMU via fw_cfg.
+  #
+  DEFINE PLATFORM_TLS_ENABLE= FALSE
+  #
+  # The NETWORK_TLS_ENABLE should always be set to FALSE since 
PLATFORM_TLS_ENABLE is used.
+  #
+  DEFINE NETWORK_TLS_ENABLE = FALSE
+  DEFINE NETWORK_IP6_ENABLE = FALSE
+  DEFINE NETWORK_HTTP_BOOT_ENABLE   = FALSE
+  DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = TRUE
+  DEFINE NETWORK_IPSEC_ENABLE   = FALSE
+!include NetworkPkg/NetworkDefines.dsc.inc
+
   #
   # Flash size selection. Setting FD_SIZE_IN_KB on the command line directly to
   # one of the supported values, in place of any of the convenience macros, is
@@ -144,10 +157,6 @@ [LibraryClasses]
   FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
   UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
   
SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
-  NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
-  IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf
-  UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf
-  DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
   UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
   
SerializeVariablesLib|OvmfPkg/Library/SerializeVariablesLib/SerializeVariablesLib.inf
   QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgDxeLib.inf
@@ -173,7 +182,7 @@ [LibraryClasses]
   
DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
 
   IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
-!if $(TLS_ENABLE) == TRUE
+!if $(PLATFORM_TLS_ENABLE) == TRUE
   OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
 !else
   OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
@@ -191,11 +200,12 @@ [LibraryClasses]
 
   TcpIoLib|MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.inf
 
-!if $(HTTP_BOOT_ENABLE) == TRUE
-  HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf
-!endif
+  #
+  # Network libraries
+  #
+!include NetworkPkg/NetworkLibs.dsc.inc
 
-!if $(TLS_ENABLE) == TRUE
+!if $(PLATFORM_TLS_ENABLE) == TRUE
   TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf
 !endif
 
@@ -442,7 +452,7 @@ [PcdsFixedAtBuild]
 !if ($(FD_SIZE_IN_KB) == 1024) || ($(FD_SIZE_IN_KB) == 2048)
   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000
   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x2800
-!if $(TLS_ENABLE) == FALSE
+!if $(PLATFORM_TLS_ENABLE) == FALSE
   # match PcdFlashNvStorageVariableSize purely for convenience
   gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0xe000
 !endif
@@ -450,12 +460,12 @@ [PcdsFixedAtBuild]
 !if $(FD_SIZE_IN_KB) == 4096
   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x8400
   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x8400
-!if $(TLS_ENABLE) == FALSE
+!if $(PLATFORM_TLS_ENABLE) == FALSE
   # match PcdFlashNvStorageVariableSize purely for convenience
   gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0x4
 !endif
 !endif
-!if $(TLS_ENABLE) == TRUE
+!if $(PLATFORM_TLS_ENABLE) == TRUE
   gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0x8
   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVolatileVariableSize|0x4
 !endif
@@ -504,9 +514,10 @@ [PcdsFixedAt

[edk2] [PATCH v2 6/6] Vlv2TbltDevicePkg: Update DSC/FDF to use NetworkPkg's include fragment file.

2018-11-21 Thread Fu Siyuan
This patch updates the platform DSC/FDF files to use the include fragment
files provided by NetworkPkg.
The feature enabling flags in [Defines] section have been updated to use
the NetworkPkg's terms, and the value has been overridden with the original
default value on this platform.

Cc: David Wei 
Cc: Mang Guo 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Fu Siyuan 
---
 Vlv2TbltDevicePkg/PlatformPkg.fdf   | 25 +-
 Vlv2TbltDevicePkg/PlatformPkgConfig.dsc | 11 +++--
 Vlv2TbltDevicePkg/PlatformPkgGcc.fdf| 25 +-
 Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc | 52 ++--
 Vlv2TbltDevicePkg/PlatformPkgIA32.dsc   | 52 ++--
 Vlv2TbltDevicePkg/PlatformPkgX64.dsc| 52 ++--
 6 files changed, 54 insertions(+), 163 deletions(-)

diff --git a/Vlv2TbltDevicePkg/PlatformPkg.fdf 
b/Vlv2TbltDevicePkg/PlatformPkg.fdf
index f976b9fa4057..e281d1407fc2 100644
--- a/Vlv2TbltDevicePkg/PlatformPkg.fdf
+++ b/Vlv2TbltDevicePkg/PlatformPkg.fdf
@@ -728,35 +728,12 @@ [FV.FVMAIN]
 #
 # Network Modules
 #
+!include NetworkPkg/Network.fdf.inc
 !if $(NETWORK_ENABLE) == TRUE
   FILE DRIVER = 22DE1691-D65D-456a-993E-A253DD1F308C {
 SECTION PE32 = 
Vlv2MiscBinariesPkg/UNDI/RtkUndiDxe/$(DXE_ARCHITECTURE)/RtkUndiDxe.efi
 SECTION UI = "UNDI"
   }
-  INF  MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf
-  INF  MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
-  INF  MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
-  INF  MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
-  INF  MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
-  INF  MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
-  INF  MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
-  INF  MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
-  INF  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  INF  NetworkPkg/TcpDxe/TcpDxe.inf
-  INF  NetworkPkg/IScsiDxe/IScsiDxe.inf
-  !if $(NETWORK_IP6_ENABLE) == TRUE
-  INF  NetworkPkg/Ip6Dxe/Ip6Dxe.inf
-  INF  NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
-  INF  NetworkPkg/IpSecDxe/IpSecDxe.inf
-  INF  NetworkPkg/Udp6Dxe/Udp6Dxe.inf
-  INF  NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
-  !endif
-  !if $(NETWORK_VLAN_ENABLE) == TRUE
-  INF  MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
-  !endif
-  !if $(NETWORK_ISCSI_ENABLE) == TRUE
-INF  NetworkPkg/IScsiDxe/IScsiDxe.inf
-  !endif
 !endif
 
 !if $(CAPSULE_ENABLE)
diff --git a/Vlv2TbltDevicePkg/PlatformPkgConfig.dsc 
b/Vlv2TbltDevicePkg/PlatformPkgConfig.dsc
index 672853dda6a6..a065e7e8e6a7 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgConfig.dsc
+++ b/Vlv2TbltDevicePkg/PlatformPkgConfig.dsc
@@ -81,10 +81,13 @@
 
 DEFINE LZMA_ENABLE = TRUE
 DEFINE S4_ENABLE = TRUE
-DEFINE NETWORK_ENABLE = TRUE
-DEFINE NETWORK_IP6_ENABLE = TRUE
-DEFINE NETWORK_ISCSI_ENABLE = FALSE
-DEFINE NETWORK_VLAN_ENABLE = FALSE
+DEFINE NETWORK_ENABLE = TRUE
+DEFINE NETWORK_IP6_ENABLE = TRUE
+DEFINE NETWORK_ISCSI_ENABLE   = FALSE
+DEFINE NETWORK_VLAN_ENABLE= FALSE
+DEFINE NETWORK_TLS_ENABLE = FALSE
+DEFINE NETWORK_HTTP_BOOT_ENABLE   = FALSE
+DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = FALSE
 
 DEFINE SATA_ENABLE   = TRUE
 DEFINE PCIESC_ENABLE = TRUE
diff --git a/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf 
b/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
index 50032f7d5f19..6ea0ec92d4ae 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
+++ b/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
@@ -684,35 +684,12 @@ [FV.FVMAIN]
 #
 # Network Modules
 #
+!include NetworkPkg/Network.fdf.inc
 !if $(NETWORK_ENABLE) == TRUE
   FILE DRIVER = 22DE1691-D65D-456a-993E-A253DD1F308C {
 SECTION PE32 = 
Vlv2MiscBinariesPkg/UNDI/RtkUndiDxe/$(DXE_ARCHITECTURE)/RtkUndiDxe.efi
 SECTION UI = "UNDI"
   }
-  INF  MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf
-  INF  MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
-  INF  MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
-  INF  MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
-  INF  MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
-  INF  MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
-  INF  MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
-  INF  MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
-  INF  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  INF  NetworkPkg/TcpDxe/TcpDxe.inf
-  INF  NetworkPkg/IScsiDxe/IScsiDxe.inf
-  !if $(NETWORK_IP6_ENABLE) == TRUE
-  INF  NetworkPkg/Ip6Dxe/Ip6Dxe.inf
-  INF  NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
-  INF  NetworkPkg/IpSecDxe/IpSecDxe.inf
-  INF  NetworkPkg/Udp6Dxe/Udp6Dxe.inf
-  INF  NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
-  !endif
-  !if $(NETWORK_VLAN_ENABLE) == TRUE
-  INF  MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
-  !endif
-  !if $(NETWORK_ISCSI_ENABLE) == TRUE
-INF  NetworkPkg/IScsiDxe/IScsiDxe.inf
-  !endif
 !endif
 
 !if $(CAPSULE_ENABLE)
diff --git a/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc 
b/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
index f8ad29df

[edk2] [PATCH v2 0/6] Add DSC/FDF include segment files for network stack

2018-11-21 Thread Fu Siyuan
There is a patch to remove the redudant IP4 only iSCSI/PXE/TCP drivers
from MdeModulePkg, which has been reviewed before edk2-stable201811 tag.
And we also have plan to move all network related libraries/modules to
NetworkPkg. In order to make these change more smoothly, a set of fragment
files (2 for DSC and 1 for FDF) are provided for platform to enable the 
network stack support, without directly reference the INF module path.

Patch 1/6 adds centralized dsc/fdf include files to NetworkPkg, with
a set of flags for feature set enable/disable.
Patch 2~6 updates edk2 platform dsc/fdf files to use the new include
files, instead of reference the module INF.

v2:
  1. Split the "Network.dsc.inc" in to 4 files for different sections in DSC
  file. This could provide more flexibility to platform owner to use the
  include files.
  2. Clarify the OpenSSL dependency of TLS, iSCSI and IPsec enable flag.
  3. Use "!error" statement for incorrect flag value check.
  4. Update platform DSC/FDF to use the new include files.
  5. Other decoration work according to Laszlo's comments.



Fu Siyuan (6):
  NetworkPkg: Add DSC/FDF include segment files to NetworkPkg.
  Nt32Pkg: Update DSC/FDF to use NetworkPkg's include fragment file.
  ArmVirtPkg: Update DSC/FDF to use NetworkPkg's include fragment file.
  EmulatorPkg: Update DSC/FDF to use NetworkPkg's include fragment file.
  OvmfPkg: Update DSC/FDF to use NetworkPkg's include fragment file.
  Vlv2TbltDevicePkg: Update DSC/FDF to use NetworkPkg's include fragment
file.

 ArmVirtPkg/ArmVirt.dsc.inc  |  11 +-
 ArmVirtPkg/ArmVirtQemu.dsc  |  46 ++-
 ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc|  28 +---
 ArmVirtPkg/ArmVirtQemuKernel.dsc|  46 ++-
 EmulatorPkg/EmulatorPkg.dsc |  39 --
 EmulatorPkg/EmulatorPkg.fdf |  10 +-
 NetworkPkg/Network.fdf.inc  |  69 ++
 NetworkPkg/NetworkComponents.dsc.inc|  71 ++
 NetworkPkg/NetworkDefines.dsc.inc   | 138 
 NetworkPkg/NetworkLibs.dsc.inc  |  25 
 NetworkPkg/NetworkPcds.dsc.inc  |  22 
 NetworkPkg/NetworkPkg.dsc   |  28 +---
 Nt32Pkg/Nt32Pkg.dsc | 104 ---
 Nt32Pkg/Nt32Pkg.fdf |  27 +---
 OvmfPkg/OvmfPkgIa32.dsc |  75 +--
 OvmfPkg/OvmfPkgIa32.fdf |  27 +---
 OvmfPkg/OvmfPkgIa32X64.dsc  |  76 +--
 OvmfPkg/OvmfPkgIa32X64.fdf  |  27 +---
 OvmfPkg/OvmfPkgX64.dsc  |  75 +--
 OvmfPkg/OvmfPkgX64.fdf  |  27 +---
 Vlv2TbltDevicePkg/PlatformPkg.fdf   |  25 +---
 Vlv2TbltDevicePkg/PlatformPkgConfig.dsc |  11 +-
 Vlv2TbltDevicePkg/PlatformPkgGcc.fdf|  25 +---
 Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc |  52 +++-
 Vlv2TbltDevicePkg/PlatformPkgIA32.dsc   |  52 +++-
 Vlv2TbltDevicePkg/PlatformPkgX64.dsc|  52 +++-
 26 files changed, 573 insertions(+), 615 deletions(-)
 create mode 100644 NetworkPkg/Network.fdf.inc
 create mode 100644 NetworkPkg/NetworkComponents.dsc.inc
 create mode 100644 NetworkPkg/NetworkDefines.dsc.inc
 create mode 100644 NetworkPkg/NetworkLibs.dsc.inc
 create mode 100644 NetworkPkg/NetworkPcds.dsc.inc

Cc: Jiaxin Wu 
Cc: Ting Ye 
Cc: Ruiyu Ni 
Cc: Hao Wu 
Cc: Laszlo Ersek 
Cc: Ard Biesheuvel 
Cc: Julien Grall 
Cc: Jordan Justen 
Cc: Andrew Fish 
Cc: Ruiyu Ni 
Cc: Anthony Perard 
Cc: David Wei 
Cc: Mang Guo 

-- 
2.19.1.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH v2 3/6] ArmVirtPkg: Update DSC/FDF to use NetworkPkg's include fragment file.

2018-11-21 Thread Fu Siyuan
This patch updates the platform DSC/FDF files to use the include fragment
files provided by NetworkPkg.
The feature enabling flags in [Defines] section have been updated to use
the NetworkPkg's terms, and the value has been overridden with the original
default value on this platform.

Cc: Laszlo Ersek 
Cc: Ard Biesheuvel 
Cc: Julien Grall 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Fu Siyuan 
---
 ArmVirtPkg/ArmVirt.dsc.inc   | 11 +
 ArmVirtPkg/ArmVirtQemu.dsc   | 46 ++--
 ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc | 28 +---
 ArmVirtPkg/ArmVirtQemuKernel.dsc | 46 ++--
 4 files changed, 28 insertions(+), 103 deletions(-)

diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc
index 70a0ac4d786c..d7de73a88eff 100644
--- a/ArmVirtPkg/ArmVirt.dsc.inc
+++ b/ArmVirtPkg/ArmVirt.dsc.inc
@@ -76,16 +76,7 @@ [LibraryClasses.common]
   BaseMemoryLib|MdePkg/Library/BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.inf
 
   # Networking Requirements
-  NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
-  DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
-  UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf
-  IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf
-!if $(NETWORK_IP6_ENABLE) == TRUE
-  TcpIoLib|MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.inf
-!endif
-!if $(HTTP_BOOT_ENABLE) == TRUE
-  HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf
-!endif
+!include NetworkPkg/NetworkLibs.dsc.inc
 
   #
   # It is not possible to prevent the ARM compiler from inserting calls to 
intrinsic functions.
diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
index 885c6b14b844..1414b6a5ccf8 100644
--- a/ArmVirtPkg/ArmVirtQemu.dsc
+++ b/ArmVirtPkg/ArmVirtQemu.dsc
@@ -33,9 +33,14 @@ [Defines]
   # Defines for default states.  These can be changed on the command line.
   # -D FLAG=VALUE
   #
-  DEFINE SECURE_BOOT_ENABLE  = FALSE
-  DEFINE NETWORK_IP6_ENABLE  = FALSE
-  DEFINE HTTP_BOOT_ENABLE= FALSE
+  DEFINE SECURE_BOOT_ENABLE  = FALSE
+  DEFINE NETWORK_IP6_ENABLE  = FALSE
+  DEFINE NETWORK_HTTP_BOOT_ENABLE= FALSE
+  DEFINE NETWORK_SNP_ENABLE  = FALSE
+  DEFINE NETWORK_TLS_ENABLE  = FALSE
+  DEFINE NETWORK_IPSEC_ENABLE= FALSE
+  DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS  = TRUE
+!include NetworkPkg/NetworkDefines.dsc.inc
 
 !include ArmVirtPkg/ArmVirt.dsc.inc
 
@@ -123,9 +128,10 @@ [PcdsFixedAtBuild.common]
   #
   gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|0
 
-!if $(HTTP_BOOT_ENABLE) == TRUE
-  gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections|TRUE
-!endif
+  #
+  # Network Pcds
+  #
+!include NetworkPkg/NetworkPcds.dsc.inc
 
   # System Memory Base -- fixed at 0x4000_
   gArmTokenSpaceGuid.PcdSystemMemoryBase|0x4000
@@ -338,33 +344,7 @@ [Components.common]
   #
   # Networking stack
   #
-  MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
-  MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
-  MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
-  MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
-  MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
-  MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
-  MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
-  MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
-!if $(NETWORK_IP6_ENABLE) == TRUE
-  NetworkPkg/Ip6Dxe/Ip6Dxe.inf
-  NetworkPkg/TcpDxe/TcpDxe.inf
-  NetworkPkg/Udp6Dxe/Udp6Dxe.inf
-  NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
-  NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
-  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  NetworkPkg/IScsiDxe/IScsiDxe.inf
-!else
-  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
-  MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
-!endif
-!if $(HTTP_BOOT_ENABLE) == TRUE
-  NetworkPkg/DnsDxe/DnsDxe.inf
-  NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf
-  NetworkPkg/HttpDxe/HttpDxe.inf
-  NetworkPkg/HttpBootDxe/HttpBootDxe.inf
-!endif
+!include NetworkPkg/NetworkComponents.dsc.inc
 
   #
   # SCSI Bus and Disk Driver
diff --git a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc 
b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
index a6390bd4b841..560651e49e0b 100644
--- a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
+++ b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
@@ -118,33 +118,7 @@ [FV.FvMain]
   #
   # Networking stack
   #
-  INF MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
-  INF MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
-  INF MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
-  INF MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
-  INF MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
-  INF MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
-  INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
-  INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
-!if $(NETWORK_IP6_ENABLE) == TRUE
-  INF NetworkPkg/Ip6Dxe/Ip6Dxe.inf
-  INF NetworkPkg/TcpDxe/TcpDx

[edk2] [PATCH v2 4/6] EmulatorPkg: Update DSC/FDF to use NetworkPkg's include fragment file.

2018-11-21 Thread Fu Siyuan
This patch updates the platform DSC/FDF files to use the include fragment
files provided by NetworkPkg.
The feature enabling flags in [Defines] section have been updated to use
the NetworkPkg's terms, and the value has been overridden with the original
default value on this platform.

Cc: Jordan Justen 
Cc: Andrew Fish 
Cc: Ruiyu Ni 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Fu Siyuan 
---
 EmulatorPkg/EmulatorPkg.dsc | 39 +---
 EmulatorPkg/EmulatorPkg.fdf | 10 +
 2 files changed, 27 insertions(+), 22 deletions(-)

diff --git a/EmulatorPkg/EmulatorPkg.dsc b/EmulatorPkg/EmulatorPkg.dsc
index 4097e1192ebc..b819f438c407 100644
--- a/EmulatorPkg/EmulatorPkg.dsc
+++ b/EmulatorPkg/EmulatorPkg.dsc
@@ -29,6 +29,21 @@ [Defines]
   SKUID_IDENTIFIER   = DEFAULT
   FLASH_DEFINITION   = EmulatorPkg/EmulatorPkg.fdf
 
+  #
+  # Network stack drivers
+  #
+  
+  #
+  # EmuSnpDxe.inf will be used.
+  #
+  DEFINE NETWORK_SNP_ENABLE   = FALSE
+  DEFINE NETWORK_IP6_ENABLE   = FALSE
+  DEFINE NETWORK_TLS_ENABLE   = FALSE
+  DEFINE NETWORK_HTTP_BOOT_ENABLE = FALSE
+  DEFINE NETWORK_IPSEC_ENABLE = FALSE
+  DEFINE NETWORK_ISCSI_ENABLE = FALSE
+!include NetworkPkg/NetworkDefines.dsc.inc
+
 [SkuIds]
   0|DEFAULT
 
@@ -74,10 +89,6 @@ [LibraryClasses]
   # Generic Modules
   #
   UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
-  NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
-  IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf
-  UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf
-  DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
   
OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
   BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
   FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
@@ -89,6 +100,11 @@ [LibraryClasses]
   TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf
   SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.inf
   CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
+  #
+  # Network libraries
+  #
+!include NetworkPkg/NetworkLibs.dsc.inc
+
   #
   # Platform
   #
@@ -225,6 +241,11 @@ [PcdsFixedAtBuild]
   #  0-PCANSI, 1-VT100, 2-VT00+, 3-UTF8, 4-TTYTERM
   gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|1
 
+  #
+  # Network Pcds
+  #
+!include NetworkPkg/NetworkPcds.dsc.inc
+
 [PcdsDynamicDefault.common.DEFAULT]
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase64|0
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0
@@ -368,15 +389,7 @@ [Components]
   #
   # Network stack drivers
   #
-  MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
-  MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
-  MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
-  MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
-  MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
-  MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
-  MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
-  MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
-  NetworkPkg/TcpDxe/TcpDxe.inf
+!include NetworkPkg/NetworkComponents.dsc.inc
 
   MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
   MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
diff --git a/EmulatorPkg/EmulatorPkg.fdf b/EmulatorPkg/EmulatorPkg.fdf
index 45697da25860..a8b46be66083 100644
--- a/EmulatorPkg/EmulatorPkg.fdf
+++ b/EmulatorPkg/EmulatorPkg.fdf
@@ -196,15 +196,7 @@ [FV.FvRecovery]
 !if $(NETWORK_SUPPORT)
 INF  EmulatorPkg/EmuSnpDxe/EmuSnpDxe.inf
 !endif
-INF  MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
-INF  MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
-INF  MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
-INF  MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
-INF  MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
-INF  MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
-INF  MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
-INF  NetworkPkg/TcpDxe/TcpDxe.inf
-INF  MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
+!include NetworkPkg/Network.fdf.inc
 
 INF FatPkg/EnhancedFatDxe/Fat.inf
 
-- 
2.19.1.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH v2 2/6] Nt32Pkg: Update DSC/FDF to use NetworkPkg's include fragment file.

2018-11-21 Thread Fu Siyuan
This patch updates the platform DSC/FDF files to use the include fragment
files provided by NetworkPkg.
The feature enabling flags in [Defines] section have be updated to use the
NetworkPkg's terms, and the value have been overridden with the original
default value on this platform.

Cc: Ruiyu Ni 
Cc: Hao Wu 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Fu Siyuan 
---

Notes:
v2:
Change the !if reference of TLS_ENABLE to NETWORK_TLS_ENABLE for OpensslLib.

 Nt32Pkg/Nt32Pkg.dsc | 104 ++--
 Nt32Pkg/Nt32Pkg.fdf |  27 +
 2 files changed, 31 insertions(+), 100 deletions(-)

diff --git a/Nt32Pkg/Nt32Pkg.dsc b/Nt32Pkg/Nt32Pkg.dsc
index 4dbde0cc45b6..06d6407d593c 100644
--- a/Nt32Pkg/Nt32Pkg.dsc
+++ b/Nt32Pkg/Nt32Pkg.dsc
@@ -44,39 +44,20 @@ [Defines]
   # Defines for default states.  These can be changed on the command line.
   # -D FLAG=VALUE
   #
-  # Note: Secure Boot feature highly depends on the OpenSSL building. To 
enable this 
-  #   feature, please follow the instructions found in the file 
"Patch-HOWTO.txt" 
+  # Note: Secure Boot feature highly depends on the OpenSSL building. To 
enable this
+  #   feature, please follow the instructions found in the file 
"Patch-HOWTO.txt"
   #   located in CryptoPkg\Library\OpensslLib to enable the OpenSSL 
building first.
   #
   DEFINE SECURE_BOOT_ENABLE  = FALSE
-  
-  #
-  # This flag is to enable or disable TLS feature.  
-  # These can be changed on the command line.
-  # -D FLAG=VALUE
-  #
-  # Note: TLS feature highly depends on the OpenSSL building. To enable this 
-  #   feature, please follow the instructions found in the file 
"Patch-HOWTO.txt" 
-  #   located in CryptoPkg\Library\OpensslLib to enable the OpenSSL 
building first.
-  #
-  DEFINE TLS_ENABLE = FALSE
-  
-  #
-  # Indicates whether HTTP connections (i.e., unsecured) are permitted or not.
-  # -D FLAG=VALUE
-  #
-  # Note: If ALLOW_HTTP_CONNECTIONS is TRUE, HTTP connections are allowed. 
Both 
-  #   the "https://"; and "http://"; URI schemes are permitted. Otherwise, 
HTTP 
-  #   connections are denied. Only the "https://"; URI scheme is permitted.
-  #
-  DEFINE ALLOW_HTTP_CONNECTIONS = TRUE
 
   #
-  # This flag is to enable or disable IPv6 network stack.
-  # These can be changed on the command line.
-  # -D FLAG=VALUE
+  # SnpNt32Dxe.inf will be used.
   #
-  DEFINE NETWORK_IP6_ENABLE = FALSE
+  DEFINE NETWORK_SNP_ENABLE = FALSE
+  DEFINE NETWORK_IP6_ENABLE = FALSE
+  DEFINE NETWORK_TLS_ENABLE = FALSE
+  DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = TRUE
+!include NetworkPkg/NetworkDefines.dsc.inc
 
 

 #
@@ -133,18 +114,12 @@ [LibraryClasses]
   
DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
   
UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
   FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
-  
+
   #
   # Generic Modules
   #
   UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
   UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
-  NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
-  IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf
-  UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf
-  TcpIoLib|MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.inf
-  HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf
-  DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
   
OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
   GenericBdsLib|IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf
   
CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
@@ -153,6 +128,12 @@ [LibraryClasses]
   SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.inf
   CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
   BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
+
+  #
+  # Network libraries
+  #
+!include NetworkPkg/NetworkLibs.dsc.inc
+
   #
   # Platform
   #
@@ -168,12 +149,12 @@ [LibraryClasses]
   LockBoxLib|MdeModulePkg/Library/LockBoxNullLib/LockBoxNullLib.inf
   IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
   ResetSystemLib|Nt32Pkg/Library/ResetSystemLib/ResetSystemLib.inf
-!if $(TLS_ENABLE) == TRUE
+!if $(NETWORK_TLS_ENABLE) == TRUE
   OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
 !else
   OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
 !endif
-  
+
 !if $(SECURE_BOOT_ENABLE) == TRUE
   PlatformSecureLib|Nt32Pkg/Library/PlatformSecureLib/PlatformSecureLib.inf
   
TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.inf
@@ -245,7 +226,7 @@ [LibraryClasses.common.UEFI_DRIVER]
 [LibraryClasses.common.UEFI_APPLICATION]
   PcdLib

[edk2] [PATCH v2 1/6] NetworkPkg: Add DSC/FDF include segment files to NetworkPkg.

2018-11-21 Thread Fu Siyuan
This patch provides a set of include segment files for platform owner to
easily enable/disable network stack support on their platform.

For DSC, there are:
- a "NetworkDefines.dsc.inc" for the [Defines] section(s),
- a "NetworkLibs.dsc.inc" for the [LibraryClasses*] section(s),
- a "NetworkPcds.dsc.inc" for the [Pcds*] section(s),
- a "NetworkComponents.dsc.inc" for the [Components*] section(s).
For FDF, there is:
- a "Network.fdf.inc" for the [Fv*] section(s).

These files can be added to the platform DSC/FDF file by using
  !include NetworkPkg/xxx
where "xxx" is the *.inc file name.

A set of flags can be changed before the include line or in build command
line ("-D FLAG=VALUE") to enable or disable related feature set, please
check "NetworkDefines.dsc.inc" for a detail description of each flag.

The default value of these flags are:
  DEFINE NETWORK_ENABLE = TRUE
  DEFINE NETWORK_SNP_ENABLE = TRUE
  DEFINE NETWORK_IP4_ENABLE = TRUE
  DEFINE NETWORK_IP6_ENABLE = TRUE
  DEFINE NETWORK_TLS_ENABLE = TRUE
  DEFINE NETWORK_HTTP_BOOT_ENABLE   = TRUE
  DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = FALSE
  DEFINE NETWORK_IPSEC_ENABLE   = TRUE
  DEFINE NETWORK_ISCSI_ENABLE   = TRUE
  DEFINE NETWORK_VLAN_ENABLE= TRUE

Related BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1293

Cc: Jiaxin Wu 
Cc: Ting Ye 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Fu Siyuan 
---

Notes:
v2:
1. Split the "Network.dsc.inc" in to 4 files for different sections in DSC
file. This could provide more flexibility to platform owner to use the
include files.
2. Clarify the OpenSSL dependency of TLS, iSCSI and IPsec enable flag.
3. Use "!error" statement for incorrect flag value check.
4. Other decoration work according to Laszlo's comments.

 NetworkPkg/Network.fdf.inc   |  69 ++
 NetworkPkg/NetworkComponents.dsc.inc |  71 ++
 NetworkPkg/NetworkDefines.dsc.inc| 138 
 NetworkPkg/NetworkLibs.dsc.inc   |  25 
 NetworkPkg/NetworkPcds.dsc.inc   |  22 
 NetworkPkg/NetworkPkg.dsc|  28 +---
 6 files changed, 331 insertions(+), 22 deletions(-)

diff --git a/NetworkPkg/Network.fdf.inc b/NetworkPkg/Network.fdf.inc
new file mode 100644
index ..abd4c6c363d5
--- /dev/null
+++ b/NetworkPkg/Network.fdf.inc
@@ -0,0 +1,69 @@
+## @file
+# Network FDF include file for All Architectures.
+#
+# This file can be included to a platform FDF by using "!include 
NetworkPkg/Network.fdf.inc"
+# to add EDKII network stack drivers according to the value of flags described 
in
+# "NetworkDefines.dsc.inc".
+#
+# Copyright (c) 2018, Intel Corporation. All rights reserved.
+#
+#This program and the accompanying materials
+#are licensed and made available under the terms and conditions of the BSD 
License
+#which accompanies this distribution. The full text of the license may be 
found at
+#http://opensource.org/licenses/bsd-license.php
+#
+#THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+#WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR 
IMPLIED.
+#
+
+!if $(NETWORK_ENABLE) == TRUE
+  INF  MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
+
+  !if $(NETWORK_SNP_ENABLE) == TRUE
+INF  MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf
+  !endif
+
+  !if $(NETWORK_VLAN_ENABLE) == TRUE
+INF  MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
+  !endif
+
+  INF  MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
+
+  !if $(NETWORK_IP4_ENABLE) == TRUE
+INF  MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
+INF  MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
+INF  MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
+INF  MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
+INF  MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
+  !endif
+
+  !if $(NETWORK_IP6_ENABLE) == TRUE
+INF  NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
+INF  NetworkPkg/Ip6Dxe/Ip6Dxe.inf
+INF  NetworkPkg/Udp6Dxe/Udp6Dxe.inf
+INF  NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
+  !endif
+
+  INF  NetworkPkg/TcpDxe/TcpDxe.inf
+  INF  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
+
+  !if $(NETWORK_TLS_ENABLE) == TRUE
+INF  NetworkPkg/TlsDxe/TlsDxe.inf
+INF  NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
+  !endif
+
+  !if $(NETWORK_HTTP_BOOT_ENABLE) == TRUE
+INF  NetworkPkg/DnsDxe/DnsDxe.inf
+INF  NetworkPkg/HttpDxe/HttpDxe.inf
+INF  NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf
+INF  NetworkPkg/HttpBootDxe/HttpBootDxe.inf
+  !endif
+
+  !if $(NETWORK_ISCSI_ENABLE) == TRUE
+INF  NetworkPkg/IScsiDxe/IScsiDxe.inf
+  !endif
+
+  !if $(NETWORK_IPSEC_ENABLE) == TRUE
+INF  NetworkPkg/IpSecDxe/IpSecDxe.inf
+  !endif
+!

Re: [edk2] [PATCH 1/6] NetworkPkg: Add DSC/FDF include segment files to NetworkPkg.

2018-11-21 Thread Fu, Siyuan
Hi, Laszlo

> -Original Message-
> From: Laszlo Ersek [mailto:ler...@redhat.com]
> Sent: Wednesday, November 21, 2018 6:47 PM
> To: Fu, Siyuan 
> Cc: edk2-devel@lists.01.org; Ye, Ting ; Wu, Jiaxin
> 
> Subject: Re: [edk2] [PATCH 1/6] NetworkPkg: Add DSC/FDF include segment
> files to NetworkPkg.
> 
> On 11/21/18 06:28, Fu Siyuan wrote:
> > The "Network.dsc.inc" and "Network.fdf.inc" are added for platform owner
> to
> > easily enable/disable network stack support on their platform, by adding
> >   !include NetworkPkg/Network.dsc.inc
> > and
> >   !include NetworkPkg/Network.fdf.inc
> > to their platform DSC/FDF files.
> >
> > A set of flags can be changed before the include line or in build
> command
> > line ("-D FLAG=VALUE") to enable or disable related feature set.
> >
> > The default value of these flags are:
> >   DEFINE NETWORK_ENABLE = TRUE
> >   DEFINE NETWORK_SNP_ENABLE = TRUE
> >   DEFINE NETWORK_IP4_ENABLE = TRUE
> >   DEFINE NETWORK_IP6_ENABLE = TRUE
> >   DEFINE NETWORK_TLS_ENABLE = TRUE
> >   DEFINE NETWORK_HTTP_BOOT_ENABLE   = TRUE
> >   DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = FALSE
> >   DEFINE NETWORK_IPSEC_ENABLE = TRUE
> >   DEFINE NETWORK_ISCSI_ENABLE = TRUE
> >   DEFINE NETWORK_VLAN_ENABLE  = TRUE
> 
> (1) This table is inconsistent with regard to alignment. In some cases,
> there are attempts to align the equal signs, and the assigned values
> (such as NETWORK_ENABLE and NETWORK_ALLOW_HTTP_CONNECTIONS), however, as
> a whole, the table is inconsistent. Please align all the equal signs and
> the assigned values to the longest macro name, namely
> NETWORK_ALLOW_HTTP_CONNECTIONS.

Agree, I Will fix this in v2 patch.

> 
> > Detail description of each flag is in Network.dsc.inc file.
> >
> > Related BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1293
> >
> > Cc: Jiaxin Wu 
> > Cc: Ting Ye 
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Fu Siyuan 
> > ---
> >  NetworkPkg/Network.dsc.inc | 203 
> >  NetworkPkg/Network.fdf.inc |  81 
> >  2 files changed, 284 insertions(+)
> >
> > diff --git a/NetworkPkg/Network.dsc.inc b/NetworkPkg/Network.dsc.inc
> > new file mode 100644
> > index ..50cf93ba816a
> > --- /dev/null
> > +++ b/NetworkPkg/Network.dsc.inc
> > @@ -0,0 +1,203 @@
> > +## @file
> > +# Network DSC include file for All Architectures.
> > +#
> > +# This file can be included to a platform DSC by using "!include
> NetworkPkg/Network.dsc.inc"
> > +# to add edk2 network stack drivers.
> > +# Below flags can be changed on the command line to enable or disable
> related feature
> > +# support.
> > +#   -D FLAG=VALUE
> > +# The default value of these flags are:
> > +#   DEFINE NETWORK_ENABLE = TRUE
> > +#   DEFINE NETWORK_SNP_ENABLE = TRUE
> > +#   DEFINE NETWORK_IP4_ENABLE = TRUE
> > +#   DEFINE NETWORK_IP6_ENABLE = TRUE
> > +#   DEFINE NETWORK_TLS_ENABLE = TRUE
> > +#   DEFINE NETWORK_HTTP_BOOT_ENABLE   = TRUE
> > +#   DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = FALSE
> > +#   DEFINE NETWORK_IPSEC_ENABLE = TRUE
> > +#   DEFINE NETWORK_ISCSI_ENABLE = TRUE
> > +#   DEFINE NETWORK_VLAN_ENABLE  = TRUE
> 
> (2) Same as (1).
> 
> > +#
> > +# Copyright (c) 2018, Intel Corporation. All rights reserved.
> > +#
> > +#This program and the accompanying materials
> > +#are licensed and made available under the terms and conditions of
> the BSD License
> > +#which accompanies this distribution. The full text of the license
> may be found at
> > +#http://opensource.org/licenses/bsd-license.php
> > +#
> > +#THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS"
> BASIS,
> > +#WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS
> OR IMPLIED.
> > +#
> > +##
> > +
> > +[Defines]
> > +!ifndef NETWORK_ENABLE
> > +  #
> > +  # This flag is to enable or disable the whole network stack.
> > +  # These can be changed on the command line.
> > +  # -D FLAG=VALUE
> 
> (3) I suggest dropping the statement "These can be changed on the
> command line".
> 
> I also suggest dropping the generic "-D FLAG=VALUE" line.
> 
> Both of those apply to all settings, and they are well explained in the
> general description near the top.

You are correct. These lines were added before I wrote the file header, they 
are redundant
now since the 

[edk2] [PATCH 4/6] EmulatorPkg: Update DSC/FDF to use NetworkPkg's include fragment file.

2018-11-20 Thread Fu Siyuan
This patch updates the platform DSC/FDF files to use the include fragment
files provided by NetworkPkg.
The feature enabling flags in [Defines] section have been updated to use
the NetworkPkg's terms, and the value has been overridden with the original
default value on this platform.

Cc: Jordan Justen 
Cc: Andrew Fish 
Cc: Ruiyu Ni 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Fu Siyuan 
---
 EmulatorPkg/EmulatorPkg.dsc | 32 +---
 EmulatorPkg/EmulatorPkg.fdf | 10 +-
 2 files changed, 16 insertions(+), 26 deletions(-)

diff --git a/EmulatorPkg/EmulatorPkg.dsc b/EmulatorPkg/EmulatorPkg.dsc
index 4097e1192ebc..3609bc06bb29 100644
--- a/EmulatorPkg/EmulatorPkg.dsc
+++ b/EmulatorPkg/EmulatorPkg.dsc
@@ -29,6 +29,21 @@ [Defines]
   SKUID_IDENTIFIER   = DEFAULT
   FLASH_DEFINITION   = EmulatorPkg/EmulatorPkg.fdf
 
+  #
+  # Network stack drivers
+  #
+  
+  #
+  # EmuSnpDxe.inf will be used.
+  #
+  DEFINE NETWORK_SNP_ENABLE   = FALSE
+  DEFINE NETWORK_IP6_ENABLE   = FALSE
+  DEFINE NETWORK_TLS_ENABLE   = FALSE
+  DEFINE NETWORK_HTTP_BOOT_ENABLE = FALSE
+  DEFINE NETWORK_IPSEC_ENABLE = FALSE
+  DEFINE NETWORK_ISCSI_ENABLE = FALSE
+!include NetworkPkg/Network.dsc.inc
+
 [SkuIds]
   0|DEFAULT
 
@@ -74,10 +89,6 @@ [LibraryClasses]
   # Generic Modules
   #
   UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
-  NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
-  IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf
-  UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf
-  DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
   
OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
   BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
   FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
@@ -365,19 +376,6 @@ [Components]
 
   MdeModulePkg/Application/HelloWorld/HelloWorld.inf
 
-  #
-  # Network stack drivers
-  #
-  MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
-  MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
-  MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
-  MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
-  MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
-  MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
-  MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
-  MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
-  NetworkPkg/TcpDxe/TcpDxe.inf
-
   MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
   MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
   MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
diff --git a/EmulatorPkg/EmulatorPkg.fdf b/EmulatorPkg/EmulatorPkg.fdf
index 45697da25860..a8b46be66083 100644
--- a/EmulatorPkg/EmulatorPkg.fdf
+++ b/EmulatorPkg/EmulatorPkg.fdf
@@ -196,15 +196,7 @@ [FV.FvRecovery]
 !if $(NETWORK_SUPPORT)
 INF  EmulatorPkg/EmuSnpDxe/EmuSnpDxe.inf
 !endif
-INF  MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
-INF  MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
-INF  MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
-INF  MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
-INF  MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
-INF  MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
-INF  MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
-INF  NetworkPkg/TcpDxe/TcpDxe.inf
-INF  MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
+!include NetworkPkg/Network.fdf.inc
 
 INF FatPkg/EnhancedFatDxe/Fat.inf
 
-- 
2.19.1.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH 6/6] Vlv2TbltDevicePkg: Update DSC/FDF to use NetworkPkg's include fragment file.

2018-11-20 Thread Fu Siyuan
This patch updates the platform DSC/FDF files to use the include fragment
files provided by NetworkPkg.
The feature enabling flags in [Defines] section have been updated to use
the NetworkPkg's terms, and the value has been overridden with the original
default value on this platform.

Cc: David Wei 
Cc: Mang Guo 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Fu Siyuan 
---
 Vlv2TbltDevicePkg/PlatformPkg.fdf   | 25 +---
 Vlv2TbltDevicePkg/PlatformPkgConfig.dsc |  3 ++
 Vlv2TbltDevicePkg/PlatformPkgGcc.fdf| 25 +---
 Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc | 42 +++-
 Vlv2TbltDevicePkg/PlatformPkgIA32.dsc   | 42 +++-
 Vlv2TbltDevicePkg/PlatformPkgX64.dsc| 42 +++-
 6 files changed, 20 insertions(+), 159 deletions(-)

diff --git a/Vlv2TbltDevicePkg/PlatformPkg.fdf 
b/Vlv2TbltDevicePkg/PlatformPkg.fdf
index f976b9fa4057..e281d1407fc2 100644
--- a/Vlv2TbltDevicePkg/PlatformPkg.fdf
+++ b/Vlv2TbltDevicePkg/PlatformPkg.fdf
@@ -728,35 +728,12 @@ [FV.FVMAIN]
 #
 # Network Modules
 #
+!include NetworkPkg/Network.fdf.inc
 !if $(NETWORK_ENABLE) == TRUE
   FILE DRIVER = 22DE1691-D65D-456a-993E-A253DD1F308C {
 SECTION PE32 = 
Vlv2MiscBinariesPkg/UNDI/RtkUndiDxe/$(DXE_ARCHITECTURE)/RtkUndiDxe.efi
 SECTION UI = "UNDI"
   }
-  INF  MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf
-  INF  MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
-  INF  MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
-  INF  MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
-  INF  MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
-  INF  MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
-  INF  MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
-  INF  MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
-  INF  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  INF  NetworkPkg/TcpDxe/TcpDxe.inf
-  INF  NetworkPkg/IScsiDxe/IScsiDxe.inf
-  !if $(NETWORK_IP6_ENABLE) == TRUE
-  INF  NetworkPkg/Ip6Dxe/Ip6Dxe.inf
-  INF  NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
-  INF  NetworkPkg/IpSecDxe/IpSecDxe.inf
-  INF  NetworkPkg/Udp6Dxe/Udp6Dxe.inf
-  INF  NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
-  !endif
-  !if $(NETWORK_VLAN_ENABLE) == TRUE
-  INF  MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
-  !endif
-  !if $(NETWORK_ISCSI_ENABLE) == TRUE
-INF  NetworkPkg/IScsiDxe/IScsiDxe.inf
-  !endif
 !endif
 
 !if $(CAPSULE_ENABLE)
diff --git a/Vlv2TbltDevicePkg/PlatformPkgConfig.dsc 
b/Vlv2TbltDevicePkg/PlatformPkgConfig.dsc
index 672853dda6a6..63a5b00b43bd 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgConfig.dsc
+++ b/Vlv2TbltDevicePkg/PlatformPkgConfig.dsc
@@ -85,6 +85,9 @@
 DEFINE NETWORK_IP6_ENABLE = TRUE
 DEFINE NETWORK_ISCSI_ENABLE = FALSE
 DEFINE NETWORK_VLAN_ENABLE = FALSE
+DEFINE NETWORK_TLS_ENABLE = FALSE
+DEFINE NETWORK_HTTP_BOOT_ENABLE   = FALSE
+DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = FALSE
 
 DEFINE SATA_ENABLE   = TRUE
 DEFINE PCIESC_ENABLE = TRUE
diff --git a/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf 
b/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
index 50032f7d5f19..6ea0ec92d4ae 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
+++ b/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
@@ -684,35 +684,12 @@ [FV.FVMAIN]
 #
 # Network Modules
 #
+!include NetworkPkg/Network.fdf.inc
 !if $(NETWORK_ENABLE) == TRUE
   FILE DRIVER = 22DE1691-D65D-456a-993E-A253DD1F308C {
 SECTION PE32 = 
Vlv2MiscBinariesPkg/UNDI/RtkUndiDxe/$(DXE_ARCHITECTURE)/RtkUndiDxe.efi
 SECTION UI = "UNDI"
   }
-  INF  MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf
-  INF  MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
-  INF  MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
-  INF  MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
-  INF  MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
-  INF  MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
-  INF  MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
-  INF  MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
-  INF  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  INF  NetworkPkg/TcpDxe/TcpDxe.inf
-  INF  NetworkPkg/IScsiDxe/IScsiDxe.inf
-  !if $(NETWORK_IP6_ENABLE) == TRUE
-  INF  NetworkPkg/Ip6Dxe/Ip6Dxe.inf
-  INF  NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
-  INF  NetworkPkg/IpSecDxe/IpSecDxe.inf
-  INF  NetworkPkg/Udp6Dxe/Udp6Dxe.inf
-  INF  NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
-  !endif
-  !if $(NETWORK_VLAN_ENABLE) == TRUE
-  INF  MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
-  !endif
-  !if $(NETWORK_ISCSI_ENABLE) == TRUE
-INF  NetworkPkg/IScsiDxe/IScsiDxe.inf
-  !endif
 !endif
 
 !if $(CAPSULE_ENABLE)
diff --git a/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc 
b/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
index f8ad29df5986..219ddd1646e5 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
+++ b/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
@@ -56,6 +56,11 @@ [Defines]
   !include $(PLATFORM_PACKAGE)/AutoPlatformCFG.txt
   !include $(PLATFORM_PACKAGE)/PlatformPkgConfig.dsc
 
+  #
+  # Network Stacks
+ 

[edk2] [PATCH 2/6] Nt32Pkg: Update DSC/FDF to use NetworkPkg's include fragment file.

2018-11-20 Thread Fu Siyuan
This patch updates the platform DSC/FDF files to use the include fragment
files provided by NetworkPkg.
The feature enabling flags in [Defines] section have be updated to use the
NetworkPkg's terms, and the value have been overridden with the original
default value on this platform.

Cc: Ruiyu Ni 
Cc: Hao Wu 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Fu Siyuan 
---
 Nt32Pkg/Nt32Pkg.dsc | 71 ++--
 Nt32Pkg/Nt32Pkg.fdf | 27 +---
 2 files changed, 8 insertions(+), 90 deletions(-)

diff --git a/Nt32Pkg/Nt32Pkg.dsc b/Nt32Pkg/Nt32Pkg.dsc
index 4dbde0cc45b6..8cd29b27b0a2 100644
--- a/Nt32Pkg/Nt32Pkg.dsc
+++ b/Nt32Pkg/Nt32Pkg.dsc
@@ -49,34 +49,15 @@ [Defines]
   #   located in CryptoPkg\Library\OpensslLib to enable the OpenSSL 
building first.
   #
   DEFINE SECURE_BOOT_ENABLE  = FALSE
-  
-  #
-  # This flag is to enable or disable TLS feature.  
-  # These can be changed on the command line.
-  # -D FLAG=VALUE
-  #
-  # Note: TLS feature highly depends on the OpenSSL building. To enable this 
-  #   feature, please follow the instructions found in the file 
"Patch-HOWTO.txt" 
-  #   located in CryptoPkg\Library\OpensslLib to enable the OpenSSL 
building first.
-  #
-  DEFINE TLS_ENABLE = FALSE
-  
-  #
-  # Indicates whether HTTP connections (i.e., unsecured) are permitted or not.
-  # -D FLAG=VALUE
-  #
-  # Note: If ALLOW_HTTP_CONNECTIONS is TRUE, HTTP connections are allowed. 
Both 
-  #   the "https://"; and "http://"; URI schemes are permitted. Otherwise, 
HTTP 
-  #   connections are denied. Only the "https://"; URI scheme is permitted.
-  #
-  DEFINE ALLOW_HTTP_CONNECTIONS = TRUE
 
   #
-  # This flag is to enable or disable IPv6 network stack.
-  # These can be changed on the command line.
-  # -D FLAG=VALUE
+  # SnpNt32Dxe.inf will be used.
   #
+  DEFINE NETWORK_SNP_ENABLE = FALSE
   DEFINE NETWORK_IP6_ENABLE = FALSE
+  DEFINE NETWORK_TLS_ENABLE = FALSE
+  DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = TRUE
+!include NetworkPkg/Network.dsc.inc
 
 

 #
@@ -139,12 +120,6 @@ [LibraryClasses]
   #
   UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
   UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
-  NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
-  IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf
-  UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf
-  TcpIoLib|MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.inf
-  HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf
-  DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
   
OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
   GenericBdsLib|IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf
   
CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
@@ -276,11 +251,6 @@ [PcdsFixedAtBuild]
   gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000
 
-!if $(ALLOW_HTTP_CONNECTIONS) == TRUE
-  gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections|TRUE
-!endif
-
-
 !if $(SECURE_BOOT_ENABLE) == TRUE
   # override the default values from SecurityPkg to ensure images from all 
sources are verified in secure boot
   gEfiSecurityPkgTokenSpaceGuid.PcdOptionRomImageVerificationPolicy|0x04
@@ -454,39 +424,10 @@ [Components]
   MdeModulePkg/Application/HelloWorld/HelloWorld.inf
 
   #
-  # Network stack drivers
+  # Network SNP drivers
   # To test network drivers, need network Io driver(SnpNt32Io.dll), please 
refer to NETWORK-IO Subproject.
   #
-  MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
-  MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
-  MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
-  MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
-  MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
-  MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
-  MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
-  MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
-  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  NetworkPkg/TcpDxe/TcpDxe.inf
-  NetworkPkg/IScsiDxe/IScsiDxe.inf
   Nt32Pkg/SnpNt32Dxe/SnpNt32Dxe.inf
-
-!if $(NETWORK_IP6_ENABLE) == TRUE
-  NetworkPkg/Ip6Dxe/Ip6Dxe.inf
-  NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
-  NetworkPkg/Udp6Dxe/Udp6Dxe.inf
-  NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
-!endif
-
-  NetworkPkg/HttpBootDxe/HttpBootDxe.inf
-  NetworkPkg/DnsDxe/DnsDxe.inf
-  NetworkPkg/HttpDxe/HttpDxe.inf
-  NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf
-   
-!if $(TLS_ENABLE) == TRUE
-  NetworkPkg/TlsDxe/TlsDxe.inf
-  NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
-!endif
-
   MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
   MdeModulePkg/Application/UiApp/UiApp.inf{
 
diff --git a/Nt32Pkg/Nt32Pkg.fdf b/Nt32Pkg/Nt32Pkg.fdf
index b65c95201b36..3e7b4477f753 100644
--- a/

[edk2] [PATCH 3/6] ArmVirtPkg: Update DSC/FDF to use NetworkPkg's include fragment file.

2018-11-20 Thread Fu Siyuan
This patch updates the platform DSC/FDF files to use the include fragment
files provided by NetworkPkg.
The feature enabling flags in [Defines] section have been updated to use
the NetworkPkg's terms, and the value has been overridden with the original
default value on this platform.

Cc: Laszlo Ersek 
Cc: Ard Biesheuvel 
Cc: Julien Grall 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Fu Siyuan 
---
 ArmVirtPkg/ArmVirt.dsc.inc   | 12 --
 ArmVirtPkg/ArmVirtQemu.dsc   | 44 
 ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc | 28 +
 ArmVirtPkg/ArmVirtQemuKernel.dsc | 38 +++--
 4 files changed, 14 insertions(+), 108 deletions(-)

diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc
index 70a0ac4d786c..24a064198b5e 100644
--- a/ArmVirtPkg/ArmVirt.dsc.inc
+++ b/ArmVirtPkg/ArmVirt.dsc.inc
@@ -75,18 +75,6 @@ [LibraryClasses.common]
   # use the accelerated BaseMemoryLibOptDxe by default, overrides for SEC/PEI 
below
   BaseMemoryLib|MdePkg/Library/BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.inf
 
-  # Networking Requirements
-  NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
-  DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
-  UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf
-  IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf
-!if $(NETWORK_IP6_ENABLE) == TRUE
-  TcpIoLib|MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.inf
-!endif
-!if $(HTTP_BOOT_ENABLE) == TRUE
-  HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf
-!endif
-
   #
   # It is not possible to prevent the ARM compiler from inserting calls to 
intrinsic functions.
   # This library provides the instrinsic functions such a compiler may 
generate calls to.
diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
index 885c6b14b844..5a1b6b0f0519 100644
--- a/ArmVirtPkg/ArmVirtQemu.dsc
+++ b/ArmVirtPkg/ArmVirtQemu.dsc
@@ -35,9 +35,14 @@ [Defines]
   #
   DEFINE SECURE_BOOT_ENABLE  = FALSE
   DEFINE NETWORK_IP6_ENABLE  = FALSE
-  DEFINE HTTP_BOOT_ENABLE= FALSE
-
+  DEFINE NETWORK_HTTP_BOOT_ENABLE= FALSE
+  DEFINE NETWORK_SNP_ENABLE  = FALSE
+  DEFINE NETWORK_TLS_ENABLE  = FALSE
+  DEFINE NETWORK_IPSEC_ENABLE= FALSE
+  DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS  = TRUE
+  
 !include ArmVirtPkg/ArmVirt.dsc.inc
+!include NetworkPkg/Network.dsc.inc
 
 [LibraryClasses.common]
   ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf
@@ -123,10 +128,6 @@ [PcdsFixedAtBuild.common]
   #
   gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|0
 
-!if $(HTTP_BOOT_ENABLE) == TRUE
-  gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections|TRUE
-!endif
-
   # System Memory Base -- fixed at 0x4000_
   gArmTokenSpaceGuid.PcdSystemMemoryBase|0x4000
 
@@ -335,37 +336,6 @@ [Components.common]
   
NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf
   }
 
-  #
-  # Networking stack
-  #
-  MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
-  MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
-  MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
-  MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
-  MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
-  MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
-  MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
-  MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
-!if $(NETWORK_IP6_ENABLE) == TRUE
-  NetworkPkg/Ip6Dxe/Ip6Dxe.inf
-  NetworkPkg/TcpDxe/TcpDxe.inf
-  NetworkPkg/Udp6Dxe/Udp6Dxe.inf
-  NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
-  NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
-  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  NetworkPkg/IScsiDxe/IScsiDxe.inf
-!else
-  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
-  MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
-!endif
-!if $(HTTP_BOOT_ENABLE) == TRUE
-  NetworkPkg/DnsDxe/DnsDxe.inf
-  NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf
-  NetworkPkg/HttpDxe/HttpDxe.inf
-  NetworkPkg/HttpBootDxe/HttpBootDxe.inf
-!endif
-
   #
   # SCSI Bus and Disk Driver
   #
diff --git a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc 
b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
index a6390bd4b841..560651e49e0b 100644
--- a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
+++ b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
@@ -118,33 +118,7 @@ [FV.FvMain]
   #
   # Networking stack
   #
-  INF MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
-  INF MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
-  INF MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
-  INF MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
-  INF MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
-  INF MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
-  INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
-  INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
-!if $(NETWORK_IP6_ENABLE) == TRUE
-  INF NetworkPkg/Ip6Dxe/Ip6Dxe.inf
-  INF NetworkPkg/TcpDxe/TcpDxe.inf
-  INF NetworkPkg/Ud

[edk2] [PATCH 5/6] OvmfPkg: Update DSC/FDF to use NetworkPkg's include fragment file.

2018-11-20 Thread Fu Siyuan
This patch updates the platform DSC/FDF files to use the include fragment
files provided by NetworkPkg.
The feature enabling flags in [Defines] section have been updated to use
the NetworkPkg's terms, and the value has been overridden with the original
default value on this platform.

Cc: Jordan Justen 
Cc: Laszlo Ersek 
Cc: Ard Biesheuvel 
Cc: Anthony Perard 
Cc: Julien Grall 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Fu Siyuan 
---
 OvmfPkg/OvmfPkgIa32.dsc| 52 ---
 OvmfPkg/OvmfPkgIa32.fdf| 25 +
 OvmfPkg/OvmfPkgIa32X64.dsc | 53 
 OvmfPkg/OvmfPkgIa32X64.fdf | 25 +
 OvmfPkg/OvmfPkgX64.dsc | 52 ---
 OvmfPkg/OvmfPkgX64.fdf | 25 +
 6 files changed, 36 insertions(+), 196 deletions(-)

diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
index eccf34d3d1cb..5d6ea3e67001 100644
--- a/OvmfPkg/OvmfPkgIa32.dsc
+++ b/OvmfPkg/OvmfPkgIa32.dsc
@@ -35,12 +35,21 @@ [Defines]
   # -D FLAG=VALUE
   #
   DEFINE SECURE_BOOT_ENABLE  = FALSE
-  DEFINE NETWORK_IP6_ENABLE  = FALSE
-  DEFINE HTTP_BOOT_ENABLE= FALSE
   DEFINE SMM_REQUIRE = FALSE
   DEFINE TLS_ENABLE  = FALSE
   DEFINE TPM2_ENABLE = FALSE
 
+  DEFINE NETWORK_IP6_ENABLE = FALSE
+  #
+  # TLS_ENABLE flag is used to control platform specific configuration for TLS 
support.
+  # NETWORK_TLS_ENABLE should always be set to FALSE.
+  #
+  DEFINE NETWORK_TLS_ENABLE = FALSE
+  DEFINE NETWORK_HTTP_BOOT_ENABLE   = FALSE
+  DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = FALSE
+  DEFINE NETWORK_IPSEC_ENABLE = FALSE
+!include NetworkPkg/Network.dsc.inc
+
   #
   # Flash size selection. Setting FD_SIZE_IN_KB on the command line directly to
   # one of the supported values, in place of any of the convenience macros, is
@@ -144,10 +153,6 @@ [LibraryClasses]
   FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
   UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
   
SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
-  NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
-  IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf
-  UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf
-  DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
   UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
   
SerializeVariablesLib|OvmfPkg/Library/SerializeVariablesLib/SerializeVariablesLib.inf
   QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgDxeLib.inf
@@ -191,10 +196,6 @@ [LibraryClasses]
 
   TcpIoLib|MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.inf
 
-!if $(HTTP_BOOT_ENABLE) == TRUE
-  HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf
-!endif
-
 !if $(TLS_ENABLE) == TRUE
   TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf
 !endif
@@ -504,10 +505,6 @@ [PcdsFixedAtBuild]
   gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugLoadImageMethod|0x2
 !endif
 
-!if $(HTTP_BOOT_ENABLE) == TRUE
-  gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections|TRUE
-!endif
-
   gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile|{ 0x83, 0xA5, 0x04, 
0x7C, 0x3E, 0x9E, 0x1C, 0x4F, 0xAD, 0x65, 0xE0, 0x52, 0x68, 0xD0, 0xB4, 0xD1 }
 
 !if $(SMM_REQUIRE) == TRUE
@@ -774,33 +771,6 @@ [Components]
   MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf
   
MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
 
-  #
-  # Network Support
-  #
-  MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf
-  MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
-  MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
-  MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
-  MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
-  MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
-  MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
-  MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
-  MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
-  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  NetworkPkg/TcpDxe/TcpDxe.inf
-  NetworkPkg/IScsiDxe/IScsiDxe.inf
-!if $(NETWORK_IP6_ENABLE) == TRUE
-  NetworkPkg/Ip6Dxe/Ip6Dxe.inf
-  NetworkPkg/Udp6Dxe/Udp6Dxe.inf
-  NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
-  NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
-!endif
-!if $(HTTP_BOOT_ENABLE) == TRUE
-  NetworkPkg/DnsDxe/DnsDxe.inf
-  NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf
-  NetworkPkg/HttpDxe/HttpDxe.inf
-  NetworkPkg/HttpBootDxe/HttpBootDxe.inf
-!endif
 !if $(TLS_ENABLE) == TRUE
   NetworkPkg/TlsDxe/TlsDxe.inf
   NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf {
diff --git a/OvmfPkg/OvmfPkgIa32.fdf b/OvmfPkg/OvmfPkgIa32.fdf
index f7f9ab06bb5a..185b5a385ee3 100644
--- a/OvmfPkg/OvmfPkgIa32.fdf
+++ b/OvmfPkg/OvmfPkgIa32.fdf
@@ -296,30 +296,7 @@ [FV.DXEFV]
 #
 # Network modules
 #
-  INF  MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf
-  INF  MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
-  INF  MdeModulePkg/Universal/Network/MnpDxe/MnpDx

[edk2] [PATCH 0/6] Add DSC/FDF include segment files for network stack

2018-11-20 Thread Fu Siyuan
There is a patch to remove the redudant IP4 only iSCSI/PXE/TCP drivers
from MdeModulePkg, which has been reviewed before edk2-stable201811 tag.
And we also have plan to move all network related libraries/modules to
NetworkPkg. In order to make these change more smoothly, 2 configuration
fragment files are provided for platform to enable the network stack
support, without directly reference the INF module path.

Patch 1/6 adds 2 centralized dsc/fdf include files to NetworkPkg, with
a set of flags for feature set enable/disable.
Patch 2~6 updates edk2 platform dsc/fdf files to use the new include
files, instead of reference the module INF.


Fu Siyuan (6):
  NetworkPkg: Add DSC/FDF include segment files to NetworkPkg.
  Nt32Pkg: Update DSC/FDF to use NetworkPkg's include fragment file.
  ArmVirtPkg: Update DSC/FDF to use NetworkPkg's include fragment file.
  EmulatorPkg: Update DSC/FDF to use NetworkPkg's include fragment file.
  OvmfPkg: Update DSC/FDF to use NetworkPkg's include fragment file.
  Vlv2TbltDevicePkg: Update DSC/FDF to use NetworkPkg's include fragment
file.

 ArmVirtPkg/ArmVirt.dsc.inc  |  12 --
 ArmVirtPkg/ArmVirtQemu.dsc  |  44 +
 ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc|  28 +--
 ArmVirtPkg/ArmVirtQemuKernel.dsc|  38 +---
 EmulatorPkg/EmulatorPkg.dsc |  32 ++-
 EmulatorPkg/EmulatorPkg.fdf |  10 +-
 NetworkPkg/Network.dsc.inc  | 203 
 NetworkPkg/Network.fdf.inc  |  81 
 Nt32Pkg/Nt32Pkg.dsc |  71 +--
 Nt32Pkg/Nt32Pkg.fdf |  27 +--
 OvmfPkg/OvmfPkgIa32.dsc |  52 ++---
 OvmfPkg/OvmfPkgIa32.fdf |  25 +--
 OvmfPkg/OvmfPkgIa32X64.dsc  |  53 ++---
 OvmfPkg/OvmfPkgIa32X64.fdf  |  25 +--
 OvmfPkg/OvmfPkgX64.dsc  |  52 ++---
 OvmfPkg/OvmfPkgX64.fdf  |  25 +--
 Vlv2TbltDevicePkg/PlatformPkg.fdf   |  25 +--
 Vlv2TbltDevicePkg/PlatformPkgConfig.dsc |   3 +
 Vlv2TbltDevicePkg/PlatformPkgGcc.fdf|  25 +--
 Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc |  42 +---
 Vlv2TbltDevicePkg/PlatformPkgIA32.dsc   |  42 +---
 Vlv2TbltDevicePkg/PlatformPkgX64.dsc|  42 +---
 22 files changed, 378 insertions(+), 579 deletions(-)
 create mode 100644 NetworkPkg/Network.dsc.inc
 create mode 100644 NetworkPkg/Network.fdf.inc

Cc: Jiaxin Wu 
Cc: Ting Ye 
Cc: Ruiyu Ni 
Cc: Hao Wu 
Cc: Laszlo Ersek 
Cc: Ard Biesheuvel 
Cc: Julien Grall 
Cc: Jordan Justen 
Cc: Andrew Fish 
Cc: Ruiyu Ni 
Cc: Anthony Perard 
Cc: David Wei 
Cc: Mang Guo 
-- 
2.19.1.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH 1/6] NetworkPkg: Add DSC/FDF include segment files to NetworkPkg.

2018-11-20 Thread Fu Siyuan
The "Network.dsc.inc" and "Network.fdf.inc" are added for platform owner to
easily enable/disable network stack support on their platform, by adding
  !include NetworkPkg/Network.dsc.inc
and
  !include NetworkPkg/Network.fdf.inc
to their platform DSC/FDF files.

A set of flags can be changed before the include line or in build command
line ("-D FLAG=VALUE") to enable or disable related feature set.

The default value of these flags are:
  DEFINE NETWORK_ENABLE = TRUE
  DEFINE NETWORK_SNP_ENABLE = TRUE
  DEFINE NETWORK_IP4_ENABLE = TRUE
  DEFINE NETWORK_IP6_ENABLE = TRUE
  DEFINE NETWORK_TLS_ENABLE = TRUE
  DEFINE NETWORK_HTTP_BOOT_ENABLE   = TRUE
  DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = FALSE
  DEFINE NETWORK_IPSEC_ENABLE = TRUE
  DEFINE NETWORK_ISCSI_ENABLE = TRUE
  DEFINE NETWORK_VLAN_ENABLE  = TRUE
Detail description of each flag is in Network.dsc.inc file.

Related BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1293

Cc: Jiaxin Wu 
Cc: Ting Ye 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Fu Siyuan 
---
 NetworkPkg/Network.dsc.inc | 203 
 NetworkPkg/Network.fdf.inc |  81 
 2 files changed, 284 insertions(+)

diff --git a/NetworkPkg/Network.dsc.inc b/NetworkPkg/Network.dsc.inc
new file mode 100644
index ..50cf93ba816a
--- /dev/null
+++ b/NetworkPkg/Network.dsc.inc
@@ -0,0 +1,203 @@
+## @file
+# Network DSC include file for All Architectures.
+#
+# This file can be included to a platform DSC by using "!include 
NetworkPkg/Network.dsc.inc" 
+# to add edk2 network stack drivers.
+# Below flags can be changed on the command line to enable or disable related 
feature
+# support.
+#   -D FLAG=VALUE
+# The default value of these flags are:
+#   DEFINE NETWORK_ENABLE = TRUE
+#   DEFINE NETWORK_SNP_ENABLE = TRUE
+#   DEFINE NETWORK_IP4_ENABLE = TRUE
+#   DEFINE NETWORK_IP6_ENABLE = TRUE
+#   DEFINE NETWORK_TLS_ENABLE = TRUE
+#   DEFINE NETWORK_HTTP_BOOT_ENABLE   = TRUE
+#   DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = FALSE
+#   DEFINE NETWORK_IPSEC_ENABLE = TRUE
+#   DEFINE NETWORK_ISCSI_ENABLE = TRUE
+#   DEFINE NETWORK_VLAN_ENABLE  = TRUE
+#
+# Copyright (c) 2018, Intel Corporation. All rights reserved.
+#
+#This program and the accompanying materials
+#are licensed and made available under the terms and conditions of the BSD 
License
+#which accompanies this distribution. The full text of the license may be 
found at
+#http://opensource.org/licenses/bsd-license.php
+#
+#THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+#WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR 
IMPLIED.
+#
+##
+
+[Defines]
+!ifndef NETWORK_ENABLE
+  #
+  # This flag is to enable or disable the whole network stack.  
+  # These can be changed on the command line.
+  # -D FLAG=VALUE
+  #
+  DEFINE NETWORK_ENABLE = TRUE
+!endif
+
+!ifndef NETWORK_SNP_ENABLE
+  #
+  # This flag is to include the common SNP driver or not.
+  # These can be changed on the command line.
+  # -D FLAG=VALUE
+  #
+  DEFINE NETWORK_SNP_ENABLE = TRUE
+!endif
+
+!ifndef NETWORK_IP4_ENABLE
+  #
+  # This flag is to enable or disable IPv4 network stack.
+  # These can be changed on the command line.
+  # -D FLAG=VALUE
+  #
+  DEFINE NETWORK_IP4_ENABLE = TRUE
+!endif
+
+!ifndef NETWORK_IP6_ENABLE
+  #
+  # This flag is to enable or disable IPv6 network stack.
+  # These can be changed on the command line.
+  # -D FLAG=VALUE
+  #
+  DEFINE NETWORK_IP6_ENABLE = TRUE
+!endif
+
+!ifndef NETWORK_TLS_ENABLE
+  #
+  # This flag is to enable or disable TLS feature.  
+  # These can be changed on the command line.
+  # -D FLAG=VALUE
+  #
+  # Note: TLS feature highly depends on the OpenSSL building. To enable this 
+  #   feature, please follow the instructions found in the file 
"Patch-HOWTO.txt" 
+  #   located in CryptoPkg\Library\OpensslLib to enable the OpenSSL 
building first.
+  #
+  DEFINE NETWORK_TLS_ENABLE = TRUE
+!endif
+
+!ifndef NETWORK_HTTP_BOOT_ENABLE
+  #
+  # This flag is to enable or disable HTTP(s) boot feature.  
+  # These can be changed on the command line.
+  # -D FLAG=VALUE
+  #
+  DEFINE NETWORK_HTTP_BOOT_ENABLE = TRUE
+!endif
+
+!ifndef NETWORK_ALLOW_HTTP_CONNECTIONS
+  #
+  # Indicates whether HTTP connections (i.e., unsecured) are permitted or not.
+  # -D FLAG=VALUE
+  #
+  # Note: If NETWORK_ALLOW_HTTP_CONNECTIONS is TRUE, HTTP connections are 
allowed.
+  #   Both the "https://"; and "http://"; URI schemes are permitted. 
Otherwise, HTTP 
+  #   connections are denied. Only the "https://"; URI scheme is permitted.
+  #
+  DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = FALSE
+!endif
+
+!ifndef NETWORK_IPSEC_ENABLE
+  #
+  # This flag is to enable or disable IPsec feature.
+  # These can be changed on the command line.
+  # -D FLAG=VALUE
+  #
+  DEFINE NETWORK_IPSEC_ENABLE = TRUE
+!endif
+
+!ifndef NETW

Re: [edk2] [PATCH] NetworkPkg/IScsiDxe: add debug logs for failed SetVariable attempts

2018-11-20 Thread Fu, Siyuan



Reviewed-by: Fu Siyuan 

> -Original Message-
> From: Vijayenthiran Subramaniam [mailto:vijayenthiran.subraman...@arm.com]
> Sent: Tuesday, November 20, 2018 6:40 PM
> To: edk2-devel@lists.01.org; Fu, Siyuan ; Wu, Jiaxin
> 
> Cc: Vijayenthiran Subramaniam 
> Subject: [PATCH] NetworkPkg/IScsiDxe: add debug logs for failed
> SetVariable attempts
> 
> Add debug messages for failed attempts to write to a variable.
> 
> Cc: Siyuan Fu 
> Cc: Jiaxin Wu 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Vijayenthiran Subramaniam
> 
> ---
>  NetworkPkg/IScsiDxe/IScsiMisc.c | 4 
>  1 file changed, 4 insertions(+)
> 
> diff --git a/NetworkPkg/IScsiDxe/IScsiMisc.c
> b/NetworkPkg/IScsiDxe/IScsiMisc.c
> index dd0d32dcda16..46760d79a8f3 100644
> --- a/NetworkPkg/IScsiDxe/IScsiMisc.c
> +++ b/NetworkPkg/IScsiDxe/IScsiMisc.c
> @@ -845,6 +845,8 @@ IScsiCreateAttempts (
>  );
>  FreePool (AttemptConfigOrder);
>  if (EFI_ERROR (Status)) {
> +  DEBUG ((DEBUG_ERROR, "%a: SetVariable failed with return: %r\n",
> +__FUNCTION__, Status));
>return Status;
>  }
> 
> @@ -887,6 +889,8 @@ IScsiCreateAttempts (
>  );
>  FreePool (AttemptConfigData);
>  if (EFI_ERROR (Status)) {
> +  DEBUG ((DEBUG_ERROR, "%a: SetVariable failed with return: %r\n",
> +__FUNCTION__, Status));
>return Status;
>  }
>}
> --
> 2.17.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v2 2/2] Edk2Platforms: Replace MdeModulePkg PXE/iSCSI/TCP with NetworkPkg drivers.

2018-11-11 Thread Fu, Siyuan
Hi, Thomas

> -Original Message-
> From: Thomas Abraham [mailto:thomas.abra...@arm.com]
> Sent: Friday, November 9, 2018 9:56 PM
> To: Leif Lindholm 
> Cc: Fu, Siyuan ; Kinney, Michael D
> ; edk2-devel@lists.01.org
> Subject: Re: [edk2] [PATCH v2 2/2] Edk2Platforms: Replace MdeModulePkg
> PXE/iSCSI/TCP with NetworkPkg drivers.
> 
> On Wed, Nov 7, 2018 at 1:55 PM Leif Lindholm 
> wrote:
> >
> > Hi Fu Siyan,
> >
> > On Wed, Nov 07, 2018 at 08:12:55AM +, Fu, Siyuan wrote:
> > > Hi, Leif and Ard
> > >
> > > I just realized that you may not be CCed in this email. I resent these
> patches a few minutes ago, my Git Bash send-email reports it added you to
> CC receiver, but the Outlook received email still doesn't have your name
> in CC list.
> > >
> > > Do you have any comments for this v2 patch of the edk2platforms?
> > >
> > >
> > > BestRegards
> > > Fu Siyuan
> > >
> > > > -Original Message-
> > > > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf
> Of Fu
> > > > Siyuan
> > > > Sent: Monday, November 5, 2018 9:33 AM
> > > > To: edk2-devel@lists.01.org
> > > > Cc: Kinney, Michael D 
> > > > Subject: [edk2] [PATCH v2 2/2] Edk2Platforms: Replace MdeModulePkg
> > > > PXE/iSCSI/TCP with NetworkPkg drivers.
> > > >
> > > > V2:
> > > > Additional fixups required for NetworkPkg migration
> >
> > Revision history like this belongs in the cover letter.
> >
> > > > The PXE/iSCSI/TCP drivers in MdeModulePkg are going to be deprecated.
> All
> > > > platform DSC/FDF files should be updated to use the dual-stack
> drivers in
> > > > NetworkPkg.
> > > >
> > > > The NetworkPkg driver have all the functionality compared with
> > > > MdeModulePkg
> > > > one, with more bug fixes and new feature added. While its image size
> will
> > > > be a little bigger because it contains both IPv4 and IPv6 stack
> support,
> > > > so it may cause build error in a platform if the flash space is very
> tight.
> > > > Basically, this patch won't cause any other problem if build could
> pass.
> > > >
> > > > I haven't built all the updated platform because the repo ReadMe
> doesn't
> > > > provide a method to build them on Windows Environment, so I would
> very
> > > > appreciate if anybody can help to test the build or tell me how to
> build
> > > > it on Windows.
> >
> > And comments like the paragraph above belong in the cover letter or
> > below the ---
> > If you are OK with me deleting these bits before committing:
> > Reviewed-by: Leif Lindholm 
> >
> > /
> > Leif
> >
> > > >
> > > > Cc: Ard Biesheuvel 
> > > > Cc: Leif Lindholm 
> > > > Cc: Michael D Kinney 
> > > > Contributed-under: TianoCore Contribution Agreement 1.1
> > > > Signed-off-by: Fu Siyuan 
> > > > Signed-off-by: Leif Lindholm 
> > > > ---
> > > >  Platform/AMD/OverdriveBoard/OverdriveBoard.dsc  |  6
> +++---
> > > >  Platform/AMD/OverdriveBoard/OverdriveBoard.fdf  |  6
> +++---
> > > >  Platform/ARM/SgiPkg/SgiPlatform.fdf |  6
> +++---
> > > >  Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.dsc   |  1 +
> > > >  Platform/ARM/VExpressPkg/ArmVExpress-networking.fdf.inc |  6
> +++---
> > > >  Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc| 13
> +++-
> > > > -
> > > >  Platform/Comcast/RDKQemu/RDKQemu.dsc| 10
> +++-
> > > > --
> > > >  Platform/Hisilicon/D03/D03.dsc  |  4
> ++--
> > > >  Platform/Hisilicon/D03/D03.fdf  |  4
> ++--
> > > >  Platform/Hisilicon/D05/D05.dsc  | 11
> +++-
> > > > ---
> > > >  Platform/Hisilicon/D05/D05.fdf  |  9
> +++-
> > > > -
> > > >  Platform/Hisilicon/D06/D06.dsc  | 11
> +++-
> > > > ---
> > > >  Platform/Hisilicon/D06/D06.fdf  |  9
> +++-
> > > > -
> > > >  Platform/Hisilicon/HiKey/HiKey.dsc  |  4
> ++--
> > > >  Platform

Re: [edk2] Help on Error Handling

2018-11-08 Thread Fu, Siyuan
Hi, Siva

Is the exception occurs inside the Tcp->Close() function or 
HttpCloseConnection(). Are you able to check which function could be mapping to 
"RIP  - 657026F8"?

BestRegards
Fu Siyuan

From: Sivaraman Nainar [mailto:sivaram...@amiindia.co.in]
Sent: Thursday, November 8, 2018 4:38 PM
To: Fu, Siyuan ; edk2-devel@lists.01.org
Cc: Arun Subramanian B 
Subject: reg: Help on Error Handling

Hello All,

We are seeing an issue in HTTPDxe module when there is a hot unplug of a USB 
Network device while HTTP Post is happening.

Details:

An application tries to post the data to HTTPS Server using an USB Network 
device in UEFI environment. When the HTTP Post request Initiated there was a 
sudden disconnection happening in USB End and In HttpCloseConnection() 
Exception occurs in HttpInstance->Tcp6->Close .

 X64 Exception Type - 0D(#GP - General Protection)  CPU Apic ID -  

ExceptionData - 
RIP  - 657026F8, CS  - 0038, RFLAGS - 00010212
RAX  - 62D22E38, RCX - 62D22E38, RDX - 62D22110
RBX  - 0007, RSP - 6BDCE0F0, RBP - 
RSI  - 0004, RDI - 
R8   - 000A, R9  - , R10 - 62D42298
R11  - 6BC48918, R12 - 0004, R13 - 
R14  - 8003, R15 - 0007
DS   - 0030, ES  - 0030, FS  - 0030
GS   - 0030, SS  - 0030
CR0  - 8013, CR2 - , CR3 - 6BC4E000
CR4  - 0668, CR8 - 
DR0  - , DR1 - , DR2 - 
DR3  - , DR6 - 0FF0, DR7 - 0400
GDTR - 65D9D6A0 0047, LDTR - 
IDTR - 63064018 0FFF,   TR - 
FXSAVE_STATE - 6BDCDD50

Any idea how this case can be handled without exception in the environment 
where dynamic unplug of a network device which performs UNDI operation.

Thanks
Siva
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v2 2/2] Edk2Platforms: Replace MdeModulePkg PXE/iSCSI/TCP with NetworkPkg drivers.

2018-11-07 Thread Fu, Siyuan
Hi, Leif and Ard

I just realized that you may not be CCed in this email. I resent these patches 
a few minutes ago, my Git Bash send-email reports it added you to CC receiver, 
but the Outlook received email still doesn't have your name in CC list.

Do you have any comments for this v2 patch of the edk2platforms?


BestRegards
Fu Siyuan

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Fu
> Siyuan
> Sent: Monday, November 5, 2018 9:33 AM
> To: edk2-devel@lists.01.org
> Cc: Kinney, Michael D 
> Subject: [edk2] [PATCH v2 2/2] Edk2Platforms: Replace MdeModulePkg
> PXE/iSCSI/TCP with NetworkPkg drivers.
> 
> V2:
> Additional fixups required for NetworkPkg migration
> 
> The PXE/iSCSI/TCP drivers in MdeModulePkg are going to be deprecated. All
> platform DSC/FDF files should be updated to use the dual-stack drivers in
> NetworkPkg.
> 
> The NetworkPkg driver have all the functionality compared with
> MdeModulePkg
> one, with more bug fixes and new feature added. While its image size will
> be a little bigger because it contains both IPv4 and IPv6 stack support,
> so it may cause build error in a platform if the flash space is very tight.
> Basically, this patch won't cause any other problem if build could pass.
> 
> I haven't built all the updated platform because the repo ReadMe doesn't
> provide a method to build them on Windows Environment, so I would very
> appreciate if anybody can help to test the build or tell me how to build
> it on Windows.
> 
> Cc: Ard Biesheuvel 
> Cc: Leif Lindholm 
> Cc: Michael D Kinney 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Fu Siyuan 
> Signed-off-by: Leif Lindholm 
> ---
>  Platform/AMD/OverdriveBoard/OverdriveBoard.dsc  |  6 +++---
>  Platform/AMD/OverdriveBoard/OverdriveBoard.fdf  |  6 +++---
>  Platform/ARM/SgiPkg/SgiPlatform.fdf |  6 +++---
>  Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.dsc   |  1 +
>  Platform/ARM/VExpressPkg/ArmVExpress-networking.fdf.inc |  6 +++---
>  Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc| 13 +++-
> -
>  Platform/Comcast/RDKQemu/RDKQemu.dsc| 10 +++-
> --
>  Platform/Hisilicon/D03/D03.dsc  |  4 ++--
>  Platform/Hisilicon/D03/D03.fdf  |  4 ++--
>  Platform/Hisilicon/D05/D05.dsc  | 11 +++-
> ---
>  Platform/Hisilicon/D05/D05.fdf  |  9 +++-
> -
>  Platform/Hisilicon/D06/D06.dsc  | 11 +++-
> ---
>  Platform/Hisilicon/D06/D06.fdf  |  9 +++-
> -
>  Platform/Hisilicon/HiKey/HiKey.dsc  |  4 ++--
>  Platform/Hisilicon/HiKey/HiKey.fdf  |  4 ++--
>  Platform/Hisilicon/HiKey960/HiKey960.dsc|  4 ++--
>  Platform/Hisilicon/HiKey960/HiKey960.fdf|  4 ++--
>  Platform/LeMaker/CelloBoard/CelloBoard.dsc  | 11
> ---
>  Platform/LeMaker/CelloBoard/CelloBoard.fdf  |  6 +++---
>  Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc |  6 +++---
>  Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.fdf |  6 +++---
>  Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc   |  4 ++--
>  Silicon/Marvell/Armada7k8k/Armada7k8k.fdf   |  4 ++--
>  23 files changed, 68 insertions(+), 81 deletions(-)
> 
> diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
> b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
> index 9f9885fda8..51327a67df 100644
> --- a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
> +++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
> @@ -669,11 +669,11 @@ DEFINE DO_CAPSULE   = FALSE
>}
>MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
>MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
> -  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
>MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
> -  MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
> +  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
> +  NetworkPkg/TcpDxe/TcpDxe.inf
>  ## Bug https://bugs.linaro.org/show_bug.cgi?id=2239
> -# MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
> +# NetworkPkg/IScsiDxe/IScsiDxe.inf
> 
>#
># Core Info
> diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf
> b/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf
> index 0394b8a96f..bf4e6f3283 100644
> --- a/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf
> +++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf
> @@ -204,11 

[edk2] [PATCH v2 2/2] Edk2Platforms: Replace MdeModulePkg PXE/iSCSI/TCP with NetworkPkg drivers.

2018-11-07 Thread Fu Siyuan
V2:
Additional fixups required for NetworkPkg migration

The PXE/iSCSI/TCP drivers in MdeModulePkg are going to be deprecated. All
platform DSC/FDF files should be updated to use the dual-stack drivers in
NetworkPkg.

The NetworkPkg driver have all the functionality compared with MdeModulePkg
one, with more bug fixes and new feature added. While its image size will
be a little bigger because it contains both IPv4 and IPv6 stack support,
so it may cause build error in a platform if the flash space is very tight.
Basically, this patch won't cause any other problem if build could pass.

I haven't built all the updated platform because the repo ReadMe doesn't
provide a method to build them on Windows Environment, so I would very
appreciate if anybody can help to test the build or tell me how to build
it on Windows.

Cc: Ard Biesheuvel 
Cc: Leif Lindholm 
Cc: Michael D Kinney 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Fu Siyuan 
Signed-off-by: Leif Lindholm 
---
 Platform/AMD/OverdriveBoard/OverdriveBoard.dsc  |  6 +++---
 Platform/AMD/OverdriveBoard/OverdriveBoard.fdf  |  6 +++---
 Platform/ARM/SgiPkg/SgiPlatform.fdf |  6 +++---
 Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.dsc   |  1 +
 Platform/ARM/VExpressPkg/ArmVExpress-networking.fdf.inc |  6 +++---
 Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc| 13 +++--
 Platform/Comcast/RDKQemu/RDKQemu.dsc| 10 +++---
 Platform/Hisilicon/D03/D03.dsc  |  4 ++--
 Platform/Hisilicon/D03/D03.fdf  |  4 ++--
 Platform/Hisilicon/D05/D05.dsc  | 11 +++
 Platform/Hisilicon/D05/D05.fdf  |  9 +++--
 Platform/Hisilicon/D06/D06.dsc  | 11 +++
 Platform/Hisilicon/D06/D06.fdf  |  9 +++--
 Platform/Hisilicon/HiKey/HiKey.dsc  |  4 ++--
 Platform/Hisilicon/HiKey/HiKey.fdf  |  4 ++--
 Platform/Hisilicon/HiKey960/HiKey960.dsc|  4 ++--
 Platform/Hisilicon/HiKey960/HiKey960.fdf|  4 ++--
 Platform/LeMaker/CelloBoard/CelloBoard.dsc  | 11 ---
 Platform/LeMaker/CelloBoard/CelloBoard.fdf  |  6 +++---
 Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc |  6 +++---
 Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.fdf |  6 +++---
 Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc   |  4 ++--
 Silicon/Marvell/Armada7k8k/Armada7k8k.fdf   |  4 ++--
 23 files changed, 68 insertions(+), 81 deletions(-)

diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc 
b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
index 9f9885fda8..51327a67df 100644
--- a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
+++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
@@ -669,11 +669,11 @@ DEFINE DO_CAPSULE   = FALSE
   }
   MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
   MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
-  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
   MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
-  MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
+  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
+  NetworkPkg/TcpDxe/TcpDxe.inf
 ## Bug https://bugs.linaro.org/show_bug.cgi?id=2239
-# MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
+# NetworkPkg/IScsiDxe/IScsiDxe.inf
 
   #
   # Core Info
diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf 
b/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf
index 0394b8a96f..bf4e6f3283 100644
--- a/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf
+++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf
@@ -204,11 +204,11 @@ READ_LOCK_STATUS   = TRUE
   INF MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
   INF MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
   INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
-  INF MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
   INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
-  INF MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
+  INF NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
+  INF NetworkPkg/TcpDxe/TcpDxe.inf
 ## Bug https://bugs.linaro.org/show_bug.cgi?id=2239
-# INF MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
+# INF NetworkPkg/IScsiDxe/IScsiDxe.inf
 
   #
   # Core Info
diff --git a/Platform/ARM/SgiPkg/SgiPlatform.fdf 
b/Platform/ARM/SgiPkg/SgiPlatform.fdf
index fd87563246..c9129841d7 100644
--- a/Platform/ARM/SgiPkg/SgiPlatform.fdf
+++ b/Platform/ARM/SgiPkg/SgiPlatform.fdf
@@ -185,10 +185,10 @@ READ_LOCK_STATUS   = TRUE
   INF MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
   INF MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
   INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
-  INF MdeModu

[edk2] [PATCH v2 1/2] Platform/Hisilicon: CRLF fixups for D05.dsc

2018-11-07 Thread Fu Siyuan
From: Leif Lindholm 

Commit 1a13dfd37fe7 ("Hisilicon/D0x: Switch to generic PciHostBridge
driver") introduced some incorrect line endings, fix those here.

Cc: Ard Biesheuvel 
Cc: Leif Lindholm 
Cc: Michael D Kinney 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Leif Lindholm 
---
 Platform/Hisilicon/D05/D05.dsc | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/Platform/Hisilicon/D05/D05.dsc b/Platform/Hisilicon/D05/D05.dsc
index 1040466633..e5fb5411d7 100644
--- a/Platform/Hisilicon/D05/D05.dsc
+++ b/Platform/Hisilicon/D05/D05.dsc
@@ -97,10 +97,10 @@
 
   LpcLib|Silicon/Hisilicon/Hi1610/Library/LpcLib/LpcLib.inf
   
SerialPortLib|ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.inf
-  
PlatformPciLib|Platform/Hisilicon/D05/Library/PlatformPciLib/PlatformPciLib.inf
+  
PlatformPciLib|Platform/Hisilicon/D05/Library/PlatformPciLib/PlatformPciLib.inf
   
PciHostBridgeLib|Platform/Hisilicon/Library/PciHostBridgeLib/PciHostBridgeLib.inf
   
PciSegmentLib|Silicon/Hisilicon/Hi1610/Library/Hi161xPciSegmentLib/Hi161xPciSegmentLib.inf
-  
PciPlatformLib|Silicon/Hisilicon/Hi1610/Library/Hi161xPciPlatformLib/Hi161xPciPlatformLib.inf
+  
PciPlatformLib|Silicon/Hisilicon/Hi1610/Library/Hi161xPciPlatformLib/Hi161xPciPlatformLib.inf
 
 [LibraryClasses.common.SEC]
   
ArmPlatformLib|Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/ArmPlatformLibSec.inf
@@ -138,7 +138,7 @@
 
 [PcdsFixedAtBuild.common]
   gArmPlatformTokenSpaceGuid.PcdCoreCount|8
-  gArmTokenSpaceGuid.PcdPciIoTranslation|0
+  gArmTokenSpaceGuid.PcdPciIoTranslation|0
 
   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000
 
@@ -477,7 +477,7 @@
   ArmPkg/Drivers/CpuDxe/CpuDxe.inf
   MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
 
-  ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf
+  ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf
   Platform/Hisilicon/D03/Drivers/OemNicConfig2PHi1610/OemNicConfig2P.inf
 
   Platform/Hisilicon/D05/Drivers/SFC/SfcDxeDriver.inf
@@ -618,10 +618,10 @@
 
   NULL|Platform/Hisilicon/D05/Library/PlatformPciLib/PlatformPciLib.inf
   }
-  Silicon/Hisilicon/Drivers/PciPlatform/PciPlatform.inf {
+  Silicon/Hisilicon/Drivers/PciPlatform/PciPlatform.inf {
 
-  NULL|Platform/Hisilicon/D05/Library/PlatformPciLib/PlatformPciLib.inf
-  }
+  NULL|Platform/Hisilicon/D05/Library/PlatformPciLib/PlatformPciLib.inf
+  }
   MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf {
 
   NULL|Platform/Hisilicon/D05/Library/PlatformPciLib/PlatformPciLib.inf
-- 
2.19.1.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH v2 0/2] Update platform DSC/FDF files for NetworkPkg migration.

2018-11-07 Thread Fu Siyuan
Patch 1/2 fixes the line ending issue introduced by Ccommit 1a13dfd37fe7
("Hisilicon/D0x: Switch to generic PciHostBridge driver").

Patch 2/2 updates all platform DSC/FDF files for NetworkPkg migration.

Cc: Ard Biesheuvel 
Cc: Leif Lindholm 
Cc: Michael D Kinney 

Fu Siyuan (1):
  Edk2Platforms: Replace MdeModulePkg PXE/iSCSI/TCP with NetworkPkg
drivers.

Leif Lindholm (1):
  Platform/Hisilicon: CRLF fixups for D05.dsc

 .../AMD/OverdriveBoard/OverdriveBoard.dsc |  6 ++---
 .../AMD/OverdriveBoard/OverdriveBoard.fdf |  6 ++---
 Platform/ARM/SgiPkg/SgiPlatform.fdf   |  6 ++---
 .../ARM/VExpressPkg/ArmVExpress-CTA15-A7.dsc  |  1 +
 .../ArmVExpress-networking.fdf.inc|  6 ++---
 Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc  | 13 +-
 Platform/Comcast/RDKQemu/RDKQemu.dsc  | 10 +++-
 Platform/Hisilicon/D03/D03.dsc|  4 +--
 Platform/Hisilicon/D03/D03.fdf|  4 +--
 Platform/Hisilicon/D05/D05.dsc| 25 ---
 Platform/Hisilicon/D05/D05.fdf|  9 +++
 Platform/Hisilicon/D06/D06.dsc| 11 +++-
 Platform/Hisilicon/D06/D06.fdf|  9 +++
 Platform/Hisilicon/HiKey/HiKey.dsc|  4 +--
 Platform/Hisilicon/HiKey/HiKey.fdf|  4 +--
 Platform/Hisilicon/HiKey960/HiKey960.dsc  |  4 +--
 Platform/Hisilicon/HiKey960/HiKey960.fdf  |  4 +--
 Platform/LeMaker/CelloBoard/CelloBoard.dsc| 11 +---
 Platform/LeMaker/CelloBoard/CelloBoard.fdf|  6 ++---
 .../Overdrive1000Board/Overdrive1000Board.dsc |  6 ++---
 .../Overdrive1000Board/Overdrive1000Board.fdf |  6 ++---
 Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc |  4 +--
 Silicon/Marvell/Armada7k8k/Armada7k8k.fdf |  4 +--
 23 files changed, 75 insertions(+), 88 deletions(-)

-- 
2.19.1.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v3 1/1] ArmVirtPkg: Replace obsoleted network drivers from platform DSC/FDF.

2018-11-06 Thread Fu, Siyuan
Hi, Arb

> -Original Message-
> From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org]
> Sent: Wednesday, November 7, 2018 12:39 AM
> To: Laszlo Ersek 
> Cc: Fu, Siyuan ; edk2-devel@lists.01.org; Julien
> Grall 
> Subject: Re: [PATCH v3 1/1] ArmVirtPkg: Replace obsoleted network drivers
> from platform DSC/FDF.
> 
> On 6 November 2018 at 16:24, Laszlo Ersek  wrote:
> > On 11/06/18 13:32, Ard Biesheuvel wrote:
> >> On 6 November 2018 at 02:24, Fu Siyuan  wrote:
> >>> V3:
> >>> Remove duplicate library added in v2 patch, since ArmVirtPkg.dsc.inc
> >>> already have them. Just remove the if...end there is enough.
> >>>
> >>> V2:
> >>> Add missing library instance for NetworkPkg iSCSI driver.
> >>>
> >>
> >> Please don't put the patch revision history in the commit log. Put it
> >> below the ---
> >>
> >>> This patch replaces the MdeModulePkg TCP, PXE and iSCSI driver with
> those
> >>> ones in NetworkPkg. These 3 drivers in MdeModulePkg are not being
> actively
> >>> maintained and will be removed from edk2 master soon.
> >>>
> >>> Cc: Laszlo Ersek 
> >>> Cc: Ard Biesheuvel 
> >>> Cc: Julien Grall 
> >>> Contributed-under: TianoCore Contribution Agreement 1.1
> >>> Signed-off-by: Fu Siyuan 
> >>> ---
> >>
> >> ... here ...
> >>
> >> The patch looks fine to me
> >>
> >> Reviewed-by: Ard Biesheuvel 
> >>
> >> but please don't merge it until after the next stable tag has been
> created
> >
> > This is not a bad idea (see also your discussion with Leif); however it
> > does create a bit of inconsistency with how the other platform DSC/FDF
> > files have been handled. (The changes have been pushed for those.)
> >
> > Again, I don't disagree, and I don't mind if ArmVirt is handled
> > differently. It's just that we should have handled this more uniformly,
> > I believe.
> >
> 
> Yes - as I replied to Leif, I am not going to obsess about this. But
> the point of stable tags is not to rush things in at the last minute.

OK I will not commit this change to ArmVirt until the stable tag is made.
Sorry for the last minute notification of this change, and I can fully
understand your concern, that's why we accepted Leif that still keep
these MdeModulePkg drivers in this stable tag.

Thanks for review.
Siyuan

> 
> >
> > In retrospect, I would have also appreciated if the patches had
> > referenced <https://bugzilla.tianocore.org/show_bug.cgi?id=1278>, even
> > though they only implement "prep" work for now, on the platform DSC/FDF
> > level, and not the actual driver removal.
> >
> > For example, the important explanation about MdeModulePkg's iSCSI driver
> > implementing its own MD5 algo cannot be connected to the OVMF commit now
> > (d2f1f6423bd1). I have copied the most relevant passage from the cover
> > letter of this series into TianoCore BZ#1278, but the commit in question
> > doesn't reference any BZ, so the link cannot be established.
> >
> > Thanks
> > Laszlo
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v1] MdeModulePkg/Mtftp4Dxe: Fix invalid configuration of MTFTP local port.

2018-11-05 Thread Fu, Siyuan
Reviewed-by: Fu Siyuan 



> -Original Message-
> From: Wu, Jiaxin
> Sent: Monday, November 5, 2018 2:58 PM
> To: edk2-devel@lists.01.org
> Cc: Ye, Ting ; Fu, Siyuan ; Wu,
> Jiaxin 
> Subject: [PATCH v1] MdeModulePkg/Mtftp4Dxe: Fix invalid configuration of
> MTFTP local port.
> 
> This patch is to fix the invalid setting of MTFTP local port. The
> issue can be reproduced by tftp shell command by using [-l port]
> option.
> 
> Cc: Ye Ting 
> Cc: Fu Siyuan 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Wu Jiaxin 
> ---
>  MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c
> b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c
> index f442e6d7ac..793ad77b1e 100644
> --- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c
> +++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c
> @@ -309,11 +309,11 @@ Mtftp4ConfigUnicastPort (
>UdpConfig.ReceiveTimeout = 0;
>UdpConfig.TransmitTimeout= 0;
>UdpConfig.UseDefaultAddress  = Config->UseDefaultSetting;
>IP4_COPY_ADDRESS (&UdpConfig.StationAddress, &Config->StationIp);
>IP4_COPY_ADDRESS (&UdpConfig.SubnetMask, &Config->SubnetMask);
> -  UdpConfig.StationPort= 0;
> +  UdpConfig.StationPort= Config->LocalPort;
>UdpConfig.RemotePort = 0;
> 
>Ip = HTONL (Instance->ServerIp);
>IP4_COPY_ADDRESS (&UdpConfig.RemoteAddress, &Ip);
> 
> --
> 2.17.1.windows.2

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v1] ShellPkg/TftpDynamicCommand: Clarify the retry count option in command.

2018-11-05 Thread Fu, Siyuan
Reviewed-by: Fu Siyuan 



> -Original Message-
> From: Wu, Jiaxin
> Sent: Monday, November 5, 2018 2:59 PM
> To: edk2-devel@lists.01.org
> Cc: Carsey, Jaben ; Ye, Ting ;
> Fu, Siyuan ; Wu, Jiaxin 
> Subject: [PATCH v1] ShellPkg/TftpDynamicCommand: Clarify the retry count
> option in command.
> 
> [-c ] is to define the number of times to transmit request
> packets and wait for a response. The default value is 6. But it doesn't
> specify the behavior of zero value. Here, The patch is to clear that:
> Set to zero also means to use the default value.
> 
> Cc: Carsey Jaben 
> Cc: Ye Ting 
> Cc: Fu Siyuan 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Wu Jiaxin 
> ---
>  ShellPkg/DynamicCommand/TftpDynamicCommand/Tftp.c   | 6 +-
>  ShellPkg/DynamicCommand/TftpDynamicCommand/Tftp.uni | 3 ++-
>  2 files changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/ShellPkg/DynamicCommand/TftpDynamicCommand/Tftp.c
> b/ShellPkg/DynamicCommand/TftpDynamicCommand/Tftp.c
> index ac2813efc3..028686e1ff 100644
> --- a/ShellPkg/DynamicCommand/TftpDynamicCommand/Tftp.c
> +++ b/ShellPkg/DynamicCommand/TftpDynamicCommand/Tftp.c
> @@ -216,11 +216,11 @@ EFI_MTFTP4_CONFIG_DATA DefaultMtftp4ConfigData = {
>{ { 0, 0, 0, 0 } },   // SubnetMask- Not relevant
> as UseDefaultSetting=TRUE
>0,// LocalPort - Automatically
> assigned port number.
>{ { 0, 0, 0, 0 } },   // GatewayIp - Not relevant
> as UseDefaultSetting=TRUE
>{ { 0, 0, 0, 0 } },   // ServerIp  - Not known yet
>69,   // InitialServerPort - Standard TFTP
> server port
> -  6,// TryCount  - Max number of
> retransmissions.
> +  6,// TryCount  - The number of
> times to transmit request packets and wait for a response.
>4 // TimeoutValue  - Retransmission
> timeout in seconds.
>  };
> 
>  STATIC CONST SHELL_PARAM_ITEM ParamList[] = {
>{L"-i", TypeValue},
> @@ -419,10 +419,14 @@ RunTftp (
>ValueStr = ShellCommandLineGetValue (CheckPackage, L"-c");
>if (ValueStr != NULL) {
>  if (!StringToUint16 (ValueStr, &Mtftp4ConfigData.TryCount)) {
>goto Error;
>  }
> +
> +if (Mtftp4ConfigData.TryCount == 0) {
> +  Mtftp4ConfigData.TryCount = 6;
> +}
>}
> 
>ValueStr = ShellCommandLineGetValue (CheckPackage, L"-t");
>if (ValueStr != NULL) {
>  if (!StringToUint16 (ValueStr, &Mtftp4ConfigData.TimeoutValue)) {
> diff --git a/ShellPkg/DynamicCommand/TftpDynamicCommand/Tftp.uni
> b/ShellPkg/DynamicCommand/TftpDynamicCommand/Tftp.uni
> index 654e42ad23..ff64912564 100644
> --- a/ShellPkg/DynamicCommand/TftpDynamicCommand/Tftp.uni
> +++ b/ShellPkg/DynamicCommand/TftpDynamicCommand/Tftp.uni
> @@ -56,11 +56,12 @@
>  "  -i interface - Specifies an adapter name, i.e., eth0.\r\n"
>  "  -l port  - Specifies the local port number. Default value is
> 0\r\n"
>  " and the port number is automatically assigned.\r\n"
>  "  -r port  - Specifies the remote port number. Default value is
> 69.\r\n"
>  "  -c  - The number of times to transmit request packets
> and\r\n"
> -" wait for a response. The default value is 6.\r\n"
> +" wait for a response. The default value is 6. Set to
> zero\r\n"
> +" also means to use the default value.\r\n"
>  "  -t  - The number of seconds to wait for a response
> after\r\n"
>  " sending a request packet. Default value is 4s.\r\n"
>  "  -s   - Specifies the TFTP blksize option as defined in RFC
> 2348.\r\n"
>  " Valid range is between 8 and 65464, default value
> is 512.\r\n"
>  "  -w  - Specifies the TFTP windowsize option as defined in
> RFC 7440.\r\n"
> --
> 2.17.1.windows.2

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH v3 1/1] ArmVirtPkg: Replace obsoleted network drivers from platform DSC/FDF.

2018-11-05 Thread Fu Siyuan
V3:
Remove duplicate library added in v2 patch, since ArmVirtPkg.dsc.inc
already have them. Just remove the if...end there is enough.

V2:
Add missing library instance for NetworkPkg iSCSI driver.

This patch replaces the MdeModulePkg TCP, PXE and iSCSI driver with those
ones in NetworkPkg. These 3 drivers in MdeModulePkg are not being actively
maintained and will be removed from edk2 master soon.

Cc: Laszlo Ersek 
Cc: Ard Biesheuvel 
Cc: Julien Grall 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Fu Siyuan 
---
 ArmVirtPkg/ArmVirt.dsc.inc   |  2 --
 ArmVirtPkg/ArmVirtQemu.dsc   | 10 +++---
 ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc | 10 +++---
 ArmVirtPkg/ArmVirtQemuKernel.dsc | 13 ++---
 4 files changed, 12 insertions(+), 23 deletions(-)

diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc
index 70a0ac4d786c..ebabf3f47ec9 100644
--- a/ArmVirtPkg/ArmVirt.dsc.inc
+++ b/ArmVirtPkg/ArmVirt.dsc.inc
@@ -149,11 +149,9 @@ [LibraryClasses.common]
   #
   # CryptoPkg libraries needed by multiple firmware features
   #
-!if ($(SECURE_BOOT_ENABLE) == TRUE) || ($(NETWORK_IP6_ENABLE) == TRUE)
   IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
   OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
-!endif
 
   #
   # Secure Boot dependencies
diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
index 885c6b14b844..b3f1b23e3890 100644
--- a/ArmVirtPkg/ArmVirtQemu.dsc
+++ b/ArmVirtPkg/ArmVirtQemu.dsc
@@ -346,18 +346,14 @@ [Components.common]
   MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
   MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
   MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
+  NetworkPkg/TcpDxe/TcpDxe.inf
+  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
+  NetworkPkg/IScsiDxe/IScsiDxe.inf
 !if $(NETWORK_IP6_ENABLE) == TRUE
   NetworkPkg/Ip6Dxe/Ip6Dxe.inf
-  NetworkPkg/TcpDxe/TcpDxe.inf
   NetworkPkg/Udp6Dxe/Udp6Dxe.inf
   NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
   NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
-  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  NetworkPkg/IScsiDxe/IScsiDxe.inf
-!else
-  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
-  MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
 !endif
 !if $(HTTP_BOOT_ENABLE) == TRUE
   NetworkPkg/DnsDxe/DnsDxe.inf
diff --git a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc 
b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
index a6390bd4b841..3316f982695f 100644
--- a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
+++ b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
@@ -126,18 +126,14 @@ [FV.FvMain]
   INF MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
   INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
   INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
+  INF NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
+  INF NetworkPkg/IScsiDxe/IScsiDxe.inf
+  INF NetworkPkg/TcpDxe/TcpDxe.inf
 !if $(NETWORK_IP6_ENABLE) == TRUE
   INF NetworkPkg/Ip6Dxe/Ip6Dxe.inf
-  INF NetworkPkg/TcpDxe/TcpDxe.inf
   INF NetworkPkg/Udp6Dxe/Udp6Dxe.inf
   INF NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
   INF NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
-  INF NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  INF NetworkPkg/IScsiDxe/IScsiDxe.inf
-!else
-  INF MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
-  INF MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  INF MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
 !endif
 !if $(HTTP_BOOT_ENABLE) == TRUE
   INF NetworkPkg/DnsDxe/DnsDxe.inf
diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc
index 434d6861a56f..4920a66f2fdb 100644
--- a/ArmVirtPkg/ArmVirtQemuKernel.dsc
+++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc
@@ -67,6 +67,9 @@ [LibraryClasses.common]
 
 [LibraryClasses.common.UEFI_DRIVER]
   UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
+  BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
+  OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
+  IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
 
 [BuildOptions.ARM.EDKII.SEC, BuildOptions.ARM.EDKII.BASE]
   # Avoid MOVT/MOVW instruction pairs in code that may end up in the PIE
@@ -335,18 +338,14 @@ [Components.common]
   MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
   MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
   MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
+  NetworkPkg/TcpDxe/TcpDxe.inf
+  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
+  NetworkPkg/IScsiDxe/IScsiDxe.inf
 !if $(NETWORK_IP6_ENABLE) == TRUE
   NetworkPkg/Ip6Dxe/Ip6Dxe.inf
-  NetworkPkg/TcpDxe/TcpDxe.inf
   NetworkPkg/Udp6Dxe/Udp6Dxe.inf
   NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
   NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
-  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  NetworkPkg/IScsiDxe/IScsiDxe.inf
-!else
-  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
-  MdeModulePkg/Universal/Network/UefiPxeBcDxe

[edk2] [PATCH v3 0/1] Delete TCP, PXE, iSCSI driver in MdeModulePkg.

2018-11-05 Thread Fu Siyuan
V3 Update:
1. Changes for OvmfPkg and Vlv2TbltDevicePkg have been committed so not 
   included in this v3 patch.
2. Remove ArmVirtPkg duplicate library added in v2 patch.

V2 Update:
1. Changes for Nt32Pkg and EmulatorPkg have been committed so not 
   included in this v2 patch.
2. Add missing library instance for NetworkPkg iSCSI driver.
3. The removal of the 3 modules from MdeModulePkg will not be included
   in edk2-stable201811 tag, so not included in this v2 patch.

This patch series is to delete the Tcp4Dxe, UefiPxeBcDxe and IScsi4Dxe
drivers in MdeModulePkg. These drivers will not be maintained and can't
co-work with the dual-stack drivers in NetworkPkg.

People should use below NetworkPkg drivers instead:
  NetworkPkg/IScsiDxe/IScsiDxe.inf
  NetworkPkg/TcpDxe/TcpDxe.inf
  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
These drivers are actively maintained with more bug fixes and new feature
support.

The MdeModulePkg iSCSI driver implements its own Md5.c instead of using
standard crypto API provided by OpenSSL, which is not allowed by edk2
security development guide line. NetworkPkg iSCSI driver doesn't have
this issue and so need to be built with OpenSSL library instance now.
Please add below library instance to your DSC file.
[LibraryClasses.common.UEFI_DRIVER]
  BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
  OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
  IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf

Patch 1~5 update edk2 platform DSC/FDF files to use NetworkPkg drivers.
Patch 6 deletes the TCP,PXE,iSCSI driver in MdeModulePkg.
Patch 7 removes some clarification in NetworkPkg drivers since the
related driver has been deleted in Patch 6.

Fu Siyuan (1):
  ArmVirtPkg: Replace obsoleted network drivers from platform DSC/FDF.

Cc: Laszlo Ersek 
Cc: Ard Biesheuvel 
Cc: Julien Grall 

 ArmVirtPkg/ArmVirt.dsc.inc   |  2 --
 ArmVirtPkg/ArmVirtQemu.dsc   | 10 +++---
 ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc | 10 +++---
 ArmVirtPkg/ArmVirtQemuKernel.dsc | 13 ++---
 4 files changed, 12 insertions(+), 23 deletions(-)

-- 
2.19.1.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v1 0/7] Delete TCP, PXE, iSCSI driver in MdeModulePkg.

2018-11-05 Thread Fu, Siyuan
Hi, Leif and Laszlo


> -Original Message-
> From: Laszlo Ersek [mailto:ler...@redhat.com]
> Sent: Tuesday, November 6, 2018 6:12 AM
> To: Leif Lindholm ; Fu, Siyuan
> 
> Cc: edk2-devel@lists.01.org
> Subject: Re: [edk2] [PATCH v1 0/7] Delete TCP, PXE, iSCSI driver in
> MdeModulePkg.
> 
> Hi Leif,
> 
> On 10/31/18 11:59, Leif Lindholm wrote:
> > Hi Fu Siyuan,
> >
> > Hmm, strange.
> >
> > Ming Huang (cc) has also had issues with this in his latest set (but
> > not before). Can you guys work together to try to figure out what is
> > going wrong?
> >
> > Can you start by testing with an older version of git?
> 
> this is indeed a git regression. I ran into it myself recently, when I
> upgraded git from v2.14.1 to v2.19.1. I dug a little into the git source
> code, but couldn't spend much time on it. Ultimately I rolled back the
> upgrade.
> 
> The diffstats are still well-formed (not truncated) in the individual
> patch emails, under v2.19.1, as long as the "recommended" options are
> used on the cmdline. However, the cumulative diffstat is truncated
> regardless. I couldn't convince git v2.19.1 to keep the previous
> (desired) behavior.

So should I rollback my Git to v2.14.1, or the new truncated cumulative
diffstat is also acceptable?

> 
> "Documentation/RelNotes/2.17.0.txt" has some words on "diffstat".
> 
> Thanks
> Laszlo
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v2 2/3] ArmVirtPkg: Replace obsoleted network drivers from platform DSC/FDF.

2018-11-05 Thread Fu, Siyuan
Hi, Laszlo

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Laszlo Ersek
> Sent: Tuesday, November 6, 2018 6:37 AM
> To: Fu, Siyuan 
> Cc: edk2-devel@lists.01.org
> Subject: Re: [edk2] [PATCH v2 2/3] ArmVirtPkg: Replace obsoleted network
> drivers from platform DSC/FDF.
> 
> On 11/05/18 11:49, Fu Siyuan wrote:
> > V2:
> > Add missing library instance for NetworkPkg iSCSI driver.
> >
> > This patch replaces the MdeModulePkg TCP, PXE and iSCSI driver with
> those
> > ones in NetworkPkg. These 3 drivers in MdeModulePkg are not being
> actively
> > maintained and will be removed from edk2 master soon.
> >
> > Cc: Laszlo Ersek 
> > Cc: Ard Biesheuvel 
> > Cc: Julien Grall 
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Fu Siyuan 
> > ---
> >  ArmVirtPkg/ArmVirtQemu.dsc   | 13 ++---
> >  ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc | 10 +++---
> >  ArmVirtPkg/ArmVirtQemuKernel.dsc | 13 ++---
> >  3 files changed, 15 insertions(+), 21 deletions(-)
> >
> > diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
> > index 885c6b14b844..0f403973bea0 100644
> > --- a/ArmVirtPkg/ArmVirtQemu.dsc
> > +++ b/ArmVirtPkg/ArmVirtQemu.dsc
> > @@ -70,6 +70,9 @@ [LibraryClasses.common.PEIM]
> >
> >  [LibraryClasses.common.UEFI_DRIVER]
> >UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
> > +  BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
> > +  OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
> > +  IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
> 
> (1) I couldn't participate in the discussion last week; I was away. On
> my return, I have now seen multiple related threads. I guess I can
> describe my general concern here.
> 
> My general concern is that the edk2 network stack can no longer be built
> without OpenSSL. (As long as we include the iSCSI driver in the "edk2
> network stack".) Is that intentional?
> 
> I'm not asking for additional documentation regarding this fact, given
> commit 0bcbdf9c7445 ("NetworkPkg/IScsiDxe: Add the clarification
> compared to IScsiDxe in MdeModulePkg.", 2018-09-27). I'm just asking if
> we've considered this and find it acceptable.

The MdeModulePkg iSCSI driver can be built without OpenSSL because it writes
its own crypto functions in IScsiDxe/Md5.c, that's not allowed by
current edk2 security development guide line. We should always use the
crypto APIs provided by OpenSSL instead of reinvent a new implementation.
So yes, it's the intentional, and even if we decide not to delete the
MdeModulePkg iSCSI driver, there will be another patch to delete its own
Md5.c and use OpenSSL API.

> 
> 
> (2) Once we remove the IPv4-only drivers, the INF file comments added in:
> 
>   897720daef33 NetworkPkg/TcpDxe: Add the clarification compared to
>Tcp4Dxe in MdeModulePkg.
>   0bcbdf9c7445 NetworkPkg/IScsiDxe: Add the clarification compared to
>IScsiDxe in MdeModulePkg.
>   24c55f5dcc31 NetworkPkg/UefiPxeBcDxe: Add the clarification compared
>to UefiPxeBcDxe in MdeModulePkg.
> 
> should be updated, because the comparisons to MdeModulePkg drivers will
> no longer make sense.

You are right, my V1 patch 6/7 deletes the MdeModulePkg code and 7/7 removes
these comments in NetworkPkg drivers' INF file. Since we decided to keep
the MdeModulePkg driver in edk2-stable201811 tag, I removed the 6/7 and 7/7
in v2 patch. These changes will be sent out in a separate patch later.
I will try to include more details in the patch description in future
to let you known the background.

> 
> 
> (3) These library class resolutions are already spelled out in
> "ArmVirtPkg/ArmVirt.dsc.inc". Please see under the comment
> 
>   #
>   # CryptoPkg libraries needed by multiple firmware features
>   #
> 
> We shouldn't duplicate those lib class resolutions.

Just see it, will send out a v3 patch for the ARM package.

> 
> 
> (4) In particular, the "CryptoPkg/Library/OpensslLib/OpensslLib.inf"
> instance contains TLS support, and it is overkill for just IPv6. The
> "OpensslLibCrypto.inf" instance is sufficient.
> 

TLS is required by HTTP boot driver so I put OpensslLib instance as 
default, but it's a good suggestion. I will update the NetworkPkg Wiki
page to tell platform owners to use the smaller crypto library instance
if they don't need HTTP.

> >
> >
> ##
> ##
> >  #
> > 

[edk2] [PATCH v2 0/3] Delete TCP, PXE, iSCSI driver in MdeModulePkg.

2018-11-05 Thread Fu Siyuan
V2 Update:
1. Changes for Nt32Pkg and EmulatorPkg have been committed so not 
   included in this v2 patch.
2. Add missing library instance for NetworkPkg iSCSI driver.
3. The removal of the 3 modules from MdeModulePkg will not be included
   in edk2-stable201811 tag, so not included in this v2 patch.

This patch series is to delete the Tcp4Dxe, UefiPxeBcDxe and IScsi4Dxe
drivers in MdeModulePkg. These drivers will not be maintained and can't
co-work with the dual-stack drivers in NetworkPkg.

People should use below NetworkPkg drivers instead:
  NetworkPkg/IScsiDxe/IScsiDxe.inf
  NetworkPkg/TcpDxe/TcpDxe.inf
  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
These drivers are actively maintained with more bug fixes and new feature
support.

Patch 1~5 update edk2 platform DSC/FDF files to use NetworkPkg drivers.
Patch 6 deletes the TCP,PXE,iSCSI driver in MdeModulePkg.
Patch 7 removes some clarification in NetworkPkg drivers since the
related driver has been deleted in Patch 6.



Fu Siyuan (3):
  Vlv2TbltDevicePkg: Replace obsoleted drivers from platform DSC/FDF.
  ArmVirtPkg: Replace obsoleted network drivers from platform DSC/FDF.
  OvmfPkg: Replace obsoleted network drivers from platform DSC/FDF.

 ArmVirtPkg/ArmVirtQemu.dsc  | 13 ++---
 ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc| 10 +++---
 ArmVirtPkg/ArmVirtQemuKernel.dsc| 13 ++---
 OvmfPkg/OvmfPkgIa32.dsc | 14 --
 OvmfPkg/OvmfPkgIa32.fdf | 10 +++---
 OvmfPkg/OvmfPkgIa32X64.dsc  | 14 --
 OvmfPkg/OvmfPkgIa32X64.fdf  | 10 +++---
 OvmfPkg/OvmfPkgX64.dsc  | 14 --
 OvmfPkg/OvmfPkgX64.fdf  | 10 +++---
 Vlv2TbltDevicePkg/PlatformPkg.fdf   | 14 +++---
 Vlv2TbltDevicePkg/PlatformPkgGcc.fdf| 14 +++---
 Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc | 20 
 Vlv2TbltDevicePkg/PlatformPkgIA32.dsc   | 20 
 Vlv2TbltDevicePkg/PlatformPkgX64.dsc| 20 
 14 files changed, 54 insertions(+), 142 deletions(-)

-- 
2.19.1.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH v2 3/3] OvmfPkg: Replace obsoleted network drivers from platform DSC/FDF.

2018-11-05 Thread Fu Siyuan
V2:
Add missed library instance for NetworkPkg iSCSI driver.

This patch replaces the MdeModulePkg TCP, PXE and iSCSI driver with those
ones in NetworkPkg. These 3 drivers in MdeModulePkg are not being actively
maintained and will be removed from edk2 master soon.

Cc: Jordan Justen 
Cc: Laszlo Ersek 
Cc: Ard Biesheuvel 
Cc: Anthony Perard 
Cc: Julien Grall 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Fu Siyuan 
---
 OvmfPkg/OvmfPkgIa32.dsc| 14 --
 OvmfPkg/OvmfPkgIa32.fdf| 10 +++---
 OvmfPkg/OvmfPkgIa32X64.dsc | 14 --
 OvmfPkg/OvmfPkgIa32X64.fdf | 10 +++---
 OvmfPkg/OvmfPkgX64.dsc | 14 --
 OvmfPkg/OvmfPkgX64.fdf | 10 +++---
 6 files changed, 21 insertions(+), 51 deletions(-)

diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
index 9f07e75050c0..7160e88eaee4 100644
--- a/OvmfPkg/OvmfPkgIa32.dsc
+++ b/OvmfPkg/OvmfPkgIa32.dsc
@@ -189,9 +189,7 @@ [LibraryClasses]
 !endif
   VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf
 
-!if $(NETWORK_IP6_ENABLE) == TRUE
   TcpIoLib|MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.inf
-!endif
 
 !if $(HTTP_BOOT_ENABLE) == TRUE
   HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf
@@ -790,18 +788,14 @@ [Components]
   MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
   MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
   MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
-!if $(NETWORK_IP6_ENABLE) == TRUE
-  NetworkPkg/Ip6Dxe/Ip6Dxe.inf
+  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
   NetworkPkg/TcpDxe/TcpDxe.inf
+  NetworkPkg/IScsiDxe/IScsiDxe.inf
+!if $(NETWORK_IP6_ENABLE) == TRUE
+  NetworkPkg/Ip6Dxe/Ip6Dxe.inf
   NetworkPkg/Udp6Dxe/Udp6Dxe.inf
   NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
   NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
-  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  NetworkPkg/IScsiDxe/IScsiDxe.inf
-!else
-  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
-  MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
 !endif
 !if $(HTTP_BOOT_ENABLE) == TRUE
   NetworkPkg/DnsDxe/DnsDxe.inf
diff --git a/OvmfPkg/OvmfPkgIa32.fdf b/OvmfPkg/OvmfPkgIa32.fdf
index 52b8b1fea1fc..1bc2e73bde16 100644
--- a/OvmfPkg/OvmfPkgIa32.fdf
+++ b/OvmfPkg/OvmfPkgIa32.fdf
@@ -309,18 +309,14 @@ [FV.DXEFV]
   INF  MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
   INF  MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
   INF  MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
+  INF  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
+  INF  NetworkPkg/TcpDxe/TcpDxe.inf
+  INF  NetworkPkg/IScsiDxe/IScsiDxe.inf
 !if $(NETWORK_IP6_ENABLE) == TRUE
   INF  NetworkPkg/Ip6Dxe/Ip6Dxe.inf
-  INF  NetworkPkg/TcpDxe/TcpDxe.inf
   INF  NetworkPkg/Udp6Dxe/Udp6Dxe.inf
   INF  NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
   INF  NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
-  INF  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  INF  NetworkPkg/IScsiDxe/IScsiDxe.inf
-!else
-  INF  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
-  INF  MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  INF  MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
 !endif
 !if $(HTTP_BOOT_ENABLE) == TRUE
   INF  NetworkPkg/DnsDxe/DnsDxe.inf
diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc
index a4eaeb808c6b..e83e7ffab5b5 100644
--- a/OvmfPkg/OvmfPkgIa32X64.dsc
+++ b/OvmfPkg/OvmfPkgIa32X64.dsc
@@ -194,9 +194,7 @@ [LibraryClasses]
 !endif
   VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf
 
-!if $(NETWORK_IP6_ENABLE) == TRUE
   TcpIoLib|MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.inf
-!endif
 
 !if $(HTTP_BOOT_ENABLE) == TRUE
   HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf
@@ -799,18 +797,14 @@ [Components.X64]
   MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
   MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
   MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
-!if $(NETWORK_IP6_ENABLE) == TRUE
-  NetworkPkg/Ip6Dxe/Ip6Dxe.inf
+  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
   NetworkPkg/TcpDxe/TcpDxe.inf
+  NetworkPkg/IScsiDxe/IScsiDxe.inf
+!if $(NETWORK_IP6_ENABLE) == TRUE
+  NetworkPkg/Ip6Dxe/Ip6Dxe.inf
   NetworkPkg/Udp6Dxe/Udp6Dxe.inf
   NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
   NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
-  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  NetworkPkg/IScsiDxe/IScsiDxe.inf
-!else
-  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
-  MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
 !endif
 !if $(HTTP_BOOT_ENABLE) == TRUE
   NetworkPkg/DnsDxe/DnsDxe.inf
diff --git a/OvmfPkg/OvmfPkgIa32X64.fdf b/OvmfPkg/OvmfPkgIa32X64.fdf
index 70845d6972fd..f36c7e741c8e 100644
--- a/OvmfPkg/OvmfPkgIa32X64.fdf
+++ b/OvmfPkg/OvmfPkgIa32X64.fdf
@@ -315,18 +315,14 @@ [FV.DXEFV]
   INF  MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
   INF  MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
   INF  MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf

[edk2] [PATCH v2 2/3] ArmVirtPkg: Replace obsoleted network drivers from platform DSC/FDF.

2018-11-05 Thread Fu Siyuan
V2:
Add missing library instance for NetworkPkg iSCSI driver.

This patch replaces the MdeModulePkg TCP, PXE and iSCSI driver with those
ones in NetworkPkg. These 3 drivers in MdeModulePkg are not being actively
maintained and will be removed from edk2 master soon.

Cc: Laszlo Ersek 
Cc: Ard Biesheuvel 
Cc: Julien Grall 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Fu Siyuan 
---
 ArmVirtPkg/ArmVirtQemu.dsc   | 13 ++---
 ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc | 10 +++---
 ArmVirtPkg/ArmVirtQemuKernel.dsc | 13 ++---
 3 files changed, 15 insertions(+), 21 deletions(-)

diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
index 885c6b14b844..0f403973bea0 100644
--- a/ArmVirtPkg/ArmVirtQemu.dsc
+++ b/ArmVirtPkg/ArmVirtQemu.dsc
@@ -70,6 +70,9 @@ [LibraryClasses.common.PEIM]
 
 [LibraryClasses.common.UEFI_DRIVER]
   UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
+  BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
+  OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
+  IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
 
 

 #
@@ -346,18 +349,14 @@ [Components.common]
   MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
   MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
   MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
+  NetworkPkg/TcpDxe/TcpDxe.inf
+  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
+  NetworkPkg/IScsiDxe/IScsiDxe.inf
 !if $(NETWORK_IP6_ENABLE) == TRUE
   NetworkPkg/Ip6Dxe/Ip6Dxe.inf
-  NetworkPkg/TcpDxe/TcpDxe.inf
   NetworkPkg/Udp6Dxe/Udp6Dxe.inf
   NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
   NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
-  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  NetworkPkg/IScsiDxe/IScsiDxe.inf
-!else
-  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
-  MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
 !endif
 !if $(HTTP_BOOT_ENABLE) == TRUE
   NetworkPkg/DnsDxe/DnsDxe.inf
diff --git a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc 
b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
index a6390bd4b841..3316f982695f 100644
--- a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
+++ b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
@@ -126,18 +126,14 @@ [FV.FvMain]
   INF MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
   INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
   INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
+  INF NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
+  INF NetworkPkg/IScsiDxe/IScsiDxe.inf
+  INF NetworkPkg/TcpDxe/TcpDxe.inf
 !if $(NETWORK_IP6_ENABLE) == TRUE
   INF NetworkPkg/Ip6Dxe/Ip6Dxe.inf
-  INF NetworkPkg/TcpDxe/TcpDxe.inf
   INF NetworkPkg/Udp6Dxe/Udp6Dxe.inf
   INF NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
   INF NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
-  INF NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  INF NetworkPkg/IScsiDxe/IScsiDxe.inf
-!else
-  INF MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
-  INF MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  INF MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
 !endif
 !if $(HTTP_BOOT_ENABLE) == TRUE
   INF NetworkPkg/DnsDxe/DnsDxe.inf
diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc
index 434d6861a56f..4920a66f2fdb 100644
--- a/ArmVirtPkg/ArmVirtQemuKernel.dsc
+++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc
@@ -67,6 +67,9 @@ [LibraryClasses.common]
 
 [LibraryClasses.common.UEFI_DRIVER]
   UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
+  BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
+  OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
+  IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
 
 [BuildOptions.ARM.EDKII.SEC, BuildOptions.ARM.EDKII.BASE]
   # Avoid MOVT/MOVW instruction pairs in code that may end up in the PIE
@@ -335,18 +338,14 @@ [Components.common]
   MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
   MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
   MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
+  NetworkPkg/TcpDxe/TcpDxe.inf
+  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
+  NetworkPkg/IScsiDxe/IScsiDxe.inf
 !if $(NETWORK_IP6_ENABLE) == TRUE
   NetworkPkg/Ip6Dxe/Ip6Dxe.inf
-  NetworkPkg/TcpDxe/TcpDxe.inf
   NetworkPkg/Udp6Dxe/Udp6Dxe.inf
   NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
   NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
-  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  NetworkPkg/IScsiDxe/IScsiDxe.inf
-!else
-  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
-  MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
 !endif
 !if $(HTTP_BOOT_ENABLE) == TRUE
   NetworkPkg/DnsDxe/DnsDxe.inf
-- 
2.19.1.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH v2 1/3] Vlv2TbltDevicePkg: Replace obsoleted drivers from platform DSC/FDF.

2018-11-05 Thread Fu Siyuan
V2:
Add missed library instance for NetworkPkg iSCSI driver.

This patch replaces the MdeModulePkg TCP, PXE and iSCSI driver with those
ones in NetworkPkg. These 3 drivers in MdeModulePkg are not being actively
maintained and will be removed from edk2 master soon.

Cc: David Wei 
Cc: Mang Guo 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Fu Siyuan 
---
 Vlv2TbltDevicePkg/PlatformPkg.fdf   | 14 +++---
 Vlv2TbltDevicePkg/PlatformPkgGcc.fdf| 14 +++---
 Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc | 20 
 Vlv2TbltDevicePkg/PlatformPkgIA32.dsc   | 20 
 Vlv2TbltDevicePkg/PlatformPkgX64.dsc| 20 
 5 files changed, 18 insertions(+), 70 deletions(-)

diff --git a/Vlv2TbltDevicePkg/PlatformPkg.fdf 
b/Vlv2TbltDevicePkg/PlatformPkg.fdf
index b7a0e584deeb..241314bed4e9 100644
--- a/Vlv2TbltDevicePkg/PlatformPkg.fdf
+++ b/Vlv2TbltDevicePkg/PlatformPkg.fdf
@@ -744,6 +744,9 @@ [FV.FVMAIN]
   INF  MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
   INF  MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
   INF  MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
+  INF  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
+  INF  NetworkPkg/TcpDxe/TcpDxe.inf
+  INF  NetworkPkg/IScsiDxe/IScsiDxe.inf
   !if $(NETWORK_IP6_ENABLE) == TRUE
   INF  NetworkPkg/Ip6Dxe/Ip6Dxe.inf
   INF  NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
@@ -751,22 +754,11 @@ [FV.FVMAIN]
   INF  NetworkPkg/Udp6Dxe/Udp6Dxe.inf
   INF  NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
   !endif
-  !if $(NETWORK_IP6_ENABLE) == TRUE
-  INF  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  INF  NetworkPkg/TcpDxe/TcpDxe.inf
-  !else
-  INF  MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  INF  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
-  !endif
   !if $(NETWORK_VLAN_ENABLE) == TRUE
   INF  MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
   !endif
   !if $(NETWORK_ISCSI_ENABLE) == TRUE
-  !if $(NETWORK_IP6_ENABLE) == TRUE
 INF  NetworkPkg/IScsiDxe/IScsiDxe.inf
-  !else
-INF  MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
-  !endif
   !endif
 !endif
 
diff --git a/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf 
b/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
index eca273e33f88..356649277289 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
+++ b/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
@@ -700,6 +700,9 @@ [FV.FVMAIN]
   INF  MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
   INF  MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
   INF  MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
+  INF  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
+  INF  NetworkPkg/TcpDxe/TcpDxe.inf
+  INF  NetworkPkg/IScsiDxe/IScsiDxe.inf
   !if $(NETWORK_IP6_ENABLE) == TRUE
   INF  NetworkPkg/Ip6Dxe/Ip6Dxe.inf
   INF  NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
@@ -707,22 +710,11 @@ [FV.FVMAIN]
   INF  NetworkPkg/Udp6Dxe/Udp6Dxe.inf
   INF  NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
   !endif
-  !if $(NETWORK_IP6_ENABLE) == TRUE
-  INF  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  INF  NetworkPkg/TcpDxe/TcpDxe.inf
-  !else
-  INF  MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  INF  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
-  !endif
   !if $(NETWORK_VLAN_ENABLE) == TRUE
   INF  MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
   !endif
   !if $(NETWORK_ISCSI_ENABLE) == TRUE
-  !if $(NETWORK_IP6_ENABLE) == TRUE
 INF  NetworkPkg/IScsiDxe/IScsiDxe.inf
-  !else
-INF  MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
-  !endif
   !endif
 !endif
 
diff --git a/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc 
b/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
index 3e3522aee908..f0a689c2c428 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
+++ b/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
@@ -285,7 +285,7 @@ [LibraryClasses.common]
   ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
   FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
   SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
-!if $(FTPM_ENABLE) == TRUE
+!if $(FTPM_ENABLE) == TRUE || $(NETWORK_ISCSI_ENABLE) == TRUE
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
   OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
   IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
@@ -1528,11 +1528,7 @@ [Components.X64]
 
 !if $(NETWORK_ENABLE) == TRUE
   !if $(NETWORK_ISCSI_ENABLE) == TRUE
-!if $(NETWORK_IP6_ENABLE) == TRUE
-  NetworkPkg/IScsiDxe/IScsiDxe.inf
-!else
-  MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
-!endif
+NetworkPkg/IScsiDxe/IScsiDxe.inf
   !endif
   !if $(NETWORK_VLAN_ENABLE) == TRUE
 MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
@@ -1554,24 +1550,16 @@ [Components.X64]
 MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
 MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
 MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
-MdeModulePkg/Universal/Network/Tcp4Dxe

[edk2] [PATCH v2 2/2] Edk2Platforms: Replace MdeModulePkg PXE/iSCSI/TCP with NetworkPkg drivers.

2018-11-04 Thread Fu Siyuan
V2:
Additional fixups required for NetworkPkg migration

The PXE/iSCSI/TCP drivers in MdeModulePkg are going to be deprecated. All
platform DSC/FDF files should be updated to use the dual-stack drivers in
NetworkPkg.

The NetworkPkg driver have all the functionality compared with MdeModulePkg
one, with more bug fixes and new feature added. While its image size will
be a little bigger because it contains both IPv4 and IPv6 stack support,
so it may cause build error in a platform if the flash space is very tight.
Basically, this patch won't cause any other problem if build could pass.

I haven't built all the updated platform because the repo ReadMe doesn't
provide a method to build them on Windows Environment, so I would very
appreciate if anybody can help to test the build or tell me how to build
it on Windows.

Cc: Ard Biesheuvel 
Cc: Leif Lindholm 
Cc: Michael D Kinney 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Fu Siyuan 
Signed-off-by: Leif Lindholm 
---
 Platform/AMD/OverdriveBoard/OverdriveBoard.dsc  |  6 +++---
 Platform/AMD/OverdriveBoard/OverdriveBoard.fdf  |  6 +++---
 Platform/ARM/SgiPkg/SgiPlatform.fdf |  6 +++---
 Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.dsc   |  1 +
 Platform/ARM/VExpressPkg/ArmVExpress-networking.fdf.inc |  6 +++---
 Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc| 13 +++--
 Platform/Comcast/RDKQemu/RDKQemu.dsc| 10 +++---
 Platform/Hisilicon/D03/D03.dsc  |  4 ++--
 Platform/Hisilicon/D03/D03.fdf  |  4 ++--
 Platform/Hisilicon/D05/D05.dsc  | 11 +++
 Platform/Hisilicon/D05/D05.fdf  |  9 +++--
 Platform/Hisilicon/D06/D06.dsc  | 11 +++
 Platform/Hisilicon/D06/D06.fdf  |  9 +++--
 Platform/Hisilicon/HiKey/HiKey.dsc  |  4 ++--
 Platform/Hisilicon/HiKey/HiKey.fdf  |  4 ++--
 Platform/Hisilicon/HiKey960/HiKey960.dsc|  4 ++--
 Platform/Hisilicon/HiKey960/HiKey960.fdf|  4 ++--
 Platform/LeMaker/CelloBoard/CelloBoard.dsc  | 11 ---
 Platform/LeMaker/CelloBoard/CelloBoard.fdf  |  6 +++---
 Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc |  6 +++---
 Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.fdf |  6 +++---
 Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc   |  4 ++--
 Silicon/Marvell/Armada7k8k/Armada7k8k.fdf   |  4 ++--
 23 files changed, 68 insertions(+), 81 deletions(-)

diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc 
b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
index 9f9885fda8..51327a67df 100644
--- a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
+++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
@@ -669,11 +669,11 @@ DEFINE DO_CAPSULE   = FALSE
   }
   MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
   MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
-  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
   MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
-  MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
+  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
+  NetworkPkg/TcpDxe/TcpDxe.inf
 ## Bug https://bugs.linaro.org/show_bug.cgi?id=2239
-# MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
+# NetworkPkg/IScsiDxe/IScsiDxe.inf
 
   #
   # Core Info
diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf 
b/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf
index 0394b8a96f..bf4e6f3283 100644
--- a/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf
+++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf
@@ -204,11 +204,11 @@ READ_LOCK_STATUS   = TRUE
   INF MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
   INF MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
   INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
-  INF MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
   INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
-  INF MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
+  INF NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
+  INF NetworkPkg/TcpDxe/TcpDxe.inf
 ## Bug https://bugs.linaro.org/show_bug.cgi?id=2239
-# INF MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
+# INF NetworkPkg/IScsiDxe/IScsiDxe.inf
 
   #
   # Core Info
diff --git a/Platform/ARM/SgiPkg/SgiPlatform.fdf 
b/Platform/ARM/SgiPkg/SgiPlatform.fdf
index fd87563246..c9129841d7 100644
--- a/Platform/ARM/SgiPkg/SgiPlatform.fdf
+++ b/Platform/ARM/SgiPkg/SgiPlatform.fdf
@@ -185,10 +185,10 @@ READ_LOCK_STATUS   = TRUE
   INF MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
   INF MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
   INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
-  INF MdeModu

[edk2] [PATCH v2 0/2] Update platform DSC/FDF files for NetworkPkg migration.

2018-11-04 Thread Fu Siyuan
Patch 1/2 fixes the line ending issue introduced by Ccommit 1a13dfd37fe7
("Hisilicon/D0x: Switch to generic PciHostBridge driver").

Patch 2/2 updates all platform DSC/FDF files for NetworkPkg migration.

Fu Siyuan (1):
  Edk2Platforms: Replace MdeModulePkg PXE/iSCSI/TCP with NetworkPkg
drivers.

Leif Lindholm (1):
  Platform/Hisilicon: CRLF fixups for D05.dsc

 .../AMD/OverdriveBoard/OverdriveBoard.dsc |  6 ++---
 .../AMD/OverdriveBoard/OverdriveBoard.fdf |  6 ++---
 Platform/ARM/SgiPkg/SgiPlatform.fdf   |  6 ++---
 .../ARM/VExpressPkg/ArmVExpress-CTA15-A7.dsc  |  1 +
 .../ArmVExpress-networking.fdf.inc|  6 ++---
 Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc  | 13 +-
 Platform/Comcast/RDKQemu/RDKQemu.dsc  | 10 +++-
 Platform/Hisilicon/D03/D03.dsc|  4 +--
 Platform/Hisilicon/D03/D03.fdf|  4 +--
 Platform/Hisilicon/D05/D05.dsc| 25 ---
 Platform/Hisilicon/D05/D05.fdf|  9 +++
 Platform/Hisilicon/D06/D06.dsc| 11 +++-
 Platform/Hisilicon/D06/D06.fdf|  9 +++
 Platform/Hisilicon/HiKey/HiKey.dsc|  4 +--
 Platform/Hisilicon/HiKey/HiKey.fdf|  4 +--
 Platform/Hisilicon/HiKey960/HiKey960.dsc  |  4 +--
 Platform/Hisilicon/HiKey960/HiKey960.fdf  |  4 +--
 Platform/LeMaker/CelloBoard/CelloBoard.dsc| 11 +---
 Platform/LeMaker/CelloBoard/CelloBoard.fdf|  6 ++---
 .../Overdrive1000Board/Overdrive1000Board.dsc |  6 ++---
 .../Overdrive1000Board/Overdrive1000Board.fdf |  6 ++---
 Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc |  4 +--
 Silicon/Marvell/Armada7k8k/Armada7k8k.fdf |  4 +--
 23 files changed, 75 insertions(+), 88 deletions(-)

-- 
2.19.1.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH v2 1/2] Platform/Hisilicon: CRLF fixups for D05.dsc

2018-11-04 Thread Fu Siyuan
From: Leif Lindholm 

Commit 1a13dfd37fe7 ("Hisilicon/D0x: Switch to generic PciHostBridge
driver") introduced some incorrect line endings, fix those here.

Cc: Ard Biesheuvel 
Cc: Leif Lindholm 
Cc: Michael D Kinney 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Leif Lindholm 
---
 Platform/Hisilicon/D05/D05.dsc | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/Platform/Hisilicon/D05/D05.dsc b/Platform/Hisilicon/D05/D05.dsc
index 1040466633..e5fb5411d7 100644
--- a/Platform/Hisilicon/D05/D05.dsc
+++ b/Platform/Hisilicon/D05/D05.dsc
@@ -97,10 +97,10 @@
 
   LpcLib|Silicon/Hisilicon/Hi1610/Library/LpcLib/LpcLib.inf
   
SerialPortLib|ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.inf
-  
PlatformPciLib|Platform/Hisilicon/D05/Library/PlatformPciLib/PlatformPciLib.inf
+  
PlatformPciLib|Platform/Hisilicon/D05/Library/PlatformPciLib/PlatformPciLib.inf
   
PciHostBridgeLib|Platform/Hisilicon/Library/PciHostBridgeLib/PciHostBridgeLib.inf
   
PciSegmentLib|Silicon/Hisilicon/Hi1610/Library/Hi161xPciSegmentLib/Hi161xPciSegmentLib.inf
-  
PciPlatformLib|Silicon/Hisilicon/Hi1610/Library/Hi161xPciPlatformLib/Hi161xPciPlatformLib.inf
+  
PciPlatformLib|Silicon/Hisilicon/Hi1610/Library/Hi161xPciPlatformLib/Hi161xPciPlatformLib.inf
 
 [LibraryClasses.common.SEC]
   
ArmPlatformLib|Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/ArmPlatformLibSec.inf
@@ -138,7 +138,7 @@
 
 [PcdsFixedAtBuild.common]
   gArmPlatformTokenSpaceGuid.PcdCoreCount|8
-  gArmTokenSpaceGuid.PcdPciIoTranslation|0
+  gArmTokenSpaceGuid.PcdPciIoTranslation|0
 
   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000
 
@@ -477,7 +477,7 @@
   ArmPkg/Drivers/CpuDxe/CpuDxe.inf
   MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
 
-  ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf
+  ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf
   Platform/Hisilicon/D03/Drivers/OemNicConfig2PHi1610/OemNicConfig2P.inf
 
   Platform/Hisilicon/D05/Drivers/SFC/SfcDxeDriver.inf
@@ -618,10 +618,10 @@
 
   NULL|Platform/Hisilicon/D05/Library/PlatformPciLib/PlatformPciLib.inf
   }
-  Silicon/Hisilicon/Drivers/PciPlatform/PciPlatform.inf {
+  Silicon/Hisilicon/Drivers/PciPlatform/PciPlatform.inf {
 
-  NULL|Platform/Hisilicon/D05/Library/PlatformPciLib/PlatformPciLib.inf
-  }
+  NULL|Platform/Hisilicon/D05/Library/PlatformPciLib/PlatformPciLib.inf
+  }
   MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf {
 
   NULL|Platform/Hisilicon/D05/Library/PlatformPciLib/PlatformPciLib.inf
-- 
2.19.1.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] Plan to move all network components to NetworkPkg

2018-11-02 Thread Fu, Siyuan
Hi, All

The edk2 Bugzilla #1278 "Delete IPv4 only TCP/iSCSI/PXE drivers in 
MdeModulePkg" has been confirmed to be included in edk2-stable201903 tag, so 
platform DSC/FDF need to be updated to adopt the change by that time. I think 
might be an opportunity moment to make a little more - move all edk2 network 
related drivers/libraries into one single package - that what we want to do for 
a long time.

In current edk2, the network stack components are located mainly in 2 different 
places, the MdeModulePkg and NetworkPkg, due to some historical reasons. The 
MdeModulePkg contains most of the IPv4 stack drivers (in 
MdeModulePkg/Universal/Network directory), and all the network libraries. The 
NetworkPkg contains all the IPv6 stack drivers and also some dual stack drivers 
(like TcpDxe). The PCDs related to network configuration are also defined in 
different packages: PcdTftpBlockSize is in MdeModulePkg.dec and others are in 
NetworkPkg.dec. There are also drivers in these 2 packages have a same name 
(like UefiPxeBcDxe).

We can see these codes are not well organized, so I'd like to take this 
opportunity to change this situation, to move all network components to 
NetworkPkg, which will make the edk2 network stack code easier to use and 
maintain in the future.

I have created Bugzilla #1293 for this proposal, and I will send some patches 
for the detail changes. I hope it could be done together with #1278 so the 
platform only need to update their DSC/FDF file for one time. Please let me 
know if you have any comments on this, thanks.

https://bugzilla.tianocore.org/show_bug.cgi?id=1293

BestRegards
Fu Siyuan

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v1] NetworkPkg/Mtftp6Dxe: Remove the trailing white spaces.

2018-10-31 Thread Fu, Siyuan



Reviewed-by: Fu Siyuan 


> -Original Message-
> From: Wu, Jiaxin
> Sent: Wednesday, October 31, 2018 4:46 PM
> To: edk2-devel@lists.01.org
> Cc: Fu, Siyuan ; Wu, Jiaxin 
> Subject: [PATCH v1] NetworkPkg/Mtftp6Dxe: Remove the trailing white spaces.
> 
> Cc: Fu Siyuan 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Wu Jiaxin 
> ---
>  NetworkPkg/Mtftp6Dxe/Mtftp6Impl.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/NetworkPkg/Mtftp6Dxe/Mtftp6Impl.h
> b/NetworkPkg/Mtftp6Dxe/Mtftp6Impl.h
> index 57f4cb6f5d..f0279daca3 100644
> --- a/NetworkPkg/Mtftp6Dxe/Mtftp6Impl.h
> +++ b/NetworkPkg/Mtftp6Dxe/Mtftp6Impl.h
> @@ -84,11 +84,11 @@ struct _MTFTP6_INSTANCE {
> 
>//
>// Record the total received and saved block number.
>//
>UINT64TotalBlock;
> -
> +
>//
>// Record the acked block number.
>//
>UINT64AckedBlock;
> 
> --
> 2.17.1.windows.2

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v1] Edk2Platforms: Replace MdeModulePkg PXE/iSCSI/TCP with NetworkPkg drivers.

2018-10-31 Thread Fu, Siyuan
Hi, Leif

So you have tested all the platform build? That's great, thanks a lot.

Do you want me to merge these 3 patches to a combo v2 patch, or can you help to 
commit the patch set to edk2-platform repo?

BestRegards
Fu Siyuan


> -Original Message-
> From: Leif Lindholm [mailto:leif.lindh...@linaro.org]
> Sent: Thursday, November 1, 2018 12:53 AM
> To: Fu, Siyuan 
> Cc: edk2-devel@lists.01.org; Ard Biesheuvel ;
> Kinney, Michael D 
> Subject: Re: [PATCH v1] Edk2Platforms: Replace MdeModulePkg PXE/iSCSI/TCP
> with NetworkPkg drivers.
> 
> On Wed, Oct 31, 2018 at 11:38:51AM +0800, Fu Siyuan wrote:
> > The PXE/iSCSI/TCP drivers in MdeModulePkg are going to be deprecated.
> All
> > platform DSC/FDF files should be updated to use the dual-stack drivers
> in
> > NetworkPkg.
> >
> > The NetworkPkg driver have all the functionality compared with
> MdeModulePkg
> > one, with more bug fixes and new feature added. While its image size
> will
> > be a little bigger because it contains both IPv4 and IPv6 stack support,
> > so it may cause build error in a platform if the flash space is very
> tight.
> > Basically, this patch won't cause any other problem if build could pass.
> >
> > I haven't built all the updated platform because the repo ReadMe doesn't
> > provide a method to build them on Windows Environment, so I would very
> > appreciate if anybody can help to test the build or tell me how to build
> > it on Windows.
> 
> There are still some changes required to core ARM code to permit
> building full platform ports with Visual Studio. And I wouldn't ask
> you to set up a GCC windows development environment if you don't
> already have one.
> 
> I have added some additional modifications required to permit all of
> the platforms on master to build correctly after applying your
> patch. You can find them in the top commit of
> https://git.linaro.org/people/leif.lindholm/edk2-
> platforms.git/log/?h=networkpkg-fixups
> (plus a line ending fixup required to make that patch apply cleanly).
> 
> Regards,
> 
> Leif
> 
> > Cc: Ard Biesheuvel 
> > Cc: Leif Lindholm 
> > Cc: Michael D Kinney 
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Fu Siyuan 
> > ---
> >  Platform/AMD/OverdriveBoard/OverdriveBoard.dsc  |  6 +++---
> >  Platform/AMD/OverdriveBoard/OverdriveBoard.fdf  |  6 +++---
> >  Platform/ARM/SgiPkg/SgiPlatform.fdf |  6 +++---
> >  Platform/ARM/VExpressPkg/ArmVExpress-networking.fdf.inc |  6 +++---
> >  Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc|  6 +++---
> >  Platform/Comcast/RDKQemu/RDKQemu.dsc| 10 +++---
> 
> >  Platform/Hisilicon/D03/D03.dsc  |  4 ++--
> >  Platform/Hisilicon/D03/D03.fdf  |  4 ++--
> >  Platform/Hisilicon/D05/D05.dsc  |  9 +++---
> ---
> >  Platform/Hisilicon/D05/D05.fdf  |  9 +++---
> ---
> >  Platform/Hisilicon/D06/D06.dsc  |  9 +++---
> ---
> >  Platform/Hisilicon/D06/D06.fdf  |  9 +++---
> ---
> >  Platform/Hisilicon/HiKey/HiKey.dsc  |  4 ++--
> >  Platform/Hisilicon/HiKey/HiKey.fdf  |  4 ++--
> >  Platform/Hisilicon/HiKey960/HiKey960.dsc|  4 ++--
> >  Platform/Hisilicon/HiKey960/HiKey960.fdf|  4 ++--
> >  Platform/LeMaker/CelloBoard/CelloBoard.dsc  |  6 +++---
> >  Platform/LeMaker/CelloBoard/CelloBoard.fdf  |  6 +++---
> >  Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc |  6 +++---
> >  Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.fdf |  6 +++---
> >  Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc   |  4 ++--
> >  Silicon/Marvell/Armada7k8k/Armada7k8k.fdf   |  4 ++--
> >  22 files changed, 58 insertions(+), 74 deletions(-)
> >
> > diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
> b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
> > index 9f9885fda8..51327a67df 100644
> > --- a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
> > +++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
> > @@ -669,11 +669,11 @@ DEFINE DO_CAPSULE   = FALSE
> >}
> >MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
> >MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
> > -  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
> >MdeM

Re: [edk2] [PATCH v1] NetworkPkg/TlsDxe: Fix failure to process multiple TLS records.

2018-10-30 Thread Fu, Siyuan
Reviewed-by: Fu Siyuan 


> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Jiaxin Wu
> Sent: Wednesday, October 31, 2018 1:42 PM
> To: edk2-devel@lists.01.org
> Cc: Ye, Ting ; Fu, Siyuan ; Wu,
> Jiaxin 
> Subject: [edk2] [PATCH v1] NetworkPkg/TlsDxe: Fix failure to process
> multiple TLS records.
> 
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1290.
> 
> Current implementation failed to parse the multiple TLS record
> messages due to the incorrect pointer of TLS record header. This
> patch is to resolve that problem.
> 
> Cc: Ye Ting 
> Cc: Fu Siyuan 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Wu Jiaxin 
> ---
>  NetworkPkg/TlsDxe/TlsImpl.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/NetworkPkg/TlsDxe/TlsImpl.c b/NetworkPkg/TlsDxe/TlsImpl.c
> index ea83dbd04f..2d4169b0a5 100644
> --- a/NetworkPkg/TlsDxe/TlsImpl.c
> +++ b/NetworkPkg/TlsDxe/TlsImpl.c
> @@ -142,11 +142,11 @@ TlsEncryptPacket (
>  }
> 
>  BufferOutSize += ThisMessageSize;
> 
>  BufferInPtr += TLS_RECORD_HEADER_LENGTH + ThisPlainMessageSize;
> -TempRecordHeader += ThisMessageSize;
> +TempRecordHeader = (TLS_RECORD_HEADER *)((UINT8 *)TempRecordHeader +
> ThisMessageSize);
>}
> 
>FreePool (BufferIn);
>BufferIn = NULL;
> 
> @@ -315,11 +315,11 @@ TlsDecryptPacket (
>  CopyMem (TempRecordHeader, RecordHeaderIn, TLS_RECORD_HEADER_LENGTH);
>  TempRecordHeader->Length = ThisPlainMessageSize;
>  BufferOutSize += TLS_RECORD_HEADER_LENGTH + ThisPlainMessageSize;
> 
>  BufferInPtr += TLS_RECORD_HEADER_LENGTH + ThisCipherMessageSize;
> -TempRecordHeader += TLS_RECORD_HEADER_LENGTH + ThisPlainMessageSize;
> +TempRecordHeader = (TLS_RECORD_HEADER *)((UINT8 *)TempRecordHeader +
> TLS_RECORD_HEADER_LENGTH + ThisPlainMessageSize);
>}
> 
>FreePool (BufferIn);
>BufferIn = NULL;
> 
> --
> 2.17.1.windows.2
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH v1] Edk2Platforms: Replace MdeModulePkg PXE/iSCSI/TCP with NetworkPkg Drivers.

2018-10-30 Thread Fu Siyuan
The PXE/iSCSI/TCP drivers in MdeModulePkg are going to be deprecated. All
platform DSC/FDF files should be updated to use the dual-stack drivers in
NetworkPkg.

Cc: Michael A Kubacki 
Cc: Jiewen Yao 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Fu Siyuan 
---
 Platform/Intel/AdvancedFeaturePkg/Include/Dsc/CoreAdvancedDxeInclude.dsc  | 7 
++-
 Platform/Intel/AdvancedFeaturePkg/Include/Fdf/CoreAdvancedLateInclude.fdf | 7 
++-
 Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc   | 3 
+--
 3 files changed, 5 insertions(+), 12 deletions(-)

diff --git 
a/Platform/Intel/AdvancedFeaturePkg/Include/Dsc/CoreAdvancedDxeInclude.dsc 
b/Platform/Intel/AdvancedFeaturePkg/Include/Dsc/CoreAdvancedDxeInclude.dsc
index 4d70db6062..6764d46131 100644
--- a/Platform/Intel/AdvancedFeaturePkg/Include/Dsc/CoreAdvancedDxeInclude.dsc
+++ b/Platform/Intel/AdvancedFeaturePkg/Include/Dsc/CoreAdvancedDxeInclude.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  Platform description.
 #
-# Copyright (c) 2017, Intel Corporation. All rights reserved.
+# Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.
 #
 # This program and the accompanying materials are licensed and made available 
under
 # the terms and conditions of the BSD License which accompanies this 
distribution.
@@ -26,10 +26,7 @@
   MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
   MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
   MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
-  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
   MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
-  MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
-  #MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
 
   NetworkPkg/Ip6Dxe/Ip6Dxe.inf
   NetworkPkg/TcpDxe/TcpDxe.inf
@@ -42,7 +39,7 @@
   NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf
   NetworkPkg/HttpBootDxe/HttpBootDxe.inf
 
-  #NetworkPkg/IScsiDxe/IScsiDxe.inf
+  NetworkPkg/IScsiDxe/IScsiDxe.inf
   NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
 !endif
 
diff --git 
a/Platform/Intel/AdvancedFeaturePkg/Include/Fdf/CoreAdvancedLateInclude.fdf 
b/Platform/Intel/AdvancedFeaturePkg/Include/Fdf/CoreAdvancedLateInclude.fdf
index 0be408d13b..64f1dd5872 100644
--- a/Platform/Intel/AdvancedFeaturePkg/Include/Fdf/CoreAdvancedLateInclude.fdf
+++ b/Platform/Intel/AdvancedFeaturePkg/Include/Fdf/CoreAdvancedLateInclude.fdf
@@ -1,7 +1,7 @@
 ## @file
 #  FDF file of Platform.
 #
-# Copyright (c) 2017, Intel Corporation. All rights reserved.
+# Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.
 #
 # This program and the accompanying materials are licensed and made available 
under
 # the terms and conditions of the BSD License which accompanies this 
distribution.
@@ -27,9 +27,6 @@ INF  MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
 INF  MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
 INF  MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
 INF  MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
-#INF  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
-INF  MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
-#INF  MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
 
 INF  NetworkPkg/Ip6Dxe/Ip6Dxe.inf
 INF  NetworkPkg/TcpDxe/TcpDxe.inf
@@ -42,7 +39,7 @@ INF  NetworkPkg/HttpDxe/HttpDxe.inf
 INF  NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf
 INF  NetworkPkg/HttpBootDxe/HttpBootDxe.inf
 
-#INF  NetworkPkg/IScsiDxe/IScsiDxe.inf
+INF  NetworkPkg/IScsiDxe/IScsiDxe.inf
 INF  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
 !endif
 
diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc 
b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
index 2174eaa609..dd0173a1af 100644
--- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
+++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  Platform description.
 #
-# Copyright (c) 2017, Intel Corporation. All rights reserved.
+# Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.
 #
 # This program and the accompanying materials are licensed and made available 
under
 # the terms and conditions of the BSD License which accompanies this 
distribution.
@@ -83,7 +83,6 @@
   UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf
   TcpIoLib|MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.inf
   DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
-  TcpIoLib|MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.inf
   
OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
   CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
 
-- 
2.19.1.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH v1] Edk2Platforms: Replace MdeModulePkg PXE/iSCSI/TCP with NetworkPkg drivers.

2018-10-30 Thread Fu Siyuan
The PXE/iSCSI/TCP drivers in MdeModulePkg are going to be deprecated. All
platform DSC/FDF files should be updated to use the dual-stack drivers in
NetworkPkg.

The NetworkPkg driver have all the functionality compared with MdeModulePkg
one, with more bug fixes and new feature added. While its image size will
be a little bigger because it contains both IPv4 and IPv6 stack support,
so it may cause build error in a platform if the flash space is very tight.
Basically, this patch won't cause any other problem if build could pass.

I haven't built all the updated platform because the repo ReadMe doesn't
provide a method to build them on Windows Environment, so I would very
appreciate if anybody can help to test the build or tell me how to build
it on Windows.

Cc: Ard Biesheuvel 
Cc: Leif Lindholm 
Cc: Michael D Kinney 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Fu Siyuan 
---
 Platform/AMD/OverdriveBoard/OverdriveBoard.dsc  |  6 +++---
 Platform/AMD/OverdriveBoard/OverdriveBoard.fdf  |  6 +++---
 Platform/ARM/SgiPkg/SgiPlatform.fdf |  6 +++---
 Platform/ARM/VExpressPkg/ArmVExpress-networking.fdf.inc |  6 +++---
 Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc|  6 +++---
 Platform/Comcast/RDKQemu/RDKQemu.dsc| 10 +++---
 Platform/Hisilicon/D03/D03.dsc  |  4 ++--
 Platform/Hisilicon/D03/D03.fdf  |  4 ++--
 Platform/Hisilicon/D05/D05.dsc  |  9 +++--
 Platform/Hisilicon/D05/D05.fdf  |  9 +++--
 Platform/Hisilicon/D06/D06.dsc  |  9 +++--
 Platform/Hisilicon/D06/D06.fdf  |  9 +++--
 Platform/Hisilicon/HiKey/HiKey.dsc  |  4 ++--
 Platform/Hisilicon/HiKey/HiKey.fdf  |  4 ++--
 Platform/Hisilicon/HiKey960/HiKey960.dsc|  4 ++--
 Platform/Hisilicon/HiKey960/HiKey960.fdf|  4 ++--
 Platform/LeMaker/CelloBoard/CelloBoard.dsc  |  6 +++---
 Platform/LeMaker/CelloBoard/CelloBoard.fdf  |  6 +++---
 Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc |  6 +++---
 Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.fdf |  6 +++---
 Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc   |  4 ++--
 Silicon/Marvell/Armada7k8k/Armada7k8k.fdf   |  4 ++--
 22 files changed, 58 insertions(+), 74 deletions(-)

diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc 
b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
index 9f9885fda8..51327a67df 100644
--- a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
+++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
@@ -669,11 +669,11 @@ DEFINE DO_CAPSULE   = FALSE
   }
   MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
   MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
-  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
   MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
-  MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
+  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
+  NetworkPkg/TcpDxe/TcpDxe.inf
 ## Bug https://bugs.linaro.org/show_bug.cgi?id=2239
-# MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
+# NetworkPkg/IScsiDxe/IScsiDxe.inf
 
   #
   # Core Info
diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf 
b/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf
index 0394b8a96f..bf4e6f3283 100644
--- a/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf
+++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf
@@ -204,11 +204,11 @@ READ_LOCK_STATUS   = TRUE
   INF MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
   INF MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
   INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
-  INF MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
   INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
-  INF MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
+  INF NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
+  INF NetworkPkg/TcpDxe/TcpDxe.inf
 ## Bug https://bugs.linaro.org/show_bug.cgi?id=2239
-# INF MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
+# INF NetworkPkg/IScsiDxe/IScsiDxe.inf
 
   #
   # Core Info
diff --git a/Platform/ARM/SgiPkg/SgiPlatform.fdf 
b/Platform/ARM/SgiPkg/SgiPlatform.fdf
index fd87563246..c9129841d7 100644
--- a/Platform/ARM/SgiPkg/SgiPlatform.fdf
+++ b/Platform/ARM/SgiPkg/SgiPlatform.fdf
@@ -185,10 +185,10 @@ READ_LOCK_STATUS   = TRUE
   INF MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
   INF MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
   INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
-  INF MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
   INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
-  INF MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  I

Re: [edk2] Reminder for deleting 3 network drivers in MdeModulePkg

2018-10-30 Thread Fu, Siyuan
Hi, Leif

Just notice that you are saying edk2-stable201811 tag. 

We need more time to collect community/marketing feedback on deleting these 
driver, so it may won't be able to catch the stable tag in next month.

BestRegards
Fu Siyuan


> -Original Message-
> From: Fu, Siyuan
> Sent: Wednesday, October 31, 2018 8:49 AM
> To: Leif Lindholm 
> Cc: edk2-devel@lists.01.org
> Subject: RE: [edk2] Reminder for deleting 3 network drivers in
> MdeModulePkg
> 
> Hi, Leif
> 
> I think checking the branch is a little better than the tag, because we
> may still have critical bug fixes after the official release.
> 
> While any of them are not recommended, always using the NetworkPkg version
> driver is the best choice.
> 
> I will modify the edk2 network wiki page for an updated sample DSC/FDF
> section, if this patch could pass review w/o objection.
> https://github.com/tianocore/tianocore.github.io/wiki/NetworkPkg-Getting-
> Started-Guide
> 
> 
> BestRegards
> Fu Siyuan
> 
> 
> > -Original Message-
> > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> > Leif Lindholm
> > Sent: Tuesday, October 30, 2018 6:47 PM
> > To: Fu, Siyuan 
> > Cc: edk2-devel@lists.01.org
> > Subject: Re: [edk2] Reminder for deleting 3 network drivers in
> > MdeModulePkg
> >
> > Hi Fu Siyan,
> >
> > On Tue, Oct 30, 2018 at 08:11:52AM +, Fu, Siyuan wrote:
> > > People who want to continue use these deleted drivers could go to
> > > edk2/UDK2018 branch to get them, but it's *highly not recommended*.
> >
> > They should also be able to use edk2-stable201811, right?
> >
> > > *If you have any opposition on deleting these drivers, please let me
> > > know before this weekend, thanks.*
> >
> > I am all for this change. The diffstat is very nice :)
> >
> > Best Regards,
> >
> > Leif
> > ___
> > edk2-devel mailing list
> > edk2-devel@lists.01.org
> > https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v1 0/7] Delete TCP, PXE, iSCSI driver in MdeModulePkg.

2018-10-30 Thread Fu, Siyuan
Mike,

Should I also update the devel branches in edk2-platform? Or the branch owner 
will take care of it?

BestRegards
Fu Siyuan


> -Original Message-
> From: Kinney, Michael D
> Sent: Wednesday, October 31, 2018 5:15 AM
> To: Fu, Siyuan ; Zeng, Star ;
> edk2-devel@lists.01.org; Kinney, Michael D 
> Cc: Leif Lindholm ; Andrew Fish (af...@apple.com)
> ; Laszlo Ersek (ler...@redhat.com) ;
> Gao, Liming 
> Subject: RE: [edk2] [PATCH v1 0/7] Delete TCP, PXE, iSCSI driver in
> MdeModulePkg.
> 
> Fu Siyuan,
> 
> Please review edk2-platform/master and prepare a patch
> for that branch if there are DSC/FDF files that refer
> to the network drivers that are being removed.
> 
> We should never break any platforms in edk2-platform/master.
> The commits should be performed to the repos in the correct
> order to guarantee no build breaks.
> 
> Thanks,
> 
> Mike
> 
> > -Original Message-
> > From: Fu, Siyuan
> > Sent: Tuesday, October 30, 2018 1:23 AM
> > To: Zeng, Star ; edk2-
> > de...@lists.01.org
> > Cc: Kinney, Michael D ; Leif
> > Lindholm ; Andrew Fish
> > (af...@apple.com) ; Laszlo Ersek
> > (ler...@redhat.com) ; Gao, Liming
> > 
> > Subject: RE: [edk2] [PATCH v1 0/7] Delete TCP, PXE,
> > iSCSI driver in MdeModulePkg.
> >
> > Hi, Star
> >
> > This patch only covers the platforms in
> > https://github.com/tianocore/edk2
> >
> > I will modify the edk2 network wiki page for an updated
> > sample DSC/FDF section, if this patch could pass review
> > w/o objection.
> > https://github.com/tianocore/tianocore.github.io/wiki/Ne
> > tworkPkg-Getting-Started-Guide
> >
> > Let's wait a few days to see if there is any objection
> > on deleting these driver first, and I will be happy to
> > generate another patch for edk2-platforms then.
> >
> > Thanks for your reminder.
> >
> >
> > BestRegards
> > Fu Siyuan
> >
> > > -Original Message-
> > > From: Zeng, Star
> > > Sent: Tuesday, October 30, 2018 3:43 PM
> > > To: Fu, Siyuan ; edk2-
> > de...@lists.01.org
> > > Cc: Kinney, Michael D ;
> > Leif Lindholm
> > > ; Andrew Fish
> > (af...@apple.com)
> > > ; Laszlo Ersek (ler...@redhat.com)
> > ;
> > > Gao, Liming ; Zeng, Star
> > 
> > > Subject: RE: [edk2] [PATCH v1 0/7] Delete TCP, PXE,
> > iSCSI driver in
> > > MdeModulePkg.
> > >
> > > Hi Siyuan,
> > >
> > > Have you checked the platforms in
> > https://github.com/tianocore/edk2-
> > > platforms to see whether they need to be updated
> > accordingly or not?
> > >
> > > Cc more people.
> > >
> > > Thanks,
> > > Star
> > > -Original Message-
> > > From: edk2-devel [mailto:edk2-devel-
> > boun...@lists.01.org] On Behalf Of Fu
> > > Siyuan
> > > Sent: Tuesday, October 30, 2018 3:33 PM
> > > To: edk2-devel@lists.01.org
> > > Subject: [edk2] [PATCH v1 0/7] Delete TCP, PXE, iSCSI
> > driver in
> > > MdeModulePkg.
> > >
> > > This patch series is to delete the Tcp4Dxe,
> > UefiPxeBcDxe and IScsi4Dxe
> > > drivers in MdeModulePkg. These drivers will not be
> > maintained and can't
> > > co-work with the dual-stack drivers in NetworkPkg.
> > >
> > > People should use below NetworkPkg drivers instead:
> > >   NetworkPkg/IScsiDxe/IScsiDxe.inf
> > >   NetworkPkg/TcpDxe/TcpDxe.inf
> > >   NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
> > > These drivers are actively maintained with more bug
> > fixes and new feature
> > > support.
> > >
> > > Patch 1~5 update edk2 platform DSC/FDF files to use
> > NetworkPkg drivers.
> > > Patch 6 deletes the TCP,PXE,iSCSI driver in
> > MdeModulePkg.
> > > Patch 7 removes some clarification in NetworkPkg
> > drivers since the related
> > > driver has been deleted in Patch 6.
> > >
> > > Fu Siyuan (7):
> > >   Nt32Pkg: Replace obsoleted network drivers from NT32
> > platform DSC/FDF.
> > >   EmulatorPkg: Replace obsoleted network drivers from
> > platform DSC/FDF.
> > >   OvmfPkg: Replace obsoleted network drivers from
> > platform DSC/FDF.
> > >   Vlv2TbltDevicePkg: Replace obsoleted drivers from
> > platform DSC/FDF.
> > >   ArmVirtPkg: Replace obsoleted network drivers from
> > platform DSC/FDF.
> > >   MdeModulePkg: Delete the TCP/PXE/ISCSI drivers in
> > MdeM

Re: [edk2] Reminder for deleting 3 network drivers in MdeModulePkg

2018-10-30 Thread Fu, Siyuan
Hi, Leif

I think checking the branch is a little better than the tag, because we may 
still have critical bug fixes after the official release.

While any of them are not recommended, always using the NetworkPkg version 
driver is the best choice.

I will modify the edk2 network wiki page for an updated sample DSC/FDF section, 
if this patch could pass review w/o objection.
https://github.com/tianocore/tianocore.github.io/wiki/NetworkPkg-Getting-Started-Guide


BestRegards
Fu Siyuan


> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Leif Lindholm
> Sent: Tuesday, October 30, 2018 6:47 PM
> To: Fu, Siyuan 
> Cc: edk2-devel@lists.01.org
> Subject: Re: [edk2] Reminder for deleting 3 network drivers in
> MdeModulePkg
> 
> Hi Fu Siyan,
> 
> On Tue, Oct 30, 2018 at 08:11:52AM +, Fu, Siyuan wrote:
> > People who want to continue use these deleted drivers could go to
> > edk2/UDK2018 branch to get them, but it's *highly not recommended*.
> 
> They should also be able to use edk2-stable201811, right?
> 
> > *If you have any opposition on deleting these drivers, please let me
> > know before this weekend, thanks.*
> 
> I am all for this change. The diffstat is very nice :)
> 
> Best Regards,
> 
> Leif
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v1 0/7] Delete TCP, PXE, iSCSI driver in MdeModulePkg.

2018-10-30 Thread Fu, Siyuan
Hi, Leif

I have followed your wiki page to configure my Git when I generate this patch, 
and I don't know why the files are still unordered and truncated. I will do 
more test and try to figure out the problem.

BestRegards
Fu Siyuan

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Leif Lindholm
> Sent: Tuesday, October 30, 2018 6:51 PM
> To: Fu, Siyuan 
> Cc: edk2-devel@lists.01.org
> Subject: Re: [edk2] [PATCH v1 0/7] Delete TCP, PXE, iSCSI driver in
> MdeModulePkg.
> 
> On Tue, Oct 30, 2018 at 03:33:21PM +0800, Fu Siyuan wrote:
> > This patch series is to delete the Tcp4Dxe, UefiPxeBcDxe and IScsi4Dxe
> > drivers in MdeModulePkg. These drivers will not be maintained and can't
> > co-work with the dual-stack drivers in NetworkPkg.
> >
> > People should use below NetworkPkg drivers instead:
> >   NetworkPkg/IScsiDxe/IScsiDxe.inf
> >   NetworkPkg/TcpDxe/TcpDxe.inf
> >   NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
> > These drivers are actively maintained with more bug fixes and new
> feature
> > support.
> >
> > Patch 1~5 update edk2 platform DSC/FDF files to use NetworkPkg drivers.
> > Patch 6 deletes the TCP,PXE,iSCSI driver in MdeModulePkg.
> > Patch 7 removes some clarification in NetworkPkg drivers since the
> > related driver has been deleted in Patch 6.
> >
> > Fu Siyuan (7):
> >   Nt32Pkg: Replace obsoleted network drivers from NT32 platform DSC/FDF.
> >   EmulatorPkg: Replace obsoleted network drivers from platform DSC/FDF.
> >   OvmfPkg: Replace obsoleted network drivers from platform DSC/FDF.
> >   Vlv2TbltDevicePkg: Replace obsoleted drivers from platform DSC/FDF.
> >   ArmVirtPkg: Replace obsoleted network drivers from platform DSC/FDF.
> >   MdeModulePkg: Delete the TCP/PXE/ISCSI drivers in MdeModulePkg.
> >   NetworkPkg: Remove some clarification from TCP/PXE/ISCSI driver INF.
> >
> >  .../Network/IScsiDxe/ComponentName.c  |  283 --
> >  .../Universal/Network/IScsiDxe/IScsiCHAP.c|  430 ---
> >  .../Universal/Network/IScsiDxe/IScsiConfig.c  | 1264 ---
> >  .../Universal/Network/IScsiDxe/IScsiDhcp.c|  472 ---
> >  .../Universal/Network/IScsiDxe/IScsiDriver.c  |  676 
> >  .../Network/IScsiDxe/IScsiExtScsiPassThru.c   |  412 ---
> >  .../Universal/Network/IScsiDxe/IScsiIbft.c|  539 ---
> >  .../Network/IScsiDxe/IScsiInitiatorName.c |  116 -
> >  .../Universal/Network/IScsiDxe/IScsiMisc.c|  948 --
> >  .../Universal/Network/IScsiDxe/IScsiProto.c   | 2799 ---
> >  .../Universal/Network/IScsiDxe/IScsiTcp4Io.c  |  487 ---
> 
> If there is a v2, can you follow the steps from
> https://github.com/tianocore/tianocore.github.io/wiki/Laszlo's-unkempt-
> git-guide-for-edk2-contributors-and-maintainers#contrib-23
> when generating it, to order the files, and to get rid of the
> ... truncation of file names?
> 
> Regards,
> 
> Leif
> 
> >  MdeModulePkg/Universal/Network/IScsiDxe/Md5.c |  350 --
> >  .../Universal/Network/Tcp4Dxe/ComponentName.c |  433 ---
> >  .../Universal/Network/Tcp4Dxe/SockImpl.c  | 1201 ---
> >  .../Universal/Network/Tcp4Dxe/SockInterface.c |  990 --
> >  .../Network/Tcp4Dxe/Tcp4Dispatcher.c  |  717 
> >  .../Universal/Network/Tcp4Dxe/Tcp4Driver.c|  782 -
> >  .../Universal/Network/Tcp4Dxe/Tcp4Input.c | 1497 -
> >  .../Universal/Network/Tcp4Dxe/Tcp4Io.c|  112 -
> >  .../Universal/Network/Tcp4Dxe/Tcp4Main.c  |  674 
> >  .../Universal/Network/Tcp4Dxe/Tcp4Misc.c  |  940 --
> >  .../Universal/Network/Tcp4Dxe/Tcp4Option.c|  352 --
> >  .../Universal/Network/Tcp4Dxe/Tcp4Output.c| 1238 ---
> >  .../Universal/Network/Tcp4Dxe/Tcp4Timer.c |  584 
> >  .../Network/UefiPxeBcDxe/ComponentName.c  |  365 --
> >  .../Network/UefiPxeBcDxe/PxeBcDhcp.c  | 1999 ---
> >  .../Network/UefiPxeBcDxe/PxeBcDriver.c|  665 
> >  .../Network/UefiPxeBcDxe/PxeBcImpl.c  | 2989 -
> >  .../Network/UefiPxeBcDxe/PxeBcMtftp.c |  454 ---
> >  .../Network/UefiPxeBcDxe/PxeBcSupport.c   |  221 --
> >  ArmVirtPkg/ArmVirtQemu.dsc|   10 +-
> >  ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc  |   10 +-
> >  ArmVirtPkg/ArmVirtQemuKernel.dsc  |   10 +-
> >  EmulatorPkg/EmulatorPkg.dsc   |2 +-
> >  EmulatorPkg/EmulatorPkg.fdf   |2 +-
> >  MdeModulePkg/MdeModulePkg.dsc |3 -
> >  .../Network/IScsiDxe/ComponentName.h  | 

Re: [edk2] [PATCH v1 0/7] Delete TCP, PXE, iSCSI driver in MdeModulePkg.

2018-10-30 Thread Fu, Siyuan
Hi, Star

This patch only covers the platforms in https://github.com/tianocore/edk2

I will modify the edk2 network wiki page for an updated sample DSC/FDF section, 
if this patch could pass review w/o objection.
https://github.com/tianocore/tianocore.github.io/wiki/NetworkPkg-Getting-Started-Guide

Let's wait a few days to see if there is any objection on deleting these driver 
first, and I will be happy to generate another patch for edk2-platforms then.

Thanks for your reminder.
 

BestRegards
Fu Siyuan

> -Original Message-
> From: Zeng, Star
> Sent: Tuesday, October 30, 2018 3:43 PM
> To: Fu, Siyuan ; edk2-devel@lists.01.org
> Cc: Kinney, Michael D ; Leif Lindholm
> ; Andrew Fish (af...@apple.com)
> ; Laszlo Ersek (ler...@redhat.com) ;
> Gao, Liming ; Zeng, Star 
> Subject: RE: [edk2] [PATCH v1 0/7] Delete TCP, PXE, iSCSI driver in
> MdeModulePkg.
> 
> Hi Siyuan,
> 
> Have you checked the platforms in https://github.com/tianocore/edk2-
> platforms to see whether they need to be updated accordingly or not?
> 
> Cc more people.
> 
> Thanks,
> Star
> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Fu
> Siyuan
> Sent: Tuesday, October 30, 2018 3:33 PM
> To: edk2-devel@lists.01.org
> Subject: [edk2] [PATCH v1 0/7] Delete TCP, PXE, iSCSI driver in
> MdeModulePkg.
> 
> This patch series is to delete the Tcp4Dxe, UefiPxeBcDxe and IScsi4Dxe
> drivers in MdeModulePkg. These drivers will not be maintained and can't
> co-work with the dual-stack drivers in NetworkPkg.
> 
> People should use below NetworkPkg drivers instead:
>   NetworkPkg/IScsiDxe/IScsiDxe.inf
>   NetworkPkg/TcpDxe/TcpDxe.inf
>   NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
> These drivers are actively maintained with more bug fixes and new feature
> support.
> 
> Patch 1~5 update edk2 platform DSC/FDF files to use NetworkPkg drivers.
> Patch 6 deletes the TCP,PXE,iSCSI driver in MdeModulePkg.
> Patch 7 removes some clarification in NetworkPkg drivers since the related
> driver has been deleted in Patch 6.
> 
> Fu Siyuan (7):
>   Nt32Pkg: Replace obsoleted network drivers from NT32 platform DSC/FDF.
>   EmulatorPkg: Replace obsoleted network drivers from platform DSC/FDF.
>   OvmfPkg: Replace obsoleted network drivers from platform DSC/FDF.
>   Vlv2TbltDevicePkg: Replace obsoleted drivers from platform DSC/FDF.
>   ArmVirtPkg: Replace obsoleted network drivers from platform DSC/FDF.
>   MdeModulePkg: Delete the TCP/PXE/ISCSI drivers in MdeModulePkg.
>   NetworkPkg: Remove some clarification from TCP/PXE/ISCSI driver INF.
> 
>  .../Network/IScsiDxe/ComponentName.c  |  283 --
>  .../Universal/Network/IScsiDxe/IScsiCHAP.c|  430 ---
>  .../Universal/Network/IScsiDxe/IScsiConfig.c  | 1264 ---
>  .../Universal/Network/IScsiDxe/IScsiDhcp.c|  472 ---
>  .../Universal/Network/IScsiDxe/IScsiDriver.c  |  676 
>  .../Network/IScsiDxe/IScsiExtScsiPassThru.c   |  412 ---
>  .../Universal/Network/IScsiDxe/IScsiIbft.c|  539 ---
>  .../Network/IScsiDxe/IScsiInitiatorName.c |  116 -
>  .../Universal/Network/IScsiDxe/IScsiMisc.c|  948 --
>  .../Universal/Network/IScsiDxe/IScsiProto.c   | 2799 ---
>  .../Universal/Network/IScsiDxe/IScsiTcp4Io.c  |  487 ---
> MdeModulePkg/Universal/Network/IScsiDxe/Md5.c |  350 --
>   .../Universal/Network/Tcp4Dxe/ComponentName.c |  433 ---
>  .../Universal/Network/Tcp4Dxe/SockImpl.c  | 1201 ---
>  .../Universal/Network/Tcp4Dxe/SockInterface.c |  990 --
>  .../Network/Tcp4Dxe/Tcp4Dispatcher.c  |  717 
>  .../Universal/Network/Tcp4Dxe/Tcp4Driver.c|  782 -
>  .../Universal/Network/Tcp4Dxe/Tcp4Input.c | 1497 -
>  .../Universal/Network/Tcp4Dxe/Tcp4Io.c|  112 -
>  .../Universal/Network/Tcp4Dxe/Tcp4Main.c  |  674 
>  .../Universal/Network/Tcp4Dxe/Tcp4Misc.c  |  940 --
>  .../Universal/Network/Tcp4Dxe/Tcp4Option.c|  352 --
>  .../Universal/Network/Tcp4Dxe/Tcp4Output.c| 1238 ---
>  .../Universal/Network/Tcp4Dxe/Tcp4Timer.c |  584 
>  .../Network/UefiPxeBcDxe/ComponentName.c  |  365 --
>  .../Network/UefiPxeBcDxe/PxeBcDhcp.c  | 1999 ---
>  .../Network/UefiPxeBcDxe/PxeBcDriver.c|  665 
>  .../Network/UefiPxeBcDxe/PxeBcImpl.c  | 2989 -
>  .../Network/UefiPxeBcDxe/PxeBcMtftp.c |  454 ---
>  .../Network/UefiPxeBcDxe/PxeBcSupport.c   |  221 --
>  ArmVirtPkg/ArmVirtQemu.dsc|   10 +-
>  ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc  |   10 +-
>  ArmVirtPkg/ArmVirtQemuKernel.dsc  |   10 +-
>  EmulatorPkg/EmulatorPkg.dsc   |2 +-
>  EmulatorPkg/EmulatorPkg.fdf   

[edk2] Reminder for deleting 3 network drivers in MdeModulePkg

2018-10-30 Thread Fu, Siyuan
Hi, All

This email is a reminder for the patch series "Delete TCP, PXE, iSCSI driver in 
MdeModulePkg" 
https://lists.01.org/pipermail/edk2-devel/2018-October/031605.html, which 
*intend to delete 3 network drivers from edk2 repository*. Please help to 
review this email and also the patch series to provide your feedback before 
this weekend.

Below is a driver list which we want to *delete* from edk2 master, because 
these drivers have not been actively maintained for a long time, and can't 
co-work with the dual-stack drivers in NetworkPkg.
   MdeModulePkg/Universal/Network/Tcp4Dxe   (will be deleted)
   MdeModulePkg/Universal/Network/UefiPxeBcDxe  (will be 
deleted)
   MdeModulePkg/Universal/Network/IScsiDxe  (will be deleted)

Below drivers in NetworkPkg contains all the functionalities compared with the 
MdeModulePkg version, with more bug fixes and more new feature added:
NetworkPkg/TcpDxe/TcpDxe.inf
NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
NetworkPkg/IScsiDxe/IScsiDxe.inf

People who want to continue use these deleted drivers could go to edk2/UDK2018 
branch to get them, but it's *highly not recommended*.

*If you have any opposition on deleting these drivers, please let me know 
before this weekend, thanks.*

Bugzilla link for this issue:
   https://bugzilla.tianocore.org/show_bug.cgi?id=1278

BestRegards
Fu Siyuan
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH v1 7/7] NetworkPkg: Remove some clarification from TCP/PXE/ISCSI driver INF.

2018-10-30 Thread Fu Siyuan
This patch is to remove the clarification about usage/difference between
those drivers in MdeModulePkg and NetworkPkg, since the MdeModulePkg ones
have been deleted now.

Cc: Jiaxin Wu 
Cc: Ye Ting 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Fu Siyuan 
---
 NetworkPkg/IScsiDxe/IScsiDxe.inf | 10 --
 NetworkPkg/TcpDxe/TcpDxe.inf |  6 --
 NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf |  6 --
 3 files changed, 22 deletions(-)

diff --git a/NetworkPkg/IScsiDxe/IScsiDxe.inf b/NetworkPkg/IScsiDxe/IScsiDxe.inf
index 195dc191250f..bdf1313aa957 100644
--- a/NetworkPkg/IScsiDxe/IScsiDxe.inf
+++ b/NetworkPkg/IScsiDxe/IScsiDxe.inf
@@ -4,16 +4,6 @@
 #  The iSCSI driver provides iSCSI service in the preboot environment and 
supports
 #  booting over iSCSI. This driver supports both IPv4 and IPv6 network stack.
 #
-#  Notes:
-#  1) This driver can't co-work with the IScsiDxe driver in MdeModulePkg.
-#  2) This driver includes more bug fixes and supports more features (e.g. 
IPv6, Dns
-# support for target URL configuration, iSCSI keyword support) than the 
IscsiDxe
-# driver in MdeModulePkg. So, we recommend using this driver even though 
both of
-# them can be used.
-#  3) This driver depends on OpenSSL. To use this driver, please follow the
-# instructions found in the file "OpenSSL-HOWTO.txt" located in
-# CryptoPkg\Library\OpensslLib to enable the OpenSSL building first.
-#
 # Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
 # This program and the accompanying materials
 # are licensed and made available under the terms and conditions of the BSD 
License
diff --git a/NetworkPkg/TcpDxe/TcpDxe.inf b/NetworkPkg/TcpDxe/TcpDxe.inf
index 9433fb875cba..c4e3de7ec5ce 100644
--- a/NetworkPkg/TcpDxe/TcpDxe.inf
+++ b/NetworkPkg/TcpDxe/TcpDxe.inf
@@ -5,12 +5,6 @@
 #  It might provide TCPv4 Protocol or TCPv6 Protocol or both of them that 
depends on which network
 #  stack has been loaded in system. This driver supports both IPv4 and IPv6 
network stack.
 #
-#  Notes:
-#  1) This driver can't co-work with the Tcp4Dxe driver in MdeModulePkg.
-#  2) This driver includes more bug fixes and supports more features (e.g. 
IPv6, TCP Cancel
-# function) than the Tcp4Dxe driver in MdeModulePkg. So, we recommend 
using this driver
-# even though both of them can be used.
-#
 #  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
 #
 #  This program and the accompanying materials
diff --git a/NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf 
b/NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
index 130a5456e2c1..63430711e71b 100644
--- a/NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
+++ b/NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
@@ -5,12 +5,6 @@
 #  PXE-compatible device for network access or booting. This driver supports
 #  both IPv4 and IPv6 network stack.
 #
-#  Notes:
-#  1) This driver can't co-work with the UefiPxeBcDxe driver in MdeModulePkg.
-#  2) This driver includes more bug fixes and supports more features (e.g. 
IPv6,
-# MTFTP windowsize) than the UefiPxeBcDxe driver in MdeModulePkg. So, we
-# recommend using this driver even though both of them can be used.
-#
 #  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
 #
 #  This program and the accompanying materials
-- 
2.18.0.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH v1 2/7] EmulatorPkg: Replace obsoleted network drivers from platform DSC/FDF.

2018-10-30 Thread Fu Siyuan
This patch replaces the MdeModulePkg TCP, PXE and iSCSI driver with those
ones in NetworkPkg. These 3 drivers in MdeModulePkg are not being actively
maintained and will be removed from edk2 master soon.

Cc: Jordan Justen 
Cc: Andrew Fish 
Cc: Ruiyu Ni 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Fu Siyuan 
---
 EmulatorPkg/EmulatorPkg.dsc | 2 +-
 EmulatorPkg/EmulatorPkg.fdf | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/EmulatorPkg/EmulatorPkg.dsc b/EmulatorPkg/EmulatorPkg.dsc
index c8c444fe1c89..3bfb48b9 100644
--- a/EmulatorPkg/EmulatorPkg.dsc
+++ b/EmulatorPkg/EmulatorPkg.dsc
@@ -378,8 +378,8 @@ [Components]
   MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
   MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
   MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
-  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
   MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
+  NetworkPkg/TcpDxe/TcpDxe.inf
 
   MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
   MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
diff --git a/EmulatorPkg/EmulatorPkg.fdf b/EmulatorPkg/EmulatorPkg.fdf
index 5b5f81443dff..4595796d5185 100644
--- a/EmulatorPkg/EmulatorPkg.fdf
+++ b/EmulatorPkg/EmulatorPkg.fdf
@@ -203,7 +203,7 @@ [FV.FvRecovery]
 INF  MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
 INF  MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
 INF  MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
-INF  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
+INF  NetworkPkg/TcpDxe/TcpDxe.inf
 INF  MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
 
 INF FatPkg/EnhancedFatDxe/Fat.inf
-- 
2.18.0.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH v1 4/7] Vlv2TbltDevicePkg: Replace obsoleted drivers from platform DSC/FDF.

2018-10-30 Thread Fu Siyuan
This patch replaces the MdeModulePkg TCP, PXE and iSCSI driver with those
ones in NetworkPkg. These 3 drivers in MdeModulePkg are not being actively
maintained and will be removed from edk2 master soon.

Cc: David Wei 
Cc: Mang Guo 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Fu Siyuan 
---
 Vlv2TbltDevicePkg/PlatformPkg.fdf   | 14 +++---
 Vlv2TbltDevicePkg/PlatformPkgGcc.fdf| 14 +++---
 Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc | 18 +++---
 Vlv2TbltDevicePkg/PlatformPkgIA32.dsc   | 18 +++---
 Vlv2TbltDevicePkg/PlatformPkgX64.dsc| 18 +++---
 5 files changed, 15 insertions(+), 67 deletions(-)

diff --git a/Vlv2TbltDevicePkg/PlatformPkg.fdf 
b/Vlv2TbltDevicePkg/PlatformPkg.fdf
index b7a0e584deeb..241314bed4e9 100644
--- a/Vlv2TbltDevicePkg/PlatformPkg.fdf
+++ b/Vlv2TbltDevicePkg/PlatformPkg.fdf
@@ -744,6 +744,9 @@ [FV.FVMAIN]
   INF  MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
   INF  MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
   INF  MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
+  INF  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
+  INF  NetworkPkg/TcpDxe/TcpDxe.inf
+  INF  NetworkPkg/IScsiDxe/IScsiDxe.inf
   !if $(NETWORK_IP6_ENABLE) == TRUE
   INF  NetworkPkg/Ip6Dxe/Ip6Dxe.inf
   INF  NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
@@ -751,22 +754,11 @@ [FV.FVMAIN]
   INF  NetworkPkg/Udp6Dxe/Udp6Dxe.inf
   INF  NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
   !endif
-  !if $(NETWORK_IP6_ENABLE) == TRUE
-  INF  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  INF  NetworkPkg/TcpDxe/TcpDxe.inf
-  !else
-  INF  MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  INF  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
-  !endif
   !if $(NETWORK_VLAN_ENABLE) == TRUE
   INF  MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
   !endif
   !if $(NETWORK_ISCSI_ENABLE) == TRUE
-  !if $(NETWORK_IP6_ENABLE) == TRUE
 INF  NetworkPkg/IScsiDxe/IScsiDxe.inf
-  !else
-INF  MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
-  !endif
   !endif
 !endif
 
diff --git a/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf 
b/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
index eca273e33f88..356649277289 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
+++ b/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
@@ -700,6 +700,9 @@ [FV.FVMAIN]
   INF  MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
   INF  MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
   INF  MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
+  INF  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
+  INF  NetworkPkg/TcpDxe/TcpDxe.inf
+  INF  NetworkPkg/IScsiDxe/IScsiDxe.inf
   !if $(NETWORK_IP6_ENABLE) == TRUE
   INF  NetworkPkg/Ip6Dxe/Ip6Dxe.inf
   INF  NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
@@ -707,22 +710,11 @@ [FV.FVMAIN]
   INF  NetworkPkg/Udp6Dxe/Udp6Dxe.inf
   INF  NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
   !endif
-  !if $(NETWORK_IP6_ENABLE) == TRUE
-  INF  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  INF  NetworkPkg/TcpDxe/TcpDxe.inf
-  !else
-  INF  MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  INF  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
-  !endif
   !if $(NETWORK_VLAN_ENABLE) == TRUE
   INF  MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
   !endif
   !if $(NETWORK_ISCSI_ENABLE) == TRUE
-  !if $(NETWORK_IP6_ENABLE) == TRUE
 INF  NetworkPkg/IScsiDxe/IScsiDxe.inf
-  !else
-INF  MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
-  !endif
   !endif
 !endif
 
diff --git a/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc 
b/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
index 3e3522aee908..322793257e0b 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
+++ b/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
@@ -1528,11 +1528,7 @@ [Components.X64]
 
 !if $(NETWORK_ENABLE) == TRUE
   !if $(NETWORK_ISCSI_ENABLE) == TRUE
-!if $(NETWORK_IP6_ENABLE) == TRUE
-  NetworkPkg/IScsiDxe/IScsiDxe.inf
-!else
-  MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
-!endif
+NetworkPkg/IScsiDxe/IScsiDxe.inf
   !endif
   !if $(NETWORK_VLAN_ENABLE) == TRUE
 MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
@@ -1554,24 +1550,16 @@ [Components.X64]
 MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
 MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
 MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
-MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf {
-  
-  gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000
-}
+NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
+NetworkPkg/TcpDxe/TcpDxe.inf
 MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
 !if $(NETWORK_IP6_ENABLE) == TRUE
   NetworkPkg/Ip6Dxe/Ip6Dxe.inf
   NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
   NetworkPkg/IpSecDxe/IpSecDxe.inf
-  NetworkPkg/TcpDxe/TcpDxe.inf
   NetworkPkg/Udp6Dxe/Udp6Dxe.inf
   NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
 !endif
-!if $(NETWORK_IP6_ENABLE) == TRUE
-  NetworkPkg/UefiPxeBcDxe

[edk2] [PATCH v1 3/7] OvmfPkg: Replace obsoleted network drivers from platform DSC/FDF.

2018-10-30 Thread Fu Siyuan
This patch replaces the MdeModulePkg TCP, PXE and iSCSI driver with those
ones in NetworkPkg. These 3 drivers in MdeModulePkg are not being actively
maintained and will be removed from edk2 master soon.

Cc: Jordan Justen 
Cc: Laszlo Ersek 
Cc: Ard Biesheuvel 
Cc: Anthony Perard 
Cc: Julien Grall 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Fu Siyuan 
---
 OvmfPkg/OvmfPkgIa32.dsc| 12 
 OvmfPkg/OvmfPkgIa32.fdf| 10 +++---
 OvmfPkg/OvmfPkgIa32X64.dsc | 12 
 OvmfPkg/OvmfPkgIa32X64.fdf | 10 +++---
 OvmfPkg/OvmfPkgX64.dsc | 12 
 OvmfPkg/OvmfPkgX64.fdf | 10 +++---
 6 files changed, 21 insertions(+), 45 deletions(-)

diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
index 9f07e75050c0..bdd1169c58a2 100644
--- a/OvmfPkg/OvmfPkgIa32.dsc
+++ b/OvmfPkg/OvmfPkgIa32.dsc
@@ -790,18 +790,14 @@ [Components]
   MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
   MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
   MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
-!if $(NETWORK_IP6_ENABLE) == TRUE
-  NetworkPkg/Ip6Dxe/Ip6Dxe.inf
+  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
   NetworkPkg/TcpDxe/TcpDxe.inf
+  NetworkPkg/IScsiDxe/IScsiDxe.inf
+!if $(NETWORK_IP6_ENABLE) == TRUE
+  NetworkPkg/Ip6Dxe/Ip6Dxe.inf
   NetworkPkg/Udp6Dxe/Udp6Dxe.inf
   NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
   NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
-  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  NetworkPkg/IScsiDxe/IScsiDxe.inf
-!else
-  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
-  MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
 !endif
 !if $(HTTP_BOOT_ENABLE) == TRUE
   NetworkPkg/DnsDxe/DnsDxe.inf
diff --git a/OvmfPkg/OvmfPkgIa32.fdf b/OvmfPkg/OvmfPkgIa32.fdf
index 52b8b1fea1fc..1bc2e73bde16 100644
--- a/OvmfPkg/OvmfPkgIa32.fdf
+++ b/OvmfPkg/OvmfPkgIa32.fdf
@@ -309,18 +309,14 @@ [FV.DXEFV]
   INF  MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
   INF  MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
   INF  MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
+  INF  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
+  INF  NetworkPkg/TcpDxe/TcpDxe.inf
+  INF  NetworkPkg/IScsiDxe/IScsiDxe.inf
 !if $(NETWORK_IP6_ENABLE) == TRUE
   INF  NetworkPkg/Ip6Dxe/Ip6Dxe.inf
-  INF  NetworkPkg/TcpDxe/TcpDxe.inf
   INF  NetworkPkg/Udp6Dxe/Udp6Dxe.inf
   INF  NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
   INF  NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
-  INF  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  INF  NetworkPkg/IScsiDxe/IScsiDxe.inf
-!else
-  INF  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
-  INF  MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  INF  MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
 !endif
 !if $(HTTP_BOOT_ENABLE) == TRUE
   INF  NetworkPkg/DnsDxe/DnsDxe.inf
diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc
index a4eaeb808c6b..d4b09b38194d 100644
--- a/OvmfPkg/OvmfPkgIa32X64.dsc
+++ b/OvmfPkg/OvmfPkgIa32X64.dsc
@@ -799,18 +799,14 @@ [Components.X64]
   MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
   MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
   MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
-!if $(NETWORK_IP6_ENABLE) == TRUE
-  NetworkPkg/Ip6Dxe/Ip6Dxe.inf
+  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
   NetworkPkg/TcpDxe/TcpDxe.inf
+  NetworkPkg/IScsiDxe/IScsiDxe.inf
+!if $(NETWORK_IP6_ENABLE) == TRUE
+  NetworkPkg/Ip6Dxe/Ip6Dxe.inf
   NetworkPkg/Udp6Dxe/Udp6Dxe.inf
   NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
   NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
-  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  NetworkPkg/IScsiDxe/IScsiDxe.inf
-!else
-  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
-  MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
 !endif
 !if $(HTTP_BOOT_ENABLE) == TRUE
   NetworkPkg/DnsDxe/DnsDxe.inf
diff --git a/OvmfPkg/OvmfPkgIa32X64.fdf b/OvmfPkg/OvmfPkgIa32X64.fdf
index 70845d6972fd..f36c7e741c8e 100644
--- a/OvmfPkg/OvmfPkgIa32X64.fdf
+++ b/OvmfPkg/OvmfPkgIa32X64.fdf
@@ -315,18 +315,14 @@ [FV.DXEFV]
   INF  MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
   INF  MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
   INF  MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
+  INF  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
+  INF  NetworkPkg/TcpDxe/TcpDxe.inf
+  INF  NetworkPkg/IScsiDxe/IScsiDxe.inf
 !if $(NETWORK_IP6_ENABLE) == TRUE
   INF  NetworkPkg/Ip6Dxe/Ip6Dxe.inf
-  INF  NetworkPkg/TcpDxe/TcpDxe.inf
   INF  NetworkPkg/Udp6Dxe/Udp6Dxe.inf
   INF  NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
   INF  NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
-  INF  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  INF  NetworkPkg/IScsiDxe/IScsiDxe.inf
-!else
-  INF  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
-  INF  MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  INF  MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
 !endif
 !if $(HTTP_BOOT_ENABLE) == TRUE

[edk2] [PATCH v1 5/7] ArmVirtPkg: Replace obsoleted network drivers from platform DSC/FDF.

2018-10-30 Thread Fu Siyuan
This patch replaces the MdeModulePkg TCP, PXE and iSCSI driver with those
ones in NetworkPkg. These 3 drivers in MdeModulePkg are not being actively
maintained and will be removed from edk2 master soon.

Cc: Laszlo Ersek 
Cc: Ard Biesheuvel 
Cc: Julien Grall 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Fu Siyuan 
---
 ArmVirtPkg/ArmVirtQemu.dsc   | 10 +++---
 ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc | 10 +++---
 ArmVirtPkg/ArmVirtQemuKernel.dsc | 10 +++---
 3 files changed, 9 insertions(+), 21 deletions(-)

diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
index 885c6b14b844..b3f1b23e3890 100644
--- a/ArmVirtPkg/ArmVirtQemu.dsc
+++ b/ArmVirtPkg/ArmVirtQemu.dsc
@@ -346,18 +346,14 @@ [Components.common]
   MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
   MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
   MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
+  NetworkPkg/TcpDxe/TcpDxe.inf
+  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
+  NetworkPkg/IScsiDxe/IScsiDxe.inf
 !if $(NETWORK_IP6_ENABLE) == TRUE
   NetworkPkg/Ip6Dxe/Ip6Dxe.inf
-  NetworkPkg/TcpDxe/TcpDxe.inf
   NetworkPkg/Udp6Dxe/Udp6Dxe.inf
   NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
   NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
-  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  NetworkPkg/IScsiDxe/IScsiDxe.inf
-!else
-  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
-  MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
 !endif
 !if $(HTTP_BOOT_ENABLE) == TRUE
   NetworkPkg/DnsDxe/DnsDxe.inf
diff --git a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc 
b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
index a6390bd4b841..3316f982695f 100644
--- a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
+++ b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
@@ -126,18 +126,14 @@ [FV.FvMain]
   INF MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
   INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
   INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
+  INF NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
+  INF NetworkPkg/IScsiDxe/IScsiDxe.inf
+  INF NetworkPkg/TcpDxe/TcpDxe.inf
 !if $(NETWORK_IP6_ENABLE) == TRUE
   INF NetworkPkg/Ip6Dxe/Ip6Dxe.inf
-  INF NetworkPkg/TcpDxe/TcpDxe.inf
   INF NetworkPkg/Udp6Dxe/Udp6Dxe.inf
   INF NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
   INF NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
-  INF NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  INF NetworkPkg/IScsiDxe/IScsiDxe.inf
-!else
-  INF MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
-  INF MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  INF MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
 !endif
 !if $(HTTP_BOOT_ENABLE) == TRUE
   INF NetworkPkg/DnsDxe/DnsDxe.inf
diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc
index 434d6861a56f..e3ed713cbb39 100644
--- a/ArmVirtPkg/ArmVirtQemuKernel.dsc
+++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc
@@ -335,18 +335,14 @@ [Components.common]
   MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
   MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
   MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
+  NetworkPkg/TcpDxe/TcpDxe.inf
+  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
+  NetworkPkg/IScsiDxe/IScsiDxe.inf
 !if $(NETWORK_IP6_ENABLE) == TRUE
   NetworkPkg/Ip6Dxe/Ip6Dxe.inf
-  NetworkPkg/TcpDxe/TcpDxe.inf
   NetworkPkg/Udp6Dxe/Udp6Dxe.inf
   NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
   NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
-  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  NetworkPkg/IScsiDxe/IScsiDxe.inf
-!else
-  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
-  MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
 !endif
 !if $(HTTP_BOOT_ENABLE) == TRUE
   NetworkPkg/DnsDxe/DnsDxe.inf
-- 
2.18.0.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH v1 1/7] Nt32Pkg: Replace obsoleted network drivers from NT32 platform DSC/FDF.

2018-10-30 Thread Fu Siyuan
This patch replaces the MdeModulePkg TCP, PXE and iSCSI driver with those
ones in NetworkPkg. These 3 drivers in MdeModulePkg are not being actively
maintained and will be removed from edk2 master soon.

Cc: Ruiyu Ni 
Cc: Hao Wu 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Fu Siyuan 
---
 Nt32Pkg/Nt32Pkg.dsc | 12 
 Nt32Pkg/Nt32Pkg.fdf | 12 
 2 files changed, 8 insertions(+), 16 deletions(-)

diff --git a/Nt32Pkg/Nt32Pkg.dsc b/Nt32Pkg/Nt32Pkg.dsc
index 58d9f8787dde..4293ca39fdec 100644
--- a/Nt32Pkg/Nt32Pkg.dsc
+++ b/Nt32Pkg/Nt32Pkg.dsc
@@ -4,7 +4,7 @@
 # The Emulation Platform can be used to debug individual modules, prior to 
creating
 #a real platform. This also provides an example for how an DSC is created.
 #
-# Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
 # Copyright (c) 2015, Hewlett-Packard Development Company, L.P.
 # (C) Copyright 2016 Hewlett Packard Enterprise Development LP
 #
@@ -468,20 +468,16 @@ [Components]
   MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
   MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
   MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
+  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
+  NetworkPkg/TcpDxe/TcpDxe.inf
+  NetworkPkg/IScsiDxe/IScsiDxe.inf
   Nt32Pkg/SnpNt32Dxe/SnpNt32Dxe.inf
 
 !if $(NETWORK_IP6_ENABLE) == TRUE
   NetworkPkg/Ip6Dxe/Ip6Dxe.inf
   NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
-  NetworkPkg/TcpDxe/TcpDxe.inf
   NetworkPkg/Udp6Dxe/Udp6Dxe.inf
   NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
-  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  NetworkPkg/IScsiDxe/IScsiDxe.inf
-!else
-  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
-  MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
 !endif
 
   NetworkPkg/HttpBootDxe/HttpBootDxe.inf
diff --git a/Nt32Pkg/Nt32Pkg.fdf b/Nt32Pkg/Nt32Pkg.fdf
index db2719fd99df..65d9bf812b5b 100644
--- a/Nt32Pkg/Nt32Pkg.fdf
+++ b/Nt32Pkg/Nt32Pkg.fdf
@@ -1,7 +1,7 @@
 ## @file
 # This is NT32 FDF file with UEFI HII features enabled
 #
-# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
 # (C) Copyright 2016 Hewlett Packard Enterprise Development LP
 #
 #This program and the accompanying materials
@@ -257,19 +257,15 @@ [FV.FvRecovery]
 INF  MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
 INF  MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
 INF  MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
+INF  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
+INF  NetworkPkg/TcpDxe/TcpDxe.inf
+INF  NetworkPkg/IScsiDxe/IScsiDxe.inf
 INF  Nt32Pkg/SnpNt32Dxe/SnpNt32Dxe.inf
 !if $(NETWORK_IP6_ENABLE) == TRUE
 INF  NetworkPkg/Ip6Dxe/Ip6Dxe.inf
 INF  NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
 INF  NetworkPkg/Udp6Dxe/Udp6Dxe.inf
 INF  NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
-INF  NetworkPkg/TcpDxe/TcpDxe.inf
-INF  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
-INF  NetworkPkg/IScsiDxe/IScsiDxe.inf
-!else
-INF  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
-INF  MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
-INF  MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
 !endif
 INF  NetworkPkg/HttpBootDxe/HttpBootDxe.inf
 INF  NetworkPkg/DnsDxe/DnsDxe.inf
-- 
2.18.0.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH v1 0/7] Delete TCP, PXE, iSCSI driver in MdeModulePkg.

2018-10-30 Thread Fu Siyuan
This patch series is to delete the Tcp4Dxe, UefiPxeBcDxe and IScsi4Dxe
drivers in MdeModulePkg. These drivers will not be maintained and can't
co-work with the dual-stack drivers in NetworkPkg.

People should use below NetworkPkg drivers instead:
  NetworkPkg/IScsiDxe/IScsiDxe.inf
  NetworkPkg/TcpDxe/TcpDxe.inf
  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
These drivers are actively maintained with more bug fixes and new feature
support.

Patch 1~5 update edk2 platform DSC/FDF files to use NetworkPkg drivers.
Patch 6 deletes the TCP,PXE,iSCSI driver in MdeModulePkg.
Patch 7 removes some clarification in NetworkPkg drivers since the
related driver has been deleted in Patch 6.

Fu Siyuan (7):
  Nt32Pkg: Replace obsoleted network drivers from NT32 platform DSC/FDF.
  EmulatorPkg: Replace obsoleted network drivers from platform DSC/FDF.
  OvmfPkg: Replace obsoleted network drivers from platform DSC/FDF.
  Vlv2TbltDevicePkg: Replace obsoleted drivers from platform DSC/FDF.
  ArmVirtPkg: Replace obsoleted network drivers from platform DSC/FDF.
  MdeModulePkg: Delete the TCP/PXE/ISCSI drivers in MdeModulePkg.
  NetworkPkg: Remove some clarification from TCP/PXE/ISCSI driver INF.

 .../Network/IScsiDxe/ComponentName.c  |  283 --
 .../Universal/Network/IScsiDxe/IScsiCHAP.c|  430 ---
 .../Universal/Network/IScsiDxe/IScsiConfig.c  | 1264 ---
 .../Universal/Network/IScsiDxe/IScsiDhcp.c|  472 ---
 .../Universal/Network/IScsiDxe/IScsiDriver.c  |  676 
 .../Network/IScsiDxe/IScsiExtScsiPassThru.c   |  412 ---
 .../Universal/Network/IScsiDxe/IScsiIbft.c|  539 ---
 .../Network/IScsiDxe/IScsiInitiatorName.c |  116 -
 .../Universal/Network/IScsiDxe/IScsiMisc.c|  948 --
 .../Universal/Network/IScsiDxe/IScsiProto.c   | 2799 ---
 .../Universal/Network/IScsiDxe/IScsiTcp4Io.c  |  487 ---
 MdeModulePkg/Universal/Network/IScsiDxe/Md5.c |  350 --
 .../Universal/Network/Tcp4Dxe/ComponentName.c |  433 ---
 .../Universal/Network/Tcp4Dxe/SockImpl.c  | 1201 ---
 .../Universal/Network/Tcp4Dxe/SockInterface.c |  990 --
 .../Network/Tcp4Dxe/Tcp4Dispatcher.c  |  717 
 .../Universal/Network/Tcp4Dxe/Tcp4Driver.c|  782 -
 .../Universal/Network/Tcp4Dxe/Tcp4Input.c | 1497 -
 .../Universal/Network/Tcp4Dxe/Tcp4Io.c|  112 -
 .../Universal/Network/Tcp4Dxe/Tcp4Main.c  |  674 
 .../Universal/Network/Tcp4Dxe/Tcp4Misc.c  |  940 --
 .../Universal/Network/Tcp4Dxe/Tcp4Option.c|  352 --
 .../Universal/Network/Tcp4Dxe/Tcp4Output.c| 1238 ---
 .../Universal/Network/Tcp4Dxe/Tcp4Timer.c |  584 
 .../Network/UefiPxeBcDxe/ComponentName.c  |  365 --
 .../Network/UefiPxeBcDxe/PxeBcDhcp.c  | 1999 ---
 .../Network/UefiPxeBcDxe/PxeBcDriver.c|  665 
 .../Network/UefiPxeBcDxe/PxeBcImpl.c  | 2989 -
 .../Network/UefiPxeBcDxe/PxeBcMtftp.c |  454 ---
 .../Network/UefiPxeBcDxe/PxeBcSupport.c   |  221 --
 ArmVirtPkg/ArmVirtQemu.dsc|   10 +-
 ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc  |   10 +-
 ArmVirtPkg/ArmVirtQemuKernel.dsc  |   10 +-
 EmulatorPkg/EmulatorPkg.dsc   |2 +-
 EmulatorPkg/EmulatorPkg.fdf   |2 +-
 MdeModulePkg/MdeModulePkg.dsc |3 -
 .../Network/IScsiDxe/ComponentName.h  |  165 -
 .../Universal/Network/IScsiDxe/IScsi4Dxe.uni  |   25 -
 .../Network/IScsiDxe/IScsi4DxeExtra.uni   |   20 -
 .../Universal/Network/IScsiDxe/IScsiCHAP.h|  106 -
 .../Universal/Network/IScsiDxe/IScsiCommon.h  |   22 -
 .../Universal/Network/IScsiDxe/IScsiConfig.h  |  166 -
 .../Network/IScsiDxe/IScsiConfigDxe.vfr   |  219 --
 .../IScsiDxe/IScsiConfigDxeStrings.uni|   62 -
 .../Network/IScsiDxe/IScsiConfigNVDataStruc.h |  109 -
 .../Universal/Network/IScsiDxe/IScsiDhcp.h|   55 -
 .../Universal/Network/IScsiDxe/IScsiDriver.h  |  140 -
 .../Universal/Network/IScsiDxe/IScsiDxe.inf   |  134 -
 .../Network/IScsiDxe/IScsiExtScsiPassThru.h   |   22 -
 .../Universal/Network/IScsiDxe/IScsiIbft.h|   38 -
 .../Universal/Network/IScsiDxe/IScsiImpl.h|  168 -
 .../Network/IScsiDxe/IScsiInitiatorName.h |   74 -
 .../Universal/Network/IScsiDxe/IScsiMisc.h|  317 --
 .../Universal/Network/IScsiDxe/IScsiProto.h   | 1005 --
 .../Universal/Network/IScsiDxe/IScsiTcp4Io.h  |  142 -
 MdeModulePkg/Universal/Network/IScsiDxe/Md5.h |   80 -
 .../Universal/Network/Tcp4Dxe/SockImpl.h  |  131 -
 .../Universal/Network/Tcp4Dxe/Socket.h|  954 --
 .../Universal/Network/Tcp4Dxe/Tcp4Driver.h|  342 --
 .../Universal/Network/Tcp4Dxe/Tcp4Dxe.inf |   94 -
 .../Universal/Network/Tcp4Dxe/Tcp4Dxe.uni |   23 -
 .../Network/Tcp4Dxe/Tcp4DxeExtra.uni  |   20 -
 .../Universal/Network/Tcp4Dxe/Tcp4Func.h  |  781 -
 .../Universal/Network/Tcp4Dxe/Tcp4Main.h  |  494 ---
 .../Universal/Network/Tcp4Dxe/Tcp4Option.h|  130 -
 .../Universal/Ne

Re: [edk2] [PATCH v2 0/4] Conflict Detection for Tcp and PxeBc Driver

2018-10-29 Thread Fu, Siyuan
Reviewed-by: Fu Siyuan 


> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Songpeng Li
> Sent: Monday, October 29, 2018 1:48 PM
> To: edk2-devel@lists.01.org
> Cc: Ye, Ting ; Fu, Siyuan ; Wu,
> Jiaxin 
> Subject: [edk2] [PATCH v2 0/4] Conflict Detection for Tcp and PxeBc Driver
> 
> v2: Modify files:
>   UefiPxeBcDxe.inf from MdeModulePkg
>   UefiPxeBcDxe.inf from NetworkPkg
>   tag protocol guid should be marked as BY_START
> 
> Please refer to the log message of each commit for more details.
> 
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1278
> Cc: Ye Ting 
> Cc: Wu Jiaxin 
> Cc: Fu Siyuan 
> Songpeng Li (4):
>   MdeModulePkg: Add Tag Protocol for PxeBc Driver Conflict Detection.
>   MdeModulePkg/UefiPxeBcDxe: Add Conflict Detection Process.
>   NetworkPkg/UefiPxeBcDxe: Add Conflict Detection Process.
>   NetworkPkg/TcpDxe: Modify the Version of Driver Binding Protocol
> 
>  MdeModulePkg/Include/Protocol/PxeBcTag.h  | 26 
>  MdeModulePkg/MdeModulePkg.dec |  5 +++
>  .../Network/UefiPxeBcDxe/PxeBcDriver.c| 19 -
>  .../Network/UefiPxeBcDxe/PxeBcImpl.h  |  3 +-
>  .../Network/UefiPxeBcDxe/UefiPxeBcDxe.inf |  1 +
>  NetworkPkg/TcpDxe/TcpDriver.c |  4 +-
>  NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c | 42 ++-
>  NetworkPkg/UefiPxeBcDxe/PxeBcImpl.h   |  1 +
>  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf  |  1 +
>  9 files changed, 96 insertions(+), 6 deletions(-)
>  create mode 100644 MdeModulePkg/Include/Protocol/PxeBcTag.h
> 
> --
> 2.18.0.windows.1
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 2/4] MdeModulePkg/UefiPxeBcDxe: Add Conflict Detection Process.

2018-10-28 Thread Fu, Siyuan
Hi, Songpeng

The tag protocol guid is installed in driver binding start so it should be 
marked as BY_START in INF file.

> +  gEdkiiPxeBcTagProtocolGuid   ## SOMETIMES_CONSUMES

BestRegards
Fu Siyuan

> -Original Message-
> From: Li, Songpeng
> Sent: Monday, October 29, 2018 9:53 AM
> To: edk2-devel@lists.01.org
> Cc: Ye, Ting ; Wu, Jiaxin ; Fu,
> Siyuan 
> Subject: [PATCH 2/4] MdeModulePkg/UefiPxeBcDxe: Add Conflict Detection
> Process.
> 
> The current PxeBc Driver in MdeModulePkg and NetworkPkg has no conflict
> detection when both installed in platform, this process is for conflict
> driver detect.
> 
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1278
> Cc: Ye Ting 
> Cc: Wu Jiaxin 
> Cc: Fu Siyuan 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Songpeng Li 
> ---
>  .../Network/UefiPxeBcDxe/PxeBcDriver.c| 19 ++-
>  .../Network/UefiPxeBcDxe/PxeBcImpl.h  |  3 ++-
>  .../Network/UefiPxeBcDxe/UefiPxeBcDxe.inf |  1 +
>  3 files changed, 21 insertions(+), 2 deletions(-)
> 
> diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDriver.c
> b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDriver.c
> index 76c140d8e3..bd16f8b2e2 100644
> --- a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDriver.c
> +++ b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDriver.c
> @@ -1,7 +1,7 @@
>  /** @file
>The driver binding for UEFI PXEBC protocol.
> 
> -Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.
> +Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
>  This program and the accompanying materials
>  are licensed and made available under the terms and conditions of the BSD
> License
>  which accompanies this distribution.  The full text of the license may be
> found at
> @@ -84,6 +84,19 @@ PxeBcDriverBindingSupported (
>EFI_PXE_BASE_CODE_PROTOCOL  *PxeBc;
>EFI_STATUS  Status;
> 
> +  Status = gBS->OpenProtocol (
> +  ControllerHandle,
> +  &gEdkiiPxeBcTagProtocolGuid,
> +  NULL,
> +  This->DriverBindingHandle,
> +  ControllerHandle,
> +  EFI_OPEN_PROTOCOL_TEST_PROTOCOL
> +  );
> +
> +  if (!EFI_ERROR (Status)) {
> +return EFI_ALREADY_STARTED;
> +  }
> +
>Status = gBS->OpenProtocol (
>ControllerHandle,
>&gEfiPxeBaseCodeProtocolGuid,
> @@ -370,6 +383,8 @@ PxeBcDriverBindingStart (
>&Private->PxeBc,
>&gEfiLoadFileProtocolGuid,
>&Private->LoadFile,
> +  &gEdkiiPxeBcTagProtocolGuid,
> +  NULL,
>NULL
>);
>if (EFI_ERROR (Status)) {
> @@ -573,6 +588,8 @@ PxeBcDriverBindingStop (
>&Private->PxeBc,
>&gEfiLoadFileProtocolGuid,
>&Private->LoadFile,
> +  &gEdkiiPxeBcTagProtocolGuid,
> +  NULL,
>NULL
>);
> 
> diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.h
> b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.h
> index e96b6f2c5d..0fceb35b82 100644
> --- a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.h
> +++ b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.h
> @@ -1,6 +1,6 @@
>  /** @file
> 
> -Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.
> +Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
>  This program and the accompanying materials
>  are licensed and made available under the terms and conditions of the BSD
> License
>  which accompanies this distribution.  The full text of the license may be
> found at
> @@ -32,6 +32,7 @@ typedef struct _PXEBC_PRIVATE_DATA  PXEBC_PRIVATE_DATA;
>  #include 
>  #include 
>  #include 
> +#include 
> 
>  #include 
>  #include 
> diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
> b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
> index 0424019929..dc255534cb 100644
> --- a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
> +++ b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
> @@ -94,6 +94,7 @@
>gEfiIp4ServiceBindingProtocolGuid## TO_START
>gEfiIp4ProtocolGuid  ## TO_START
>gEfiIp4Config2ProtocolGuid   ## TO_START
> +  gEdkiiPxeBcTagProtocolGuid   ## SOMETIMES_CONSUMES
> 
>  [Pcd]
>gEfiMdeModulePkgTokenSpaceGuid.PcdTftpBlockSize  ## SOMETIMES_CONSUMES
> --
> 2.18.0.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [Patch] NetworkPkg/TlsDxe: Remove the redundant library class.

2018-10-15 Thread Fu, Siyuan
Reviewed-by: Fu Siyuan 

> -Original Message-
> From: Wu, Jiaxin
> Sent: Tuesday, October 16, 2018 9:55 AM
> To: edk2-devel@lists.01.org
> Cc: Fu, Siyuan ; Ye, Ting ; Wu,
> Jiaxin 
> Subject: [Patch] NetworkPkg/TlsDxe: Remove the redundant library class.
> 
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1018.
> 
> Cc: Fu Siyuan 
> Cc: Ye Ting 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Wu Jiaxin 
> ---
>  NetworkPkg/TlsDxe/TlsDxe.inf | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/NetworkPkg/TlsDxe/TlsDxe.inf b/NetworkPkg/TlsDxe/TlsDxe.inf
> index 907feb735b..aaea0fc2ff 100644
> --- a/NetworkPkg/TlsDxe/TlsDxe.inf
> +++ b/NetworkPkg/TlsDxe/TlsDxe.inf
> @@ -3,11 +3,11 @@
>  #  EFI TLS Configuration Protocol.
>  #
>  #  This module produces EFI TLS (Transport Layer Security) Protocol and
> EFI TLS
>  #  Service Binding Protocol, to provide TLS services.
>  #
> -#  Copyright (c) 2016, Intel Corporation. All rights reserved.
> +#  Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.
>  #
>  #  This program and the accompanying materials
>  #  are licensed and made available under the terms and conditions of the
> BSD License
>  #  which accompanies this distribution. The full text of the license may
> be found at
>  #  http://opensource.org/licenses/bsd-license.php.
> @@ -50,11 +50,10 @@
>MemoryAllocationLib
>BaseMemoryLib
>BaseLib
>UefiLib
>DebugLib
> -  NetLib
>BaseCryptLib
>TlsLib
> 
>  [Protocols]
>gEfiTlsServiceBindingProtocolGuid  ## PRODUCES
> --
> 2.17.1.windows.2

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [Patch] MdeModulePkg/Tcp4Dxe: Remove the trailing white space in one line.

2018-10-07 Thread Fu, Siyuan
Reviewed-by: Fu Siyuan 



> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Jiaxin Wu
> Sent: Monday, October 8, 2018 11:08 AM
> To: edk2-devel@lists.01.org
> Cc: Ye, Ting ; Bi, Dandan ; Fu,
> Siyuan ; Wu, Jiaxin 
> Subject: [edk2] [Patch] MdeModulePkg/Tcp4Dxe: Remove the trailing white
> space in one line.
> 
> Cc: Fu Siyuan 
> Cc: Ye Ting 
> Cc: Bi Dandan 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Wu Jiaxin 
> ---
>  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
> b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
> index fb7f4f8502..7c0504770b 100644
> --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
> +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
> @@ -1,17 +1,17 @@
>  ## @file
>  #  This module produces EFI TCPv4 Protocol and EFI TCPv4 Service Binding
> Protocol.
>  #
>  #  This module produces EFI TCPv4(Transmission Control Protocol version 4)
> Protocol
> -#  upon EFI IPv4 Protocol, to provide basic TCPv4 I/O services. This
> driver only
> +#  upon EFI IPv4 Protocol, to provide basic TCPv4 I/O services. This
> driver only
>  #  supports IPv4 network stack.
>  #
>  #  Notes:
>  #  1) This driver can't co-work with the TcpDxe driver in NetworkPkg.
> -#  2) This driver might have some issues that have been fixed in the
> TcpDxe driver
> +#  2) This driver might have some issues that have been fixed in the
> TcpDxe driver
>  # in NetworkPkg.
> -#  3) This driver supports fewer features than the TcpDxe driver in
> NetworkPkg (e.g. IPv6,
> +#  3) This driver supports fewer features than the TcpDxe driver in
> NetworkPkg (e.g. IPv6,
>  # TCP Cancel function).
>  #  4) TcpDxe driver in NetworkPkg is recommended for use instead of this
> one even though
>  # both of them can be used.
>  #
>  #  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
> --
> 2.17.1.windows.2
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [Patch 0/2] Correct comments to align with the input parameter.

2018-10-07 Thread Fu, Siyuan
Reviewed-by: Fu Siyuan 


> -Original Message-
> From: Wu, Jiaxin
> Sent: Monday, October 8, 2018 11:03 AM
> To: edk2-devel@lists.01.org
> Cc: Carsey, Jaben ; Fu, Siyuan
> ; Ye, Ting ; Bi, Dandan
> ; Wu, Jiaxin 
> Subject: [Patch 0/2] Correct comments to align with the input parameter.
> 
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1230
> 
> Cc: Carsey Jaben 
> Cc: Fu Siyuan 
> Cc: Ye Ting 
> Cc: Bi Dandan 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Wu Jiaxin 
> 
> Jiaxin Wu (2):
>   NetworkPkg/UefiPxeBcDxe: Correct comments to align with the input
> parameter.
>   ShellPkg/TftpDynamicCommand: Correct comments to align with the input
> parameter.
> 
>  NetworkPkg/UefiPxeBcDxe/PxeBcMtftp.c  | 11 ++-
>  NetworkPkg/UefiPxeBcDxe/PxeBcMtftp.h  |  5 -
>  ShellPkg/DynamicCommand/TftpDynamicCommand/Tftp.c |  2 ++
>  3 files changed, 16 insertions(+), 2 deletions(-)
> 
> --
> 2.17.1.windows.2

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 2/2] NetworkPkg/HttpUtilitiesDxe: fix read memory access overflow.

2018-09-27 Thread Fu, Siyuan
Reviewed-by: Fu Siyuan 



> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Songpeng Li
> Sent: Friday, September 28, 2018 9:57 AM
> To: edk2-devel@lists.01.org
> Cc: Fu, Siyuan ; Wu, Jiaxin 
> Subject: [edk2] [PATCH 2/2] NetworkPkg/HttpUtilitiesDxe: fix read memory
> access overflow.
> 
> The input param String of AsciiStrStr() requires a pointer to
>  Null-terminated string, however in HttpUtilitiesParse(),
>  the Buffersize before AllocateZeroPool() is equal to the size
>  of TCP header, after the CopyMem(), it might not end with
>  Null-terminator. It might cause memory access overflow.
> 
> Cc: Fu Siyuan 
> Cc: Wu Jiaxin 
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1204
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Songpeng Li 
> ---
>  NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesProtocol.c | 8 +++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesProtocol.c
> b/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesProtocol.c
> index a9a1c7c586..b0e3e7f081 100644
> --- a/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesProtocol.c
> +++ b/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesProtocol.c
> @@ -298,6 +298,7 @@ HttpUtilitiesParse (
>CHAR8 *FieldName;
>CHAR8 *FieldValue;
>UINTN Index;
> +  UINTN HttpBufferSize;
> 
>Status  = EFI_SUCCESS;
>TempHttpMessage = NULL;
> @@ -311,12 +312,17 @@ HttpUtilitiesParse (
>  return EFI_INVALID_PARAMETER;
>}
> 
> -  TempHttpMessage = AllocateZeroPool (HttpMessageSize);
> +  //
> +  // Append the http response string along with a Null-terminator.
> +  //
> +  HttpBufferSize = HttpMessageSize + 1;
> +  TempHttpMessage = AllocatePool (HttpBufferSize);
>if (TempHttpMessage == NULL) {
>  return EFI_OUT_OF_RESOURCES;
>}
> 
>CopyMem (TempHttpMessage, HttpMessage, HttpMessageSize);
> +  *(TempHttpMessage + HttpMessageSize) = '\0';
> 
>//
>// Get header number
> --
> 2.18.0.windows.1
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 1/2] NetworkPkg/HttpDxe: fix read memory access overflow in HTTPBoot.

2018-09-27 Thread Fu, Siyuan
Reviewed-by: Fu Siyuan 

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Songpeng Li
> Sent: Friday, September 28, 2018 9:57 AM
> To: edk2-devel@lists.01.org
> Cc: Fu, Siyuan ; Wu, Jiaxin 
> Subject: [edk2] [PATCH 1/2] NetworkPkg/HttpDxe: fix read memory access
> overflow in HTTPBoot.
> 
> The input param String of AsciiStrStr() requires a pointer to
>  Null-terminated string, however in HttpTcpReceiveHeader(),
>  the Buffersize before AllocateZeroPool() is equal to the size
>  of TCP header, after the CopyMem(), it might not end with
>  Null-terminator. It might cause memory access overflow.
> 
> Cc: Fu Siyuan 
> Cc: Wu Jiaxin 
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1204
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Songpeng Li 
> ---
>  NetworkPkg/HttpDxe/HttpProto.c | 10 ++
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/NetworkPkg/HttpDxe/HttpProto.c
> b/NetworkPkg/HttpDxe/HttpProto.c
> index 94f89f5665..7d69429be7 100644
> --- a/NetworkPkg/HttpDxe/HttpProto.c
> +++ b/NetworkPkg/HttpDxe/HttpProto.c
> @@ -1914,10 +1914,10 @@ HttpTcpReceiveHeader (
>}
> 
>//
> -  // Append the response string.
> +  // Append the response string along with a Null-terminator.
>//
>*BufferSize = *SizeofHeaders + Fragment.Len;
> -  Buffer  = AllocateZeroPool (*BufferSize);
> +  Buffer  = AllocatePool (*BufferSize + 1);
>if (Buffer == NULL) {
>  Status = EFI_OUT_OF_RESOURCES;
>  return Status;
> @@ -1933,6 +1933,7 @@ HttpTcpReceiveHeader (
>  Fragment.Bulk,
>  Fragment.Len
>  );
> +  *(Buffer + *BufferSize) = '\0';
>*HttpHeaders   = Buffer;
>*SizeofHeaders = *BufferSize;
> 
> @@ -2013,10 +2014,10 @@ HttpTcpReceiveHeader (
>}
> 
>//
> -  // Append the response string.
> +  // Append the response string along with a Null-terminator.
>//
>*BufferSize = *SizeofHeaders + Fragment.Len;
> -  Buffer  = AllocateZeroPool (*BufferSize);
> +  Buffer  = AllocatePool (*BufferSize + 1);
>if (Buffer == NULL) {
>  Status = EFI_OUT_OF_RESOURCES;
>  return Status;
> @@ -2032,6 +2033,7 @@ HttpTcpReceiveHeader (
>  Fragment.Bulk,
>  Fragment.Len
>  );
> +  *(Buffer + *BufferSize) = '\0';
>*HttpHeaders   = Buffer;
>*SizeofHeaders = *BufferSize;
> 
> --
> 2.18.0.windows.1
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH] MdePkg/UefiDevicePathLib: Fix print logic in DevPathToTextiSCSI

2018-09-27 Thread Fu, Siyuan
Hi, Songpeng

According to the iSCSI text device note in UEFI spec, the byte 0 of LUN should 
come first, seems there is no problem in original code logic. Could you please 
double confirm that?
"The LUN is an 8 byte array that is displayed in hexadecimal format 
with byte 0 first (i.e., on the left) and byte 7 last (i.e, on the right), and 
is required."


BestRegards
Fu Siyuan

> -Original Message-
> From: Li, Songpeng
> Sent: Thursday, September 27, 2018 3:37 PM
> To: edk2-devel@lists.01.org
> Cc: Fu, Siyuan ; Wu, Jiaxin ;
> Gao, Liming 
> Subject: [PATCH] MdePkg/UefiDevicePathLib: Fix print logic in
> DevPathToTextiSCSI
> 
> In DevPathToTextiSCSI(), ISCSIDevPath->Lun is printed in reversed orders.
> 
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1216
> Cc: Fu Siyuan 
> Cc: Wu Jiaxin 
> Cc: Liming Gao 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Songpeng Li 
> ---
>  MdePkg/Library/UefiDevicePathLib/DevicePathToText.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
> b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
> index 7d8d304f6f..3f6478e43c 100644
> --- a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
> +++ b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
> @@ -1548,7 +1548,7 @@ DevPathToTextiSCSI (
>  ISCSIDevPath->TargetName,
>  ISCSIDevPath->TargetPortalGroupTag
>  );
> -  for (Index = 0; Index < sizeof (ISCSIDevPath->Lun) / sizeof (UINT8);
> Index++) {
> +  for (Index = sizeof (ISCSIDevPath->Lun) / sizeof (UINT8) - 1; Index >=
> 0; Index--) {
>  UefiDevicePathLibCatPrint (Str, L"%02x", ((UINT8 *)&ISCSIDevPath-
> >Lun)[Index]);
>}
>Options = ISCSIDevPath->LoginOption;
> --
> 2.18.0.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] reg: Clarification on PXE Boot with Client and Server in Different Sub nets

2018-09-26 Thread Fu, Siyuan
Hi, Siva

I think PXE boot should work if the relay agent is configured correctly to 
forward DHCP packets to our client, with the proper gateway address. Are you 
encounter any problem with such use case?

BestRegards
Fu Siyuan

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Sivaraman Nainar
> Sent: Wednesday, September 26, 2018 4:21 PM
> To: Ye, Ting ; Fu, Siyuan ; edk2-
> de...@lists.01.org
> Subject: [edk2] reg: Clarification on PXE Boot with Client and Server in
> Different Sub nets
> 
> Hello,
> 
> Can you clarify if PXE boot supported to work with Client and PXE / DHCP
> Server running in different subnet?
> 
> When the DHCP server running with Relay agent to manage different subnets
> will PXE boot work?
> 
> -Siva
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH] NetworkPkg: fix read memory access overflow in HTTPBoot.

2018-09-24 Thread Fu, Siyuan
Hi, Songpeng

The change is ok with me while I have one comment for the original 
AllocateZeroPool() in these places. Since there will be always a CopyMem() to 
fill up data content to the new allocated buffer, there is no need to use 
AllocateZeroPool(), just AllocatePool() and adding null terminator should be 
enough. This will save the unnecessary ZeroMem() time cost for better 
performance. Thanks.


BestRegards
Fu Siyuan


> -Original Message-
> From: Li, Songpeng
> Sent: Tuesday, September 25, 2018 11:29 AM
> To: edk2-devel@lists.01.org
> Cc: Fu, Siyuan ; Wu, Jiaxin 
> Subject: [PATCH] NetworkPkg: fix read memory access overflow in HTTPBoot.
> 
> The input param String of AsciiStrStr() requires a pointer to
>  Null-terminated string, however in HttpTcpReceiveHeader() and
>  HttpUtilitiesParse(), the Buffersize before AllocateZeroPool()
>  is equal to the size of TCP header, after the CopyMem(), it
>  might not end with Null-terminator. It might cause memory
>  access overflow.
> 
> Cc: Fu Siyuan 
> Cc: Wu Jiaxin 
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1204
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Songpeng Li 
> ---
>  NetworkPkg/HttpDxe/HttpProto.c  | 4 ++--
>  NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesProtocol.c | 4 +++-
>  2 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/NetworkPkg/HttpDxe/HttpProto.c
> b/NetworkPkg/HttpDxe/HttpProto.c
> index 94f89f5665..c729f76eff 100644
> --- a/NetworkPkg/HttpDxe/HttpProto.c
> +++ b/NetworkPkg/HttpDxe/HttpProto.c
> @@ -1917,7 +1917,7 @@ HttpTcpReceiveHeader (
>// Append the response string.
>//
>*BufferSize = *SizeofHeaders + Fragment.Len;
> -  Buffer  = AllocateZeroPool (*BufferSize);
> +  Buffer  = AllocateZeroPool (*BufferSize + 1);
>if (Buffer == NULL) {
>  Status = EFI_OUT_OF_RESOURCES;
>  return Status;
> @@ -2016,7 +2016,7 @@ HttpTcpReceiveHeader (
>// Append the response string.
>//
>*BufferSize = *SizeofHeaders + Fragment.Len;
> -  Buffer  = AllocateZeroPool (*BufferSize);
> +  Buffer  = AllocateZeroPool (*BufferSize + 1);
>if (Buffer == NULL) {
>  Status = EFI_OUT_OF_RESOURCES;
>  return Status;
> diff --git a/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesProtocol.c
> b/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesProtocol.c
> index a9a1c7c586..2292b52537 100644
> --- a/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesProtocol.c
> +++ b/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesProtocol.c
> @@ -298,6 +298,7 @@ HttpUtilitiesParse (
>CHAR8 *FieldName;
>CHAR8 *FieldValue;
>UINTN Index;
> +  UINTN HttpBufferSize;
> 
>Status  = EFI_SUCCESS;
>TempHttpMessage = NULL;
> @@ -311,7 +312,8 @@ HttpUtilitiesParse (
>  return EFI_INVALID_PARAMETER;
>}
> 
> -  TempHttpMessage = AllocateZeroPool (HttpMessageSize);
> +  HttpBufferSize = HttpMessageSize + 1;
> +  TempHttpMessage = AllocateZeroPool (HttpBufferSize);
>if (TempHttpMessage == NULL) {
>  return EFI_OUT_OF_RESOURCES;
>}
> --
> 2.18.0.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v2 0/5] Support windowsize to benefit tftp/pxe download performance.

2018-09-24 Thread Fu, Siyuan
Reviewed-by: Fu Siyuan 

> -Original Message-
> From: Wu, Jiaxin
> Sent: Tuesday, September 25, 2018 9:12 AM
> To: edk2-devel@lists.01.org
> Cc: Ye, Ting ; Fu, Siyuan ; Carsey,
> Jaben ; Shao, Ming ; Laszlo
> Ersek ; Wu, Jiaxin 
> Subject: [PATCH v2 0/5] Support windowsize to benefit tftp/pxe download
> performance.
> 
> *v2: The first three patches(1/2/3) are the same with version 1, just
> update the last two
> patches (4/5):
> I)  windowsize.>
> This patch has been discarded since we rename and redefine the PCD in
> NetworkPkg instead
> of MdeModulePkg. The replacement is:
> [PATCH v2 4/5] NetworkPkg: Define one PCD for PXE to specify MTFTP
> windowsize.
> II) 
> Since the new PCD (PcdPxeTftpWindowSize) was renamed/defined in NetworkPkg
> instead of
> MdeModulePkg, we udpate the consuming PXE driver. The new version patch is:
> [PATCH v2 5/5] NetworkPkg/UefiPxeBcDxe: Use the specified MTFTP windowsize.
> 
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=886
> 
> The series patches are to support the TFTP windowsize option described in
> RFC 7440.
> TFTP shell command and UEFI PXE driver will use the feature to benefit the
> download
> performance.
> 
> Cc: Ye Ting 
> Cc: Fu Siyuan 
> Cc: Carsey Jaben 
> Cc: Shao Ming 
> Cc: Laszlo Ersek 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Wu Jiaxin 
> 
> Jiaxin Wu (5):
>   MdeModulePke/Mtftp4Dxe: Support windowsize in read request operation.
>   NetworkPkg/Mtftp6Dxe: Support windowsize in read request operation.
>   ShellPkg/TftpDynamicCommand: Add one option for tftp command to
> specify windowsize.
>   NetworkPkg: Define one PCD for PXE to specify MTFTP windowsize.
>   NetworkPkg/UefiPxeBcDxe: Use the specified MTFTP windowsize.
> 
>  .../Universal/Network/Mtftp4Dxe/Mtftp4Impl.c  |   5 +
>  .../Universal/Network/Mtftp4Dxe/Mtftp4Impl.h  |  10 ++
>  .../Network/Mtftp4Dxe/Mtftp4Option.c  |  25 +++-
>  .../Network/Mtftp4Dxe/Mtftp4Option.h  |   8 +-
>  .../Universal/Network/Mtftp4Dxe/Mtftp4Rrq.c   |  55 +--
>  .../Network/Mtftp4Dxe/Mtftp4Support.c |   8 +-
>  .../Network/Mtftp4Dxe/Mtftp4Support.h |  13 --
>  .../Universal/Network/Mtftp4Dxe/Mtftp4Wrq.c   |   2 +-
>  NetworkPkg/Mtftp6Dxe/Mtftp6Impl.h |  13 +-
>  NetworkPkg/Mtftp6Dxe/Mtftp6Option.c   |  22 ++-
>  NetworkPkg/Mtftp6Dxe/Mtftp6Option.h   |  14 +-
>  NetworkPkg/Mtftp6Dxe/Mtftp6Rrq.c  |  53 +--
>  NetworkPkg/Mtftp6Dxe/Mtftp6Support.c  |  10 ++
>  NetworkPkg/Mtftp6Dxe/Mtftp6Wrq.c  |   2 +-
>  NetworkPkg/NetworkPkg.dec |   6 +
>  NetworkPkg/NetworkPkg.uni |   6 +
>  NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c   |  10 +-
>  NetworkPkg/UefiPxeBcDxe/PxeBcMtftp.c  | 137 +-
>  NetworkPkg/UefiPxeBcDxe/PxeBcMtftp.h  |   6 +-
>  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf  |   3 +
>  .../DynamicCommand/TftpDynamicCommand/Tftp.c  |  65 +++--
>  .../TftpDynamicCommand/Tftp.uni   |   6 +-
>  22 files changed, 371 insertions(+), 108 deletions(-)
> 
> --
> 2.17.1.windows.2

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [Patch 4/5] MdeModulePkg/MdeModulePkg.dec: Define one PCD for PXE to specify MTFTP windowsize.

2018-09-18 Thread Fu, Siyuan
Hi, Jiaxin

I think we should also update the comments for PcdTftpWindowSize usage.
And could we change the name to PcdPxeTftpWindowSize since it only impacts the 
PXE tftp download?

BestRegards
Fu Siyuan

> -Original Message-
> From: Wu, Jiaxin
> Sent: Monday, September 17, 2018 1:44 PM
> To: edk2-devel@lists.01.org
> Cc: Ye, Ting ; Fu, Siyuan ; Shao,
> Ming ; Wu, Jiaxin 
> Subject: [Patch 4/5] MdeModulePkg/MdeModulePkg.dec: Define one PCD for PXE
> to specify MTFTP windowsize.
> 
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=886
> 
> This patch is to define one new PCD for PXE driver to specify MTFTP
> windowsize so as
> to improve the PXE download performance. The default value is set to 4.
> 
> Cc: Ye Ting 
> Cc: Fu Siyuan 
> Cc: Shao Ming 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Wu Jiaxin 
> ---
>  MdeModulePkg/MdeModulePkg.dec | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec
> index 74a699cbb7..bfc63e5fcb 100644
> --- a/MdeModulePkg/MdeModulePkg.dec
> +++ b/MdeModulePkg/MdeModulePkg.dec
> @@ -1203,10 +1203,11 @@
>## This setting can override the default TFTP block size. A value of 0
> computes
># the default from MTU information. A non-zero value will be used as
> block size
># in bytes.
># @Prompt TFTP block size.
>gEfiMdeModulePkgTokenSpaceGuid.PcdTftpBlockSize|0x0|UINT64|0x30001026
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdTftpWindowSize|0x4|UINT64|0x3000102A
> 
>## Maximum address that the DXE Core will allocate the
> EFI_SYSTEM_TABLE_POINTER
>#  structure. The default value for this PCD is 0, which means that the
> DXE Core
>#  will allocate the buffer from the EFI_SYSTEM_TABLE_POINTER structure
> on a 4MB
>#  boundary as close to the top of memory as feasible.  If this PCD is
> set to a
> --
> 2.17.1.windows.2

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [Patch] MdeModulePkg/Ip4Dxe: Refine the coding style.

2018-09-16 Thread Fu, Siyuan



Reviewed-by: Fu Siyuan 



> -Original Message-
> From: Wu, Jiaxin
> Sent: Monday, September 17, 2018 11:14 AM
> To: edk2-devel@lists.01.org
> Cc: Ye, Ting ; Fu, Siyuan ; Bi,
> Dandan ; Wu, Jiaxin 
> Subject: [Patch] MdeModulePkg/Ip4Dxe: Refine the coding style.
> 
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1180
> Remove the trailing white spaces.
> 
> Cc: Ye Ting 
> Cc: Fu Siyuan 
> Cc: Bi Dandan 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Wu Jiaxin 
> ---
>  MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c
> b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c
> index b1af5294fb..4cb3b32688 100644
> --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c
> +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c
> @@ -673,13 +673,13 @@ Ip4ConfigProtocol (
> 
>  //
>  // Add a route to this connected network in the instance route table.
>  //
>  Ip4AddRoute (
> -  IpInstance->RouteTable,
> -  Ip & Netmask,
> -  Netmask,
> +  IpInstance->RouteTable,
> +  Ip & Netmask,
> +  Netmask,
>IP4_ALLZERO_ADDRESS
>);
>} else {
>  //
>  // Use the default address. Check the state.
> --
> 2.17.1.windows.2

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [Patch] NetworkPkg: UefiPxeBcDxe: Add EXCLUSIVE attribute when opening SNP protocol installed by PXE.

2018-09-16 Thread Fu, Siyuan
Reviewed-by: Fu Siyuan 

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org]
> Sent: Friday, September 14, 2018 3:39 PM
> To: edk2-devel@lists.01.org
> Cc: Ye, Ting ; Fu, Siyuan ; Wu,
> Jiaxin 
> Subject: [edk2] [Patch] NetworkPkg: UefiPxeBcDxe: Add EXCLUSIVE attribute
> when opening SNP protocol installed by PXE.
> 
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1152
> 
> The PXE driver installs a SNP and open this SNP with attribute BY_DRIVER
> to avoid it being opened by MNP driver, this SNP is also expected not to
> be opened by other drivers with EXCLUSIVE attribute. In some cases, other
> drivers may happen to do this by error, and thus cause a system crash.
> This patch adds EXCLUSIVE attribute when opening SNP in PXE driver, and
> will reject all OpenProtocol requests by EXCLUSIVE.
> 
> Cc: Ye Ting 
> Cc: Fu Siyuan 
> Cc: Wu Jiaxin 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Wang Fan 
> ---
>  NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c
> b/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c
> index bc9dc914f3..1a9671d373 100644
> --- a/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c
> +++ b/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c
> @@ -821,11 +821,11 @@ PxeBcCreateIp4Children (
>  Private->Ip4Nic->Controller,
>  &gEfiSimpleNetworkProtocolGuid,
>  (VOID **) &Snp,
>  This->DriverBindingHandle,
>  Private->Ip4Nic->Controller,
> -EFI_OPEN_PROTOCOL_BY_DRIVER
> +
> EFI_OPEN_PROTOCOL_BY_DRIVER|EFI_OPEN_PROTOCOL_EXCLUSIVE
>  );
>  if (EFI_ERROR (Status)) {
>goto ON_ERROR;
>  }
>}
> --
> 2.16.2.windows.1
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [Patch] MdeModulePkg/Library/DxeHttpLib: Handle the blank value in HTTP header.

2018-09-12 Thread Fu, Siyuan
Reviewed-by: Fu Siyuan 



> -Original Message-
> From: Wu, Jiaxin
> Sent: Tuesday, September 4, 2018 3:17 PM
> To: edk2-devel@lists.01.org
> Cc: Stephen Benjamin ; Laszlo Ersek
> ; Ye, Ting ; Fu, Siyuan
> ; Wu, Jiaxin 
> Subject: [Patch] MdeModulePkg/Library/DxeHttpLib: Handle the blank value
> in HTTP header.
> 
> This patch is to resolve the lock-up issue if the value of HTTP header
> is blank.  The issue is recorded @
> https://bugzilla.tianocore.org/show_bug.cgi?id=1102.
> 
> Cc: Stephen Benjamin 
> Cc: Laszlo Ersek 
> Cc: Ye Ting 
> Cc: Fu Siyuan 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Wu Jiaxin 
> ---
>  MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c | 57 +++-
>  1 file changed, 44 insertions(+), 13 deletions(-)
> 
> diff --git a/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c
> b/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c
> index 5fbb50d03a..2fc3da8a2d 100644
> --- a/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c
> +++ b/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c
> @@ -1595,63 +1595,94 @@ HttpGetFieldNameAndValue (
>  return NULL;
>}
> 
>//
>// Each header field consists of a name followed by a colon (":") and
> the field value.
> +  // The field value MAY be preceded by any amount of LWS, though a
> single SP is preferred.
> +  //
> +  // message-header = field-name ":" [ field-value ]
> +  // field-name = token
> +  // field-value = *( field-content | LWS )
> +  //
> +  // Note: "*(element)" allows any number element, including zero;
> "1*(element)" requires at least one element.
> +  //   [element] means element is optional.
> +  //   LWS  = [CRLF] 1*(SP|HT), it can be ' ' or '\t' or '\r\n ' or
> '\r\n\t'.
> +  //   CRLF = '\r\n'.
> +  //   SP   = ' '.
> +  //   HT   = '\t' (Tab).
>//
>FieldNameStr = String;
>FieldValueStr = AsciiStrGetNextToken (FieldNameStr, ':');
>if (FieldValueStr == NULL) {
>  return NULL;
>}
> 
>//
> -  // Replace ':' with 0
> +  // Replace ':' with 0, then FieldName has been retrived from String.
>//
>*(FieldValueStr - 1) = 0;
> 
>//
> -  // The field value MAY be preceded by any amount of LWS, though a
> single SP is preferred.
> -  // Note: LWS  = [CRLF] 1*(SP|HT), it can be '\r\n ' or '\r\n\t' or ' '
> or '\t'.
> -  //   CRLF = '\r\n'.
> -  //   SP   = ' '.
> -  //   HT   = '\t' (Tab).
> +  // Handle FieldValueStr, skip all the preceded LWS.
>//
>while (TRUE) {
>  if (*FieldValueStr == ' ' || *FieldValueStr == '\t') {
>//
>// Boundary condition check.
>//
>if ((UINTN) EndofHeader - (UINTN) FieldValueStr < 1) {
> +//
> +// Wrong String format!
> +//
>  return NULL;
>}
> 
>FieldValueStr ++;
>  } else if (*FieldValueStr == '\r') {
>//
>// Boundary condition check.
>//
>if ((UINTN) EndofHeader - (UINTN) FieldValueStr < 3) {
> -return NULL;
> +//
> +// No more preceded LWS, so break here.
> +//
> +break;
>}
> 
> -  if (*(FieldValueStr + 1) == '\n' && (*(FieldValueStr + 2) == ' ' ||
> *(FieldValueStr + 2) == '\t')) {
> -FieldValueStr = FieldValueStr + 3;
> +  if (*(FieldValueStr + 1) == '\n' ) {
> +if (*(FieldValueStr + 2) == ' ' || *(FieldValueStr + 2) == '\t')
> {
> +  FieldValueStr = FieldValueStr + 3;
> +} else {
> +  //
> +  // No more preceded LWS, so break here.
> +  //
> +  break;
> +}
> +  } else {
> +//
> +// Wrong String format!
> +//
> +return NULL;
>}
>  } else {
> +  //
> +  // No more preceded LWS, so break here.
> +  //
>break;
>  }
>}
> 
> -  //
> -  // Header fields can be extended over multiple lines by preceding each
> extra
> -  // line with at least one SP or HT.
> -  //
>StrPtr = FieldValueStr;
>do {
> +//
> +// Handle the LWS within the field value.
> +//
>  StrPtr = AsciiStrGetNextToken (StrPtr, '\r');
>  if (StrPtr == NULL || *StrPtr != '\n') {
> +  //
> +  // Wrong String format!
> +  //
>return NULL;
>  }
> 
>  StrPtr++;
>} while (*StrPtr == ' ' || *StrPtr == '\t');
> --
> 2.17.1.windows.2

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [Patch v2] MdeModulePkg/Ip4Dxe: Sync the direct route entry setting.

2018-09-12 Thread Fu, Siyuan
Reviewed-by: Fu Siyuan 

> -Original Message-
> From: Wu, Jiaxin
> Sent: Tuesday, September 4, 2018 3:38 PM
> To: edk2-devel@lists.01.org
> Cc: Ye, Ting ; Fu, Siyuan ; Wu,
> Jiaxin 
> Subject: [Patch v2] MdeModulePkg/Ip4Dxe: Sync the direct route entry
> setting.
> 
> v2: use "IP & Netmask" directly instead of defining an additional variable.
> 
> This patch is to sync the direct route entry setting in both the default
> and Instance route table {Subnet, Mask, NextHope} (
> https://bugzilla.tianocore.org/show_bug.cgi?id=1143).
> 
> Cc: Ye Ting 
> Cc: Fu Siyuan 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Wu Jiaxin 
> Reviewed-by: Ye Ting 
> ---
>  MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c |  7 ---
>  MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c| 10 +++---
>  2 files changed, 7 insertions(+), 10 deletions(-)
> 
> diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c
> b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c
> index c19a72730e..b52542cd84 100644
> --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c
> +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c
> @@ -557,17 +557,10 @@ Ip4Config2SetDefaultAddr (
>  return Status;
>}
>  }
>}
> 
> -  Ip4AddRoute (
> -IpSb->DefaultRouteTable,
> -StationAddress,
> -SubnetMask,
> -IP4_ALLZERO_ADDRESS
> -);
> -
>//
>// Add a route for the connected network.
>//
>Subnet = StationAddress & SubnetMask;
> 
> diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c
> b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c
> index 6a26143e30..13ebeab1be 100644
> --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c
> +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c
> @@ -670,14 +670,18 @@ Ip4ConfigProtocol (
> 
>InsertTailList (&IpSb->Interfaces, &IpIf->Link);
>  }
> 
>  //
> -// Add a route to this connected network in the route table
> +// Add a route to this connected network in the instance route table.
>  //
> -Ip4AddRoute (IpInstance->RouteTable, Ip, Netmask,
> IP4_ALLZERO_ADDRESS);
> -
> +Ip4AddRoute (
> +  IpInstance->RouteTable,
> +  Ip & Netmask,
> +  Netmask,
> +  IP4_ALLZERO_ADDRESS
> +  );
>} else {
>  //
>  // Use the default address. Check the state.
>  //
>  if (IpSb->State == IP4_SERVICE_UNSTARTED) {
> --
> 2.17.1.windows.2

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [Patch] ShellPkg: Remove trailing white space

2018-09-07 Thread Fu Siyuan
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1158

Cc: Ruiyu Ni 
Cc: Jaben Carsey 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Fu Siyuan 
---
 ShellPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c 
b/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c
index e9f644c739..cdc6db69c3 100644
--- a/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c
+++ b/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c
@@ -1032,7 +1032,7 @@ IfConfigSetInterfaceInfo (
   SubnetMask  = NTOHL (SubnetMask);
   TempGateway = NTOHL (TempGateway);
   if ((SubnetMask != 0) &&
-  (SubnetMask != 0xu) && 
+  (SubnetMask != 0xu) &&
   !NetIp4IsUnicast (TempGateway, SubnetMask)) {
 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN 
(STR_IFCONFIG_INVALID_GATEWAY), gShellNetwork1HiiHandle, VarArg->Arg);
 ShellStatus = SHELL_INVALID_PARAMETER;
-- 
2.18.0.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH] MdeModulePkg: Remove trailing white space

2018-09-04 Thread Fu, Siyuan
Reviewed-by: Fu Siyuan 

> -Original Message-
> From: Zeng, Star
> Sent: Wednesday, September 5, 2018 10:01 AM
> To: edk2-devel@lists.01.org
> Cc: Zeng, Star ; Bi, Dandan ;
> Gao, Liming ; Wang, Jian J ;
> Fu, Siyuan ; Wu, Jiaxin 
> Subject: [PATCH] MdeModulePkg: Remove trailing white space
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1144
> 
> Cc: Dandan Bi 
> Cc: Liming Gao 
> Cc: Jian J Wang 
> Cc: Siyuan Fu 
> Cc: Jiaxin Wu 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Star Zeng 
> ---
>  MdeModulePkg/Core/Pei/Ppi/Ppi.c|  4 +--
>  MdeModulePkg/Include/Library/NetLib.h  |  2 +-
>  .../Library/DxeCapsuleLibFmp/DxeCapsuleLib.c   |  2 +-
>  MdeModulePkg/Library/DxeNetLib/DxeNetLib.c |  4 +--
>  MdeModulePkg/Universal/EsrtFmpDxe/EsrtFmp.c|  2 +-
>  MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.c  | 14 +-
>  MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c| 30 +++--
> -
>  7 files changed, 29 insertions(+), 29 deletions(-)
> 
> diff --git a/MdeModulePkg/Core/Pei/Ppi/Ppi.c
> b/MdeModulePkg/Core/Pei/Ppi/Ppi.c
> index d8ba2dd42b59..6f03858b8a94 100644
> --- a/MdeModulePkg/Core/Pei/Ppi/Ppi.c
> +++ b/MdeModulePkg/Core/Pei/Ppi/Ppi.c
> @@ -143,7 +143,7 @@ ConvertPointerInRanges (
> 
>Migrate Single PPI Pointer from the temporary memory to PEI installed
> memory.
> 
> -  @param SecCoreData Points to a data structure containing SEC to PEI
> handoff data, such as the size
> +  @param SecCoreData Points to a data structure containing SEC to PEI
> handoff data, such as the size
>   and location of temporary RAM, the stack
> location and the BFV location.
>@param PrivateData Pointer to PeiCore's private data structure.
>@param PpiPointer  Pointer to Ppi
> @@ -179,7 +179,7 @@ ConvertSinglePpiPointer (
> 
>Migrate PPI Pointers from the temporary memory to PEI installed memory.
> 
> -  @param SecCoreData Points to a data structure containing SEC to PEI
> handoff data, such as the size
> +  @param SecCoreData Points to a data structure containing SEC to PEI
> handoff data, such as the size
>   and location of temporary RAM, the stack
> location and the BFV location.
>@param PrivateData Pointer to PeiCore's private data structure.
> 
> diff --git a/MdeModulePkg/Include/Library/NetLib.h
> b/MdeModulePkg/Include/Library/NetLib.h
> index b7ef99c7b568..09779739213e 100644
> --- a/MdeModulePkg/Include/Library/NetLib.h
> +++ b/MdeModulePkg/Include/Library/NetLib.h
> @@ -424,7 +424,7 @@ NetGetIpClass (
>except when the originator is one of the endpoints of a point-to-point
> link with a 31-bit
>mask (RFC3021), or a 32bit NetMask (all 0xFF) is used for special
> network environment (e.g.
>PPP link).
> -
> +
>@param[in]  IpThe IP to check against.
>@param[in]  NetMask   The mask of the IP.
> 
> diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
> b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
> index 91c6849a4658..20fd29a3a87f 100644
> --- a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
> +++ b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
> @@ -765,7 +765,7 @@ GetFmpHandleBufferByType (
>  MatchedHandleBuffer[MatchedNumberOfHandles] =
> HandleBuffer[Index];
>}
>if (MatchedResetRequiredBuffer != NULL) {
> -MatchedResetRequiredBuffer[MatchedNumberOfHandles] =
> (((TempFmpImageInfo->AttributesSupported &
> +MatchedResetRequiredBuffer[MatchedNumberOfHandles] =
> (((TempFmpImageInfo->AttributesSupported &
> 
> IMAGE_ATTRIBUTE_RESET_REQUIRED) != 0) &&
> 
> ((TempFmpImageInfo->AttributesSetting &
> 
> IMAGE_ATTRIBUTE_RESET_REQUIRED) != 0));
> diff --git a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
> b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
> index 63f4724062e9..9e3ea2490928 100644
> --- a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
> +++ b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
> @@ -656,7 +656,7 @@ NetGetIpClass (
>except when the originator is one of the endpoints of a point-to-point
> link with a 31-bit
>mask (RFC3021), or a 32bit NetMask (all 0xFF) is used for special
> network environment (e.g.
>PPP link).
> -
> +
>@param[in]  IpThe IP to check against.
>@param[in]  NetMask   The mask of the IP.
> 
> @@ -671,7 +671,7 @@ NetIp4IsUnicast (
>)
>  {
>INTN   MaskLength;
> -
> +
>ASSERT (NetMask != 0);
> 

[edk2] [PATCH v2] MdeModulePkg/Network: Add 32bit subnet mask support for IP4 PXE boot.

2018-08-29 Thread Fu Siyuan
V2 update:
The original patch has a problem, that if an IP child which not using default 
address is
configured with /32 subnet mask, while the gateway is configured to the default 
route table,
then the gateway won't take effect on that IP child. This patch fixed the 
problem.

This patch updates IP4 stack to support 32bit subnet mask in PXE boot process.
When 32bit subnet mask is used, the IP4 driver couldn't use the subnet mask to 
determine
whether destination IP address is on-link or not, so it will always try to send 
all the
packets to the destination IP address directly first, if failed it will continue
to try the default gateway.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Fu Siyuan 
Cc: Ye Ting 
Cc: Wu Jiaxin 
---
 MdeModulePkg/Include/Library/NetLib.h |   5 +-
 MdeModulePkg/Library/DxeNetLib/DxeNetLib.c|  13 +-
 .../Universal/Network/Ip4Dxe/Ip4Common.h  |   2 +-
 MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.c | 117 --
 MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.h |   5 +-
 .../Universal/Network/Ip4Dxe/Ip4Impl.c|   2 +-
 .../Universal/Network/Ip4Dxe/Ip4Output.c  |  11 +-
 .../Universal/Network/Ip4Dxe/Ip4Route.c   |  26 +++-
 .../Universal/Network/Ip4Dxe/Ip4Route.h   |   9 +-
 .../Universal/Network/Mtftp4Dxe/Mtftp4Impl.c  |   6 +-
 10 files changed, 163 insertions(+), 33 deletions(-)

diff --git a/MdeModulePkg/Include/Library/NetLib.h 
b/MdeModulePkg/Include/Library/NetLib.h
index ef7bc429c1..b7ef99c7b5 100644
--- a/MdeModulePkg/Include/Library/NetLib.h
+++ b/MdeModulePkg/Include/Library/NetLib.h
@@ -422,8 +422,9 @@ NetGetIpClass (
 
   If all bits of the host address of IP are 0 or 1, IP is also not a valid 
unicast address,
   except when the originator is one of the endpoints of a point-to-point link 
with a 31-bit
-  mask (RFC3021).
-
+  mask (RFC3021), or a 32bit NetMask (all 0xFF) is used for special network 
environment (e.g.
+  PPP link).
+  
   @param[in]  IpThe IP to check against.
   @param[in]  NetMask   The mask of the IP.
 
diff --git a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c 
b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
index bf8f5523e6..63f4724062 100644
--- a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
+++ b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
@@ -654,8 +654,9 @@ NetGetIpClass (
 
   If all bits of the host address of IP are 0 or 1, IP is also not a valid 
unicast address,
   except when the originator is one of the endpoints of a point-to-point link 
with a 31-bit
-  mask (RFC3021).
-
+  mask (RFC3021), or a 32bit NetMask (all 0xFF) is used for special network 
environment (e.g.
+  PPP link).
+  
   @param[in]  IpThe IP to check against.
   @param[in]  NetMask   The mask of the IP.
 
@@ -669,18 +670,20 @@ NetIp4IsUnicast (
   IN IP4_ADDR   NetMask
   )
 {
+  INTN   MaskLength;
+  
   ASSERT (NetMask != 0);
 
   if (Ip == 0 || IP4_IS_LOCAL_BROADCAST (Ip)) {
 return FALSE;
   }
 
-  if (NetGetMaskLength (NetMask) != 31) {
+  MaskLength = NetGetMaskLength (NetMask);
+  ASSERT ((MaskLength >= 0) && (MaskLength <= IP4_MASK_NUM));
+  if (MaskLength < 31) {
 if (((Ip &~NetMask) == ~NetMask) || ((Ip &~NetMask) == 0)) {
   return FALSE;
 }
-  } else {
-return TRUE;
   }
 
   return TRUE;
diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Common.h 
b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Common.h
index e0fffc9d0d..994a81f4de 100644
--- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Common.h
+++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Common.h
@@ -55,7 +55,7 @@ typedef struct _IP4_SERVICEIP4_SERVICE;
 /// Compose the fragment field to be used in the IP4 header.
 ///
 #define IP4_HEAD_FRAGMENT_FIELD(Df, Mf, Offset) \
-((UINT16)(((Df) ? 0x4000 : 0) | ((Mf) ? 0x2000 : 0) | (((Offset) >> 3) & 
0x1fff)))
+((UINT16)(((Df) ? IP4_HEAD_DF_MASK : 0) | ((Mf) ? IP4_HEAD_MF_MASK : 0) | 
(((Offset) >> 3) & IP4_HEAD_OFFSET_MASK)))
 
 #define IP4_LAST_FRAGMENT(FragmentField)  \
   (((FragmentField) & IP4_HEAD_MF_MASK) == 0)
diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.c 
b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.c
index 6e0e3290c7..b0172283b7 100644
--- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.c
+++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.c
@@ -138,6 +138,7 @@ Ip4CancelFrameArp (
   @param[in]  CallBack  Call back function to execute if transmission
 finished.
   @param[in]  Context   Opaque parameter to the call back.
+  @param[in]  IpSb  The pointer to the IP4 service binding 
instance.
 
   @retval   Token   The wrapped token if succeed
   @retval   NULLThe wrapped token if NULL
@@ -149,7 +150,8 @@ Ip4WrapLinkTxToken (
   IN IP4_PROTOCOL   *IpInstance OPTIONAL,
   IN NET_BUF   

Re: [edk2] [Patch 1/2] MdeModulePkg/Network: Add 32bit subnet mask support for IP4 PXE boot.

2018-08-28 Thread Fu, Siyuan
Hi, Jiaxin

The IP4 routing logic for /32 subnet mask can be explain as below, maybe I need 
to add it to the commit log or in code comments.

Ip4Output() is called to send a packet
If a matching route cache (src, dest -> xxx) can be find, 
send the packet to address xxx according to the route cache.
else
create a new route cache (src, dest -> dest)
   <- This is done in Ip4Route()
if a default gateway is configured, save it to the route cache 
TAG.<- This is done in Ip4Route()
send the packet to dest 
   <- This is done in Ip4SendFrame()
if ARP resolve failed for dest
find the matching route cache and check TAG to see if 
there is a default gateway  <- This is done in 
Ip4SendFrameToDefaultRoute ()
if yes
update the route cache to (src, dest -> default 
gw)
send the packet to the default gw
    

BestRegards
Fu Siyuan


> -Original Message-
> From: Wu, Jiaxin
> Sent: Tuesday, August 28, 2018 4:53 PM
> To: Fu, Siyuan ; edk2-devel@lists.01.org
> Cc: Ye, Ting 
> Subject: RE: [Patch 1/2] MdeModulePkg/Network: Add 32bit subnet mask
> support for IP4 PXE boot.
> 
> 
> Hi Siyuan,
> 
> Below is my code review understanding, maybe something is wrong, please
> correct me.
> 
> > The "default route" means a route entry with zero SubnetAddress and zero
> > SubnetMask, which will match all the dest address that can't match any
> other
> > non-zero Subnet* route entry.
> > The "instance route table" is a list of route entries which belong to an
> IP child
> > instance.
> > The "default route table" is the route table used by these IP child
> instances
> > with default IP address.
> > A default route (which is just one route entry) may belong to the
> default
> > route table, or any instance route table.
> >
> 
> Yes, I agree. If there is a default route {Dest: 0.0.0.0, Mask: 0.0.0.0,
> NextHope: Gataway} in the instance route table, it must be set via IP-
> >Routes().
> 
> 
> > The new function Ip4SendFrameToDefaultRoute() will always try to send
> the
> > frames to the default entry, so the naming is correct.
> 
> According above, we want to send the packet to the router (Gataway) via
> the default route {Dest: 0.0.0.0, Mask: 0.0.0.0, NextHope: Gataway} info,
> right? But the comments in Ip4Route() said:
>   //
>   // When using /32 subnet mask, the packet will always be sent to the
> direct
>   // destination first, if we can't find a matching route cache.
>   //
> 
> > While how to
> > determine the default route entry is not in this function, the Ip4Route()
> has
> > been updated to handle the /32 subnet mask specially, and Ip4Output()
> will
> > guarantee we check the instance route table first, then default route
> table
> > (the code you quoted).
> 
> After the code I quoted below in Ip4Output(), the route cache entry found
> in Ip4SendFrameToDefaultRoute() is {Dest: X.X.X.X, Src: Y.Y.Y.Y, NextHope:
> X.X.X.X, Tag: { Dest: X.X.X.X, Mask: 255.255.255.255, NextHope:
> 0.0.0.0} }, if so, looks the package will be sent to  NextHope:  0.0.0.0?
> 
> 
> >
> > BestRegards
> > Fu Siyuan
> >
> > > -Original Message-
> > > From: Wu, Jiaxin
> > > Sent: Tuesday, August 28, 2018 2:51 PM
> > > To: Fu, Siyuan ; edk2-devel@lists.01.org
> > > Cc: Ye, Ting 
> > > Subject: RE: [Patch 1/2] MdeModulePkg/Network: Add 32bit subnet mask
> > > support for IP4 PXE boot.
> > >
> > > Hi Siyuan,
> > >
> > > In Ip4SendFrameToDefaultRoute(), you tried to find the default gateway
> IP
> > > address by using the found RtCacheEntry->Tag, I'm confused why it's
> the
> > > default gateway? In my understanding, tag is the cache's corresponding
> > > route entry.  Besides, why we must send the frame to "DefaultRouter",
> > > should be the instance router first, then default router? If so, I
> suggest
> > > to rename the function to Ip4SendFrameToRoute(). Then, the logic in
> the
> > > function to retrieve the gateway should be:
> > > {
> > > if (IpInstance == NULL) {
> > >   CacheEntry = Ip4Route (IpSb->DefaultRouteTable, Head->Dst, Head-
> > >Src,
> > > IpIf->SubnetMask);
> > > } else {
> > >   CacheEntry = Ip4Route (IpInstance->

  1   2   3   4   5   6   7   >