Re: [edk2-devel] [PATCH 3/5] RedfishPkg: Create RestEx child on selected interface

2023-04-20 Thread Minh Nguyen OS via groups.io
Hi Chang,

  It seems like my email has the problem, please expect the delay for my v2 
patches while my email's fixing. Thanks for your patience.

Thanks,
Minh Nguyen

From: Chang, Abner 
Sent: Sunday, April 16, 2023 11:36 AM
To: Minh Nguyen OS ; devel@edk2.groups.io 

Cc: Open Source Submission ; nick...@nvidia.com 
; ig...@ami.com ; Nhi Pham OS 
; Tinh Nguyen OS 
; Vu Nguyen OS 

Subject: RE: [PATCH 3/5] RedfishPkg: Create RestEx child on selected interface

[AMD Official Use Only - General]

Hi Minh,
That is weird I can't find this patch set on group.io, and I can't apply this 
patch from email neither. Could you please check it?

Thanks
Abner

> -Original Message-
> From: Minh Nguyen 
> Sent: Friday, April 14, 2023 4:19 PM
> To: devel@edk2.groups.io
> Cc: patc...@amperecomputing.com; Chang, Abner
> ; nick...@nvidia.com; ig...@ami.com;
> n...@os.amperecomputing.com; tinhngu...@os.amperecomputing.com; Vu
> Nguyen ; Minh Nguyen
> 
> Subject: [PATCH 3/5] RedfishPkg: Create RestEx child on selected interface
>
> Caution: This message originated from an External Source. Use proper
> caution when opening attachments, clicking links, or responding.
>
>
> From: Vu Nguyen 
>
> When a MAC address matching interface is found, a RestEx child will be
> created to provide the Redfish communication on that interface.
> Currently, It will try to locate all RestEx binding services and choose the 
> first
> satisfied instance without taking care about current selected interface. This
> might raise an issue on the system with multiple network devices that the
> RestEx child was installed on wrong interface.
>
> Signed-off-by: Minh Nguyen 
> ---
>  RedfishPkg/Include/Library/RestExLib.h |   3 +
>  RedfishPkg/Library/DxeRestExLib/DxeRestExLib.c | 153 --
> --
>  RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c |   1 +
>  3 files changed, 63 insertions(+), 94 deletions(-)
>
> diff --git a/RedfishPkg/Include/Library/RestExLib.h
> b/RedfishPkg/Include/Library/RestExLib.h
> index bc4e4ca6caa7..2c32c3684cf4 100644
> --- a/RedfishPkg/Include/Library/RestExLib.h
> +++ b/RedfishPkg/Include/Library/RestExLib.h
> @@ -2,6 +2,7 @@
>This library provides help functions for REST EX Protocol.
>
>(C) Copyright 2020 Hewlett Packard Enterprise Development LP
> +  Copyright (c) 2023, Ampere Computing LLC. All rights reserved.
>
>SPDX-License-Identifier: BSD-2-Clause-Patent
>
> @@ -20,6 +21,7 @@
>This function allows the caller to create child handle for specific
>REST server.
>
> +  @param[in]  Controller   The controller handle used of selected
> interface.
>@param[in]  ImageThe image handle used to open service.
>@param[in]  AccessMode   Access mode of REST server.
>@param[in]  ConfigType   Underlying configuration to communicate
> with REST server.
> @@ -32,6 +34,7 @@
>  **/
>  EFI_STATUS
>  RestExLibCreateChild (
> +  IN EFI_HANDLE   Controller,
>IN EFI_HANDLE   Image,
>IN EFI_REST_EX_SERVICE_ACCESS_MODE  AccessMode,
>IN EFI_REST_EX_CONFIG_TYPE  ConfigType,
> diff --git a/RedfishPkg/Library/DxeRestExLib/DxeRestExLib.c
> b/RedfishPkg/Library/DxeRestExLib/DxeRestExLib.c
> index d9acad24dec1..6002be93c54e 100644
> --- a/RedfishPkg/Library/DxeRestExLib/DxeRestExLib.c
> +++ b/RedfishPkg/Library/DxeRestExLib/DxeRestExLib.c
> @@ -2,6 +2,7 @@
>This library provides help functions for REST EX Protocol.
>
>(C) Copyright 2020 Hewlett Packard Enterprise Development LP
> +  Copyright (c) 2023, Ampere Computing LLC. All rights reserved.
>
>SPDX-License-Identifier: BSD-2-Clause-Patent
>
> @@ -9,6 +10,7 @@
>
>  #include 
>  #include 
> +#include 
>  #include   #include 
> #include 
> @@ -21,6 +23,7 @@
>This function allows the caller to create child handle for specific
>REST server.
>
> +  @param[in]  Controller   The controller handle used of selected
> interface.
>@param[in]  ImageThe image handle used to open service.
>@param[in]  AccessMode   Access mode of REST server.
>@param[in]  ConfigType   Underlying configuration to communicate
> with REST server.
> @@ -33,6 +36,7 @@
>  **/
>  EFI_STATUS
>  RestExLibCreateChild (
> +  IN EFI_HANDLE   Controller,
>IN EFI_HANDLE   Image,
>IN EFI_REST_EX_SERVICE_ACCESS_MODE  AccessMode,
>IN EFI_REST_EX_CONFIG_TYPE  ConfigType,
> @@ -41,8 +45,6 @@ RestExLibCreateChild (
>)
>  {
>EFI_STATUSStatus;
> -  UINTN NoBuffer;
> -  EFI_HANDLE*Handle;
>EFI_HANDLEChildHandle;
>EFI_REST_EX_PROTOCOL  *RestEx;
>EFI_REST_EX_SERVICE_INFO  *RestExServiceInfo; @@ -59,116 +61,79 @@
> RestExLibCreateChild (
>}
>
>*ChildInstanceHandle = NULL;
> -  //
> -  // Locate all REST EX binding service.
> -  //
> - 

Re: [edk2-devel] [PATCH 3/5] RedfishPkg: Create RestEx child on selected interface

2023-04-20 Thread Minh Nguyen OS via groups.io
Hi Chang,

 Yes, this is the first time and the issue comes from my internal mail and 
waiting for fixing. Thanks for that information and will check with 
miki.deme...@intel.com as well.

Thanks,
Minh Nguyen.

From: Chang, Abner 
Sent: Thursday, April 20, 2023 8:28 AM
To: Minh Nguyen OS ; devel@edk2.groups.io 

Cc: Open Source Submission ; nick...@nvidia.com 
; ig...@ami.com ; Nhi Pham OS 
; Tinh Nguyen OS 
; Vu Nguyen OS 

Subject: Re: [PATCH 3/5] RedfishPkg: Create RestEx child on selected interface


[AMD Official Use Only - General]

Hi Minh,
Is this the first time you send email to groups.io, if yes please also check it 
with Miki
miki.deme...@intel.com to confirm is your mail passed through groups.io or not.

Thanks
Abner


Get Outlook for Android


From: Minh Nguyen OS 
Sent: Thursday, April 20, 2023, 9:23 AM
To: Chang, Abner ; devel@edk2.groups.io 

Cc: Open Source Submission ; nick...@nvidia.com 
; ig...@ami.com ; Nhi Pham OS 
; Tinh Nguyen OS 
; Vu Nguyen OS 

Subject: Re: [PATCH 3/5] RedfishPkg: Create RestEx child on selected interface

Caution: This message originated from an External Source. Use proper caution 
when opening attachments, clicking links, or responding.

Hi Chang,

  It seems like my email has the problem, please expect the delay for my v2 
patches while my email's fixing. Thanks for your patience.

Thanks,
Minh Nguyen

From: Chang, Abner 
Sent: Sunday, April 16, 2023 11:36 AM
To: Minh Nguyen OS ; devel@edk2.groups.io 

Cc: Open Source Submission ; nick...@nvidia.com 
; ig...@ami.com ; Nhi Pham OS 
; Tinh Nguyen OS 
; Vu Nguyen OS 

Subject: RE: [PATCH 3/5] RedfishPkg: Create RestEx child on selected interface

[AMD Official Use Only - General]

Hi Minh,
That is weird I can't find this patch set on group.io, and I can't apply this 
patch from email neither. Could you please check it?

Thanks
Abner

> -Original Message-
> From: Minh Nguyen 
> Sent: Friday, April 14, 2023 4:19 PM
> To: devel@edk2.groups.io
> Cc: patc...@amperecomputing.com; Chang, Abner
> ; nick...@nvidia.com; ig...@ami.com;
> n...@os.amperecomputing.com; tinhngu...@os.amperecomputing.com; Vu
> Nguyen ; Minh Nguyen
> 
> Subject: [PATCH 3/5] RedfishPkg: Create RestEx child on selected interface
>
> Caution: This message originated from an External Source. Use proper
> caution when opening attachments, clicking links, or responding.
>
>
> From: Vu Nguyen 
>
> When a MAC address matching interface is found, a RestEx child will be
> created to provide the Redfish communication on that interface.
> Currently, It will try to locate all RestEx binding services and choose the 
> first
> satisfied instance without taking care about current selected interface. This
> might raise an issue on the system with multiple network devices that the
> RestEx child was installed on wrong interface.
>
> Signed-off-by: Minh Nguyen 
> ---
>  RedfishPkg/Include/Library/RestExLib.h |   3 +
>  RedfishPkg/Library/DxeRestExLib/DxeRestExLib.c | 153 --
> --
>  RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c |   1 +
>  3 files changed, 63 insertions(+), 94 deletions(-)
>
> diff --git a/RedfishPkg/Include/Library/RestExLib.h
> b/RedfishPkg/Include/Library/RestExLib.h
> index bc4e4ca6caa7..2c32c3684cf4 100644
> --- a/RedfishPkg/Include/Library/RestExLib.h
> +++ b/RedfishPkg/Include/Library/RestExLib.h
> @@ -2,6 +2,7 @@
>This library provides help functions for REST EX Protocol.
>
>(C) Copyright 2020 Hewlett Packard Enterprise Development LP
> +  Copyright (c) 2023, Ampere Computing LLC. All rights reserved.
>
>SPDX-License-Identifier: BSD-2-Clause-Patent
>
> @@ -20,6 +21,7 @@
>This function allows the caller to create child handle for specific
>REST server.
>
> +  @param[in]  Controller   The controller handle used of selected
> interface.
>@param[in]  ImageThe image handle used to open service.
>@param[in]  AccessMode   Access mode of REST server.
>@param[in]  ConfigType   Underlying configuration to communicate
> with REST server.
> @@ -32,6 +34,7 @@
>  **/
>  EFI_STATUS
>  RestExLibCreateChild (
> +  IN EFI_HANDLE   Controller,
>IN EFI_HANDLE   Image,
>IN EFI_REST_EX_SERVICE_ACCESS_MODE  AccessMode,
>IN EFI_REST_EX_CONFIG_TYPE  ConfigType,
> diff --git a/RedfishPkg/Library/DxeRestExLib/DxeRestExLib.c
> b/RedfishPkg/Library/DxeRestExLib/DxeRestExLib.c
> index d9acad24dec1..6002be93c54e 100644
> --- a/RedfishPkg/Library/DxeRestExLib/DxeRestExLib.c
> +++ b/RedfishPkg/Library/DxeRestExLib/DxeRestExLib.c
> @@ -2,6 +2,7 @@
>This library provides help functions for REST EX Protocol.
>
>(C) Copyright 2020 Hewlett Packard Enterprise Development LP
> +  Copyright (c) 2023, Ampere Computing LLC. All rights reserved.
>
>SPDX-License-Identifier: BSD-2-Cla

Re: [edk2-devel] [PATCH 2/5] RedfishPkg: Prevent assertion of allocate zero length region

2023-04-17 Thread Minh Nguyen OS via groups.io
Hi Wang,

 Thanks for this point, you're right. It's a redundant change and I will update 
in v2 patches, but the second change is necessary. How do you think about that?

Thanks,
Minh Nguyen

-Original Message-
From: Nickle Wang  
Sent: Friday, April 14, 2023 4:04 PM
To: Minh Nguyen OS ; devel@edk2.groups.io
Cc: Open Source Submission ; abner.ch...@amd.com; 
ig...@ami.com; Nhi Pham OS ; Tinh Nguyen OS 
; Vu Nguyen OS 

Subject: RE: [PATCH 2/5] RedfishPkg: Prevent assertion of allocate zero length 
region

Hi Minh,

> Prevent assertion of allocate zero length region

May I know where does zero length allocation happen? According to my 
understanding, setting the "SubnetAddrInfoIPv6Number" to zero here and it will 
be handled by below condition check:

https://github.com/tianocore/edk2/blob/55b67b6950e648338adfe8ec54aeb26ed89d2c97/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c#L1005

Then the code leaves function with EFI_NOT_FOUND error. 

Thanks,
Nickle

> -Original Message-
> From: Minh Nguyen 
> Sent: Friday, April 14, 2023 4:19 PM
> To: devel@edk2.groups.io
> Cc: patc...@amperecomputing.com; abner.ch...@amd.com; Nickle Wang 
> ; ig...@ami.com; n...@os.amperecomputing.com; 
> tinhngu...@os.amperecomputing.com; Vu Nguyen 
> ; Minh Nguyen 
> 
> Subject: [PATCH 2/5] RedfishPkg: Prevent assertion of allocate zero 
> length region
> 
> External email: Use caution opening links or attachments
> 
> 
> From: Vu Nguyen 
> 
> This change also fix miscellaneous errors on condition checking and 
> debug argument missing.
> 
> Signed-off-by: Minh Nguyen 
> ---
>  RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c
> b/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c
> index 583c6f78e19c..29e7b0624ebf 100644
> --- a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c
> +++ b/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c
> @@ -5,6 +5,7 @@
>(C) Copyright 2021 Hewlett Packard Enterprise Development LP
>Copyright (c) 2022, AMD Incorporated. All rights reserved.
>Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
> +  Copyright (c) 2023, Ampere Computing LLC. All rights reserved.
> 
>SPDX-License-Identifier: BSD-2-Clause-Patent
> 
> @@ -272,7 +273,7 @@ Tcp6GetSubnetInfo (
>if (IpModedata.AddressCount == 0) {
>  DEBUG ((DEBUG_INFO, "%a: No IPv6 address configured.\n", __func__));
>  Instance->SubnetAddrInfoIPv6Number = 0;
> -return EFI_SUCCESS;
> +return EFI_NOT_FOUND;
>}
> 
>if (Instance->SubnetAddrInfoIPv6 != NULL) { @@ -926,7 +927,7 @@ 
> AddAndSignalNewRedfishService (
>  }
> 
>  Status = gBS->SignalEvent (Instance->DiscoverToken->Event);
> -if (!EFI_ERROR (Status)) {
> +if (EFI_ERROR (Status)) {
>DEBUG ((DEBUG_ERROR, "%a:No event to signal!\n", __func__));
>  }
>}
> --
> 2.39.0



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#103115): https://edk2.groups.io/g/devel/message/103115
Mute This Topic: https://groups.io/mt/98258415/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-