Skip to content

Commit

Permalink
RedfishPkg/RedfishDiscoverDxe: remove Redfish false alarm
Browse files Browse the repository at this point in the history
- 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 <[email protected]>
Cc: Abner Chang <[email protected]>
Cc: Igor Kulchytskyy <[email protected]>
Cc: Nick Ramirez <[email protected]>
Reviewed-by: Abner Chang <[email protected]>
  • Loading branch information
nicklela authored and mergify[bot] committed Oct 24, 2023
1 parent da73578 commit fb044b7
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}
}
Expand Down

0 comments on commit fb044b7

Please sign in to comment.