audk/RedfishPkg/RedfishDiscoverDxe
Abner Chang b8a3eec88c RedfishPkg/RedfishDicovery: Remedy Redfish service discovery flow
Remedy Redfish service discovery flow changes made
in commit 8736b8fd.

The above fix creates the dependency with SMBIOS 42h record,
which has a problem as SMBIOS 42h may not be created when
RedfishDiscovery.Supported() is invoked even all of the
required protocols are ready on the ControllerHandle. We can’t
guarantee SMBIOS 42 structure will be always created before
ConnectController(). USB NIC maybe detected late and it means
PlatformHostInterfaceBmcUsbNicLib can populate SMBIOS 42h
information late as well. Calling to
RedfishServiceGetNetworkInterface with the previous fix may
result in no network interface for BMC-exposed NIC as SMBIOS
42h is not ready yet.This is the first issue.

Second, to skip the network interface when
NetworkInterfaceGetSubnetInfo() returns a failure also has
problem, as the NIC may be configured via RestEx->Configure().
This happens after the Host interface is discovered, as at this
moment we have the sufficient network information to configure
BMC-exposed NIC.

Base on Redfish spec in 31.1.5.2, “EFI Redfish Client may provide
selection UI of network interfaces for Redfish service discovery.",
This means edk2 Redfish client gets all network interfaces
through RedfishServiceGetNetworkInterface and choose the desired
network interface at its discretion for Redfish service.

So the fix here is:
1. In BuildNetworkInterface(), we don’t skip any network
   interface. In RedfishServiceGetNetworkInterface, we don’t
   skip any network interface even the subnet information is not
   retrieved. We will still return all of network interfaces to
   client.
2. In RedfishServiceAcquireService for
   EFI_REDFISH_RISCOVER_HOST_INTERFACE case, we don’t skip any
   network interface even the subnet information is not
   retrieved.

3. Added some more debug information.

Note: The subnet information is used for the scenario the system
is managed by a centralized Redfish service (not on BMC), says
the multiple Redfish computer system instances. As it mentions
in 31.1.5.2, Redfish client they may have to know the subnet
information so they can know the network domain the NIC is
connected. There may have multiple subnets in the corporation
network environment. So the subnet information provides client
an idea when they choose the network interface, so does VLAN ID.

Signed-off-by: Abner Chang <abner.chang@amd.com>
Cc: Nickle Wang <nicklew@nvidia.com>
Cc: Igor Kulchytskyy <igork@ami.com>
Cc: Mike Maslenkin <mike.maslenkin@gmail.com>
Reviewed-by: Igor Kulchytskyy <igork@ami.com>
Acked-by: Mike Maslenkin <mike.maslenkin@gmail.com>
2023-12-13 03:07:43 +00:00
..
ComponentName.c RedfishPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
RedfishDiscoverDxe.c RedfishPkg/RedfishDicovery: Remedy Redfish service discovery flow 2023-12-13 03:07:43 +00:00
RedfishDiscoverDxe.inf RedfishPkg/RedfishDiscoverDxe: introduce PcdRedfishSendReceiveTimeout 2023-10-18 15:07:44 +00:00
RedfishDiscoverInternal.h RedfishPkg/RedfishDiscovery: Refine SMBIOS 42h code 2023-12-05 03:27:03 +00:00
RedfishSmbiosHostInterface.c RedfishPkg/RedfishDiscovery: Refine SMBIOS 42h code 2023-12-05 03:27:03 +00:00