Add support for MTU property
This commit add support for the MTU property,
which shows the maximum size of the Protocol Data Uint (PDU) in bytes,
that can be passed in an Ethernet frame on the network interface.
We can Get or Set the MTU Size of any interface.
Also this property helps to populate MTUSize in Redfish.
The backend DBus interface code is committed to below location -
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces/+/45033
Tested:
Verified the property with dbus tool for Get, Set operations.
busctl introspect xyz.openbmc_project.Network /xyz/openbmc_project/network/eth3
NAME TYPE SIGNATURE RESULT/VALUE
xyz.openbmc_project.Network.EthernetInterface interface - -
.MTU property u 1500
dbus-send --system --print-reply --dest="xyz.openbmc_project.Network" "/xyz/openbmc_project/network/eth3" org.freedesktop.DBus.Properties.Get string:"xyz.openbmc_project.Network.EthernetInterface" string:"MTU"
method return time=1627365497.929314 sender=:1.39 -> destination=:1.46740 serial=3219493 reply_serial=2
variant uint32 1500
dbus-send --system --print-reply --dest="xyz.openbmc_project.Network" "/xyz/openbmc_project/network/eth3" org.freedesktop.DBus.Properties.Set string:"xyz.openbmc_project.Network.EthernetInterface" string:"MTU" variant:uint32:1480
method return time=1627365546.988526 sender=:1.39 -> destination=:1.46751 serial=3219999 reply_serial=2
dbus-send --system --print-reply --dest="xyz.openbmc_project.Network" "/xyz/openbmc_project/network/eth3" org.freedesktop.DBus.Properties.Get string:"xyz.openbmc_project.Network.EthernetInterface" string:"MTU"
method return time=1627365561.546701 sender=:1.39 -> destination=:1.46754 serial=3220200 reply_serial=2
variant uint32 1480
Signed-off-by: Tejas Patil <tejaspp@ami.com>
Change-Id: I1f501d89d0853467357751577e0c9a4d35f843cc
2 files changed