public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Chang, Abner via groups.io" <abner.chang=amd.com@groups.io>
To: Nickle Wang <nicklew@nvidia.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: Igor Kulchytskyy <igork@ami.com>, Nick Ramirez <nramirez@nvidia.com>
Subject: Re: [edk2-devel] [PATCH] RedfishPkg/RedfishDiscoverDxe: remove Redfish false alarm
Date: Tue, 24 Oct 2023 01:50:45 +0000	[thread overview]
Message-ID: <MN2PR12MB3966BD19217176B302A087D1EADFA@MN2PR12MB3966.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20231023141745.259-1-nicklew@nvidia.com>

[AMD Official Use Only - General]

Reviewed-by: Abner Chang <abner.chang@amd.com>

> -----Original Message-----
> From: Nickle Wang <nicklew@nvidia.com>
> Sent: Monday, October 23, 2023 10:18 PM
> To: devel@edk2.groups.io
> Cc: Chang, Abner <Abner.Chang@amd.com>; Igor Kulchytskyy
> <igork@ami.com>; Nick Ramirez <nramirez@nvidia.com>
> Subject: [PATCH] RedfishPkg/RedfishDiscoverDxe: remove Redfish false alarm
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> - It is expected that caller receives EFI_NO_MAPPING status
> when call issues Configure() to unconfigured network interface.
> Remove this false alarm in GetSubnetInfo() function.
> - Fix typos
>
> Signed-off-by: Nickle Wang <nicklew@nvidia.com>
> Cc: Abner Chang <abner.chang@amd.com>
> Cc: Igor Kulchytskyy <igork@ami.com>
> Cc: Nick Ramirez <nramirez@nvidia.com>
> ---
>  .../RedfishDiscoverDxe/RedfishDiscoverDxe.c      | 16 ++++++++++------
>  1 file changed, 10 insertions(+), 6 deletions(-)
>
> diff --git a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c
> b/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c
> index 2f9e604f6cd6..23da3b968f6c 100644
> --- a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c
> +++ b/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c
> @@ -198,13 +198,17 @@ Tcp4GetSubnetInfo (
>    Tcp4Option.EnableNagle       = TRUE;
>    Status                       = Tcp4->Configure (Tcp4, &Tcp4CfgData);
>    if (EFI_ERROR (Status)) {
> -    DEBUG ((DEBUG_ERROR, "%a: Can't get subnet information\n", __func__));
> +    if (Status == EFI_NO_MAPPING) {
> +      return EFI_SUCCESS;
> +    }
> +
> +    DEBUG ((DEBUG_ERROR, "%a: Can't get subnet information: %r\n",
> __func__, Status));
>      return Status;
>    }
>
>    Status = Tcp4->GetModeData (Tcp4, NULL, NULL, &IpModedata, NULL,
> NULL);
>    if (EFI_ERROR (Status)) {
> -    DEBUG ((DEBUG_ERROR, "%a: Can't get IP mode data information\n",
> __func__));
> +    DEBUG ((DEBUG_ERROR, "%a: Can't get IP mode data information: %r\n",
> __func__, Status));
>      return Status;
>    }
>
> @@ -267,7 +271,7 @@ Tcp6GetSubnetInfo (
>    ZeroMem ((VOID *)&IpModedata, sizeof (EFI_IP6_MODE_DATA));
>    Status = Tcp6->GetModeData (Tcp6, NULL, NULL, &IpModedata, NULL,
> NULL);
>    if (EFI_ERROR (Status)) {
> -    DEBUG ((DEBUG_ERROR, "%a: Can't get IP mode data information\n",
> __func__));
> +    DEBUG ((DEBUG_ERROR, "%a: Can't get IP mode data information: %r\n",
> __func__, Status));
>      return Status;
>    }
>
> @@ -1002,13 +1006,13 @@ NetworkInterfaceGetSubnetInfo (
>                                                 Instance
>                                                 );
>      if (EFI_ERROR (Status)) {
> -      DEBUG ((DEBUG_ERROR, "%a:Failed to get Subnet infomation.\n",
> __func__));
> +      DEBUG ((DEBUG_ERROR, "%a:Failed to get Subnet information.\n",
> __func__));
>        return Status;
>      } else {
>        DEBUG ((DEBUG_MANAGEABILITY, "%a:MAC address: %s\n", __func__,
> Instance->StrMacAddr));
>        if (CheckIsIpVersion6 (Instance)) {
>          if (Instance->SubnetAddrInfoIPv6Number == 0) {
> -          DEBUG ((DEBUG_ERROR, "%a: There is no Subnet infomation for IPv6
> network interface.\n", __func__));
> +          DEBUG ((DEBUG_WARN, "%a: There is no Subnet information for IPv6
> network interface.\n", __func__));
>            return EFI_NOT_FOUND;
>          }
>
> @@ -1554,7 +1558,7 @@ TestForRequiredProtocols (
>                        );
>        if (EFI_ERROR (Status)) {
>          if (Index == ListCount - 1) {
> -          DEBUG ((DEBUG_ERROR, "%a: all required protocols are found on this
> controller handle: %p.\n", __func__, ControllerHandle));
> +          DEBUG ((DEBUG_INFO, "%a: all required protocols are found on this
> controller handle: %p.\n", __func__, ControllerHandle));
>            return EFI_SUCCESS;
>          }
>        }
> --
> 2.17.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109977): https://edk2.groups.io/g/devel/message/109977
Mute This Topic: https://groups.io/mt/102136152/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



      reply	other threads:[~2023-10-24  1:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-23 14:17 [edk2-devel] [PATCH] RedfishPkg/RedfishDiscoverDxe: remove Redfish false alarm Nickle Wang via groups.io
2023-10-24  1:50 ` Chang, Abner via groups.io [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MN2PR12MB3966BD19217176B302A087D1EADFA@MN2PR12MB3966.namprd12.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox