From b7a57aa93041d9181a67a562be8648d35bc9cc7c Mon Sep 17 00:00:00 2001 From: "quang.name" Date: Sun, 20 Nov 2022 18:11:03 +0700 Subject: [PATCH] meta-ampere: network: workaround: avoid high dbus traffic During the DC power cycle, if an interface is lost and re-gained (especially an inband interface, like usb0), phosphor-network will jump to the method "createChildObjects()" to create these two object paths "/xyz/openbmc_project/network/config and /xyz/openbmc_project/network/config/dhcp" and it will keep recursively triggering the org.freedesktop.hostname1 service to query for hostname. This leads to the dbus become busy and will affect other services like ipmid which also query for data during DC power cycle. This commit adds a workaround for this issue, derived from below commits currently reviewed https://gerrit.openbmc.org/c/openbmc/phosphor-networkd/+/58755 https://gerrit.openbmc.org/c/openbmc/phosphor-networkd/+/58725 Tested: 1. Run stress DC power cycle 100 times and do not see ssif interface issue. Signed-off-by: quang.name --- .../0001_avoid_hostnamed_is_triggered.patch | 28 +++++++++++++++++++ .../network/phosphor-network_%.bbappend | 6 ++++ 2 files changed, 34 insertions(+) create mode 100644 meta-ampere/meta-common/recipes-phosphor/network/phosphor-network/0001_avoid_hostnamed_is_triggered.patch diff --git a/meta-ampere/meta-common/recipes-phosphor/network/phosphor-network/0001_avoid_hostnamed_is_triggered.patch b/meta-ampere/meta-common/recipes-phosphor/network/phosphor-network/0001_avoid_hostnamed_is_triggered.patch new file mode 100644 index 000000000000..e3c0cb219759 --- /dev/null +++ b/meta-ampere/meta-common/recipes-phosphor/network/phosphor-network/0001_avoid_hostnamed_is_triggered.patch @@ -0,0 +1,28 @@ +diff --git a/src/network_manager.cpp b/src/network_manager.cpp +index 86d892fb..6c627de5 100644 +--- a/src/network_manager.cpp ++++ b/src/network_manager.cpp +@@ -149,20 +149,9 @@ void Manager::createChildObjects() + + // creates the ethernet interface dbus object. + createInterfaces(); +- +- systemConf.reset(nullptr); +- dhcpConf.reset(nullptr); +- +- fs::path objPath = objectPath; +- objPath /= "config"; +- +- // create the system conf object. +- systemConf = std::make_unique( +- bus, objPath.string()); +- // create the dhcp conf object. +- objPath /= "dhcp"; +- dhcpConf = std::make_unique( +- bus, objPath.string(), *this); ++ ++ //simply return to prevent hostnamed service is called ++ return; + } + + ObjectPath Manager::vlan(IntfName interfaceName, uint32_t id) diff --git a/meta-ampere/meta-common/recipes-phosphor/network/phosphor-network_%.bbappend b/meta-ampere/meta-common/recipes-phosphor/network/phosphor-network_%.bbappend index ef2e2bab4134..74ed90adcd87 100644 --- a/meta-ampere/meta-common/recipes-phosphor/network/phosphor-network_%.bbappend +++ b/meta-ampere/meta-common/recipes-phosphor/network/phosphor-network_%.bbappend @@ -1 +1,7 @@ PACKAGECONFIG:append = " nic-ethtool" + +FILESEXTRAPATHS:append := "${THISDIR}/${PN}:" + +SRC_URI:append = " \ + file://0001_avoid_hostnamed_is_triggered.patch \ + "