Skip to content

Commit

Permalink
meta-ampere: network: workaround: avoid high dbus traffic
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
NguyenTanNhutQuang authored and thangqn-ampere committed Dec 2, 2022
1 parent f979491 commit b7a57aa
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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<phosphor::network::SystemConfiguration>(
- bus, objPath.string());
- // create the dhcp conf object.
- objPath /= "dhcp";
- dhcpConf = std::make_unique<phosphor::network::dhcp::Configuration>(
- bus, objPath.string(), *this);
+
+ //simply return to prevent hostnamed service is called
+ return;
}

ObjectPath Manager::vlan(IntfName interfaceName, uint32_t id)
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
PACKAGECONFIG:append = " nic-ethtool"

FILESEXTRAPATHS:append := "${THISDIR}/${PN}:"

SRC_URI:append = " \
file://0001_avoid_hostnamed_is_triggered.patch \
"

0 comments on commit b7a57aa

Please sign in to comment.