From 9cc183a531e1e309a99784f65b15c0fb1a18ddef Mon Sep 17 00:00:00 2001 From: P Dheeraj Srujan Kumar Date: Fri, 6 May 2022 06:11:20 +0530 Subject: Update to internal 1-0.91-67 Signed-off-by: P Dheeraj Srujan Kumar --- ...ernet_interface-Defer-setting-NIC-enabled.patch | 60 ++++++++++++++++++++++ .../network/phosphor-network_%.bbappend | 1 + .../network/static-mac-addr/mac-check | 2 +- 3 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0004-Revert-ethernet_interface-Defer-setting-NIC-enabled.patch (limited to 'meta-openbmc-mods/meta-common/recipes-network') diff --git a/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0004-Revert-ethernet_interface-Defer-setting-NIC-enabled.patch b/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0004-Revert-ethernet_interface-Defer-setting-NIC-enabled.patch new file mode 100644 index 000000000..48ce9e508 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0004-Revert-ethernet_interface-Defer-setting-NIC-enabled.patch @@ -0,0 +1,60 @@ +From 6e2a7257749c2b27f20095514a96d0b85a4d1fcc Mon Sep 17 00:00:00 2001 +From: Johnathan Mantey +Date: Mon, 17 Jan 2022 11:18:21 -0800 +Subject: [PATCH] Revert "ethernet_interface: Defer setting NIC enabled" + +This reverts commit 329b5fba06acd63ce0fb9f43ea3f99b1542e862e. + +The changes made in this commit prevent enabling and disabling the +NIC. The "Unmanaged" entry in the systemd.network configuration file +is never created or removed. + +Tested: +Alternated the Redfish PATCH command between true and false. +PATCH :url/redfish/v1/Managers/bmc/EthernetInterfaces/eth1 +"InterfaceEnabled": + +Observed the contents of the systemd.network file and saw the +"Unmanaged" entry was never created or removed. + +Used "ip a" to review the active state of the NIC. The NIC was always +active despite sending a PATCH command to disable the NIC. + +When this commit is reverted the NIC enable/disable feature works as +expected. + +Change-Id: Ie4945baa5fff238effe9e2b7b156616cf7200597 +Signed-off-by: Johnathan Mantey +--- + src/ethernet_interface.cpp | 13 +++---------- + 1 file changed, 3 insertions(+), 10 deletions(-) + +diff --git a/src/ethernet_interface.cpp b/src/ethernet_interface.cpp +index 3cca478..fb4bfd6 100644 +--- a/src/ethernet_interface.cpp ++++ b/src/ethernet_interface.cpp +@@ -785,18 +785,11 @@ bool EthernetInterface::nicEnabled(bool value) + return EthernetInterfaceIntf::nicEnabled(); + } + auto ifname = interfaceName(); ++ setNICAdminState(eifSocket.sock, ifname.c_str(), value); + +- writeConfigurationFile(); +- if (!value) +- { +- // We only need to bring down the interface, networkd will always bring +- // up managed interfaces +- manager.addReloadPreHook( +- [ifname = std::move(ifname), eifSocket = std::move(eifSocket)]() { +- setNICAdminState(eifSocket.sock, ifname.c_str(), false); +- }); +- } + EthernetInterfaceIntf::nicEnabled(value); ++ ++ writeConfigurationFile(); + manager.reloadConfigs(); + + return value; +-- +2.34.1 + diff --git a/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network_%.bbappend b/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network_%.bbappend index a6cc6f510..8640f0af7 100644 --- a/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network_%.bbappend @@ -6,6 +6,7 @@ SRC_URI = "git://github.com/openbmc/phosphor-networkd" SRCREV = "cc5a670f1650e76b66750365bd4beecf821969fa" SRC_URI += " file://0003-Adding-channel-specific-privilege-to-network.patch \ + file://0004-Revert-ethernet_interface-Defer-setting-NIC-enabled.patch \ " EXTRA_OECONF:append = " --enable-nic-ethtool=yes" diff --git a/meta-openbmc-mods/meta-common/recipes-network/network/static-mac-addr/mac-check b/meta-openbmc-mods/meta-common/recipes-network/network/static-mac-addr/mac-check index 429f9264b..e949a9117 100644 --- a/meta-openbmc-mods/meta-common/recipes-network/network/static-mac-addr/mac-check +++ b/meta-openbmc-mods/meta-common/recipes-network/network/static-mac-addr/mac-check @@ -84,7 +84,7 @@ configure_netipmid_svc_eth1() { /bin/systemctl enable "phosphor-ipmi-net@eth1.socket" /bin/systemctl start "phosphor-ipmi-net@eth1.socket" fi - if [ $(systemctl is-enabled phosphor-ipmi-net@eth1.service) =="disabled" ]; + if [ $(systemctl is-enabled phosphor-ipmi-net@eth1.service) == "disabled" ]; then /bin/systemctl enable "phosphor-ipmi-net@eth1.service" /bin/systemctl start "phosphor-ipmi-net@eth1.service" -- cgit v1.2.3