Query regarding controlling phosphor-networkd Dbus "InteraceAdded" and "InterfaceRemoved" signals

Pankaj.Patil at vertiv.com Pankaj.Patil at vertiv.com
Wed Dec 3 00:03:03 AEDT 2025


Query regarding phosphor-networkd:

With the openbmc version 2.18, I have written a custom software module that registers a callback to monitor the Dbus interface signals: "InterfacesAdded" and "InterfacesRemoved" from the phosphor-networkd.
I tried switching my ethernet interface eth0 on AST2600 SoC from DHCP to Static IP.

I could assign static IP successfully to eth0 interface and DHCP IP resource is released. But, I have several observations:

  1.  I see "InterfaceAdded" Dbus signal emitted first from the phosphor-network for DHCP->Static transition. I believe it represents a creation of a dbus static IP object, interface, and properties.
  2.  Followed with it, "InterfaceRemoved" signal is emitted from the phosphor-network that deletes existing DHCP IP object.
  3.  In the signal callback handlers, I have a custom implementation that consists of a mutex lock for my database that is acquired when the "InterfaceRemoved" signal is received and same lock is released when "InterfaceAdded" signal is received. Additionally, I did several database updates based on the signal received.

Now, I see an issue where this database lock is always acquired after DHCP->Static transition. Additionally, some of the database properties are corrupted. After root cause analysis for both the issues, i concluded that it is due to the order of the signals mentioned in point 1 and 2. Consistently, I see a similar order of the signals from phosphor-network i.e. "InterfacAdded" first followed by "InterfaceRemoved"

I want to understand if there is a mechanism to control this order of the "InterfaceAdded" and "InterfaceRemoved" signals from phosphor-network to achieve consistent behavior align to my expectations. My expectation in this case is "IntefaceRemoved" shall always be emitted first and then "InterfaceAdded".

Thanks,
Pankaj Patil
CONFIDENTIALITY NOTICE: The information contained in this message is confidential or protected by law. If you are not the intended recipient please contact the sender and delete this message. Any unauthorized copying of this message or unauthorized distribution of the information contained herein is prohibited.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20251202/322e6e7b/attachment.htm>


More information about the openbmc mailing list