summaryrefslogtreecommitdiff
path: root/redfish-core
diff options
context:
space:
mode:
authorAnthony <anthonyhkf@google.com>2023-10-23 09:22:43 +0300
committerEd Tanous <ed@tanous.net>2023-11-15 19:43:56 +0300
commit3e7a8da60d70f4c42ae8ce0a3ecb0709194eb831 (patch)
tree032c984274c1163cf9c2e3206653692697cb12f0 /redfish-core
parent9e9d99dadc7fa1933b2dfbc66d34b72091674d60 (diff)
downloadbmcweb-3e7a8da60d70f4c42ae8ce0a3ecb0709194eb831.tar.xz
ethernet: change MTU type to size_t
Modify the type to get this working on 64-bit system. In phosphor-dbus-interfaces, the type is `size`: https://github.com/openbmc/phosphor-dbus-interfaces/blob/8a2674b/yaml/xyz/openbmc_project/Network/EthernetInterface.interface.yaml#L26 phoshor-networkd has this correct and no other places use. https://github.com/openbmc/phosphor-networkd/blob/6f256bc591bec72dd1448522d941874b21145a81/src/ethernet_interface.hpp#L146 Tested: ``` Before: curl localhost/redfish/v1/Managers/bmc/EthernetInterfaces/eth0 -s | grep MTU "MTUSize": 0, After: curl localhost/redfish/v1/Managers/bmc/EthernetInterfaces/eth0 -s | grep MTU "MTUSize": 1500, ``` Change-Id: If3506c6274d2083b61c5c27cc6d8e178495ccea0 Signed-off-by: Anthony <anthonyhkf@google.com> Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
Diffstat (limited to 'redfish-core')
-rw-r--r--redfish-core/lib/ethernet.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/redfish-core/lib/ethernet.hpp b/redfish-core/lib/ethernet.hpp
index 80da49bda9..099aab83f9 100644
--- a/redfish-core/lib/ethernet.hpp
+++ b/redfish-core/lib/ethernet.hpp
@@ -254,8 +254,8 @@ inline bool extractEthernetInterfaceData(
}
else if (propertyPair.first == "MTU")
{
- const uint32_t* mtuSize =
- std::get_if<uint32_t>(&propertyPair.second);
+ const size_t* mtuSize =
+ std::get_if<size_t>(&propertyPair.second);
if (mtuSize != nullptr)
{
ethData.mtuSize = *mtuSize;