summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNickle Wang <nicklew@nvidia.com>2023-10-23 20:40:42 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-10-24 03:51:22 +0000
commitfb044b7fe893a4545995bfe2701fd38e593355d9 (patch)
tree58fe58cec44a007755bc63f683c7f532e9a22b12
parentda73578bf7afee1fdd1abe97eaf733aa1e4bdefe (diff)
downloadedk2-fb044b7fe893a4545995bfe2701fd38e593355d9.tar.gz
edk2-fb044b7fe893a4545995bfe2701fd38e593355d9.tar.bz2
edk2-fb044b7fe893a4545995bfe2701fd38e593355d9.zip
RedfishPkg/RedfishDiscoverDxe: remove Redfish false alarm
- 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> Reviewed-by: Abner Chang <abner.chang@amd.com>
-rw-r--r--RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c b/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c
index 2f9e604f6c..23da3b968f 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;
}
}