History log of /openbmc/phosphor-networkd/src/inventory_mac.cpp (Results 1 – 12 of 12)
Revision Date Author Comments
# ad205028 16-Aug-2024 Patrick Williams <patrick@stwcx.xyz>

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda forma

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda formatting also changed, so we have made changes to the
organization default style format to better handle lambda formatting.

See I5e08687e696dd240402a2780158664b7113def0e for updated style.
See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.

Change-Id: I335e0c726360eaae85b9b54c16b5dcbe4a3f182e
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# d92826d2 17-Jun-2024 Manojkiran Eda <manojkiran.eda@gmail.com>

Fix spelling mistakes using codespell

This commit corrects various spelling mistakes throughout the
repository. The corrections were made automatically using `codespell`[1]
tool.

[1]: https://githu

Fix spelling mistakes using codespell

This commit corrects various spelling mistakes throughout the
repository. The corrections were made automatically using `codespell`[1]
tool.

[1]: https://github.com/codespell-project/codespell

Change-Id: I169e5e1674cfda3599ea585ca3fd7afcfed601c0
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>

show more ...


# 2eec06d6 13-Sep-2023 Asmitha Karunanithi <asmitk01@in.ibm.com>

inventory_mac: Fix Update MAC for eth1

Whenever the network daemon starts, and if the inventory manager has
already started, then networkd should read the MAC address from the
inventory and update t

inventory_mac: Fix Update MAC for eth1

Whenever the network daemon starts, and if the inventory manager has
already started, then networkd should read the MAC address from the
inventory and update the dbus object and configuration file.

Currently, this is being done for just eth0 interface and is exiting
before updating the MAC on eth1.

This commit fixes the above issue.

Tested-By:
* Restarted network manager service; checked MAC on both
inventory and network dbus & config files.
* Checked for both reboot and factory reset usecases.

Change-Id: I49d94f22d914f74c23999a5fe175bfc4d97759a9
Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com>

show more ...


# b7d6a1a7 17-Jun-2023 William A. Kennington III <wak@google.com>

types: Migrate to stdplus EtherAddr

Change-Id: I1ec2cd0b57a9f02fe96bbe9a068d1a437805b43a
Signed-off-by: William A. Kennington III <wak@google.com>


# 60903ee7 02-Jun-2023 William A. Kennington III <wak@google.com>

types: Migrate to stdplus string maps

Trivial refactor to share more code.

Change-Id: I665bec386ef13a4665536457ab174e621ef64d14
Signed-off-by: William A. Kennington III <wak@google.com>


# 1d25ca4e 30-May-2023 William A. Kennington III <wak@google.com>

treewide: Make logging variables more consistent

This aims to better group related variables and differentiate keywords
like INTERFACE_NAME into NET vs DBUS.

Tested: Ran on a machine to verify that

treewide: Make logging variables more consistent

This aims to better group related variables and differentiate keywords
like INTERFACE_NAME into NET vs DBUS.

Tested: Ran on a machine to verify that our info log messages still look
sane in the journal.

Change-Id: Ic4d1faaaf5c432e69cacd387fa972481916b6bc8
Signed-off-by: William A. Kennington III <wak@google.com>

show more ...


# 89d734b9 10-May-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.

Change-Id: Ia4966a0790437eb0fc011c747f3be2a52884e4d8
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 49f9d255 17-Apr-2023 Jagpal Singh Gill <paligill@gmail.com>

logging: switch phosphor-network-manager exe to lg2

Tested: Build passes with "ninja -C build".
Change-Id: Ib02682393aba65b16f55eece58ecf50321190a56
Signed-off-by: Jagpal Singh Gill <paligill@gmail.

logging: switch phosphor-network-manager exe to lg2

Tested: Build passes with "ninja -C build".
Change-Id: Ib02682393aba65b16f55eece58ecf50321190a56
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...


# de333e14 10-Feb-2023 Patrick Williams <patrick@stwcx.xyz>

inventory_mac: fix inventory sync

The inventory mac syncing feature was not working correctly. Fixed a
few issues with it.

1. The code waited for signals for ethernet interfaces, but those

inventory_mac: fix inventory sync

The inventory mac syncing feature was not working correctly. Fixed a
few issues with it.

1. The code waited for signals for ethernet interfaces, but those
signals were likely already emitted. We need to also scan the
existing interfaces for potential inventory lookups.

2. The code to register for inventory signals was after the
inventory lookup. This leaves a race condition where inventory
could be emitted and missed. Register the signal match before
doing the inventory lookup and cancel the match if the lookup
was successful.

3. Some places were needlessly re-reading the configuration file.

4. Some places were saving a reference to an on-stack representation
of the configuration file into a callback (for signals). Move
this to a global variable to avoid segfaults.

Tested:

Booted up in QEMU without an inventory EEPROM. Observed expected
behavior from daemon. Issued a manual inventory Notify call to create
a fake MAC address. Observed signal was reacted to appropriately.
Restarted the service and observed that 'force-sync' occurs immediately.

(trimmed duplicate journal entries from various journalctl calls)

```
root@bletchley:~# journalctl -u xyz.openbmc_project.Network
Feb 10 13:46:10 bletchley systemd[1]: Starting Phosphor Network Manager...
Feb 10 13:46:12 bletchley phosphor-network-manager[537]: Force sync enabled, check VPD for MAC
Feb 10 13:46:12 bletchley phosphor-network-manager[537]: Registering the Inventory Signals Matcher
Feb 10 13:46:15 bletchley phosphor-network-manager[537]: No Object has implemented the interface
Feb 10 13:46:15 bletchley phosphor-network-manager[537]: The operation failed internally.
Feb 10 13:46:15 bletchley phosphor-network-manager[537]: Exception occurred during getting of MAC address from Inventory
Feb 10 13:46:15 bletchley systemd[1]: Started Phosphor Network Manager.
root@bletchley:~# busctl call xyz.openbmc_project.Inventory.Manager \
/xyz/openbmc_project/inventory \
xyz.openbmc_project.Inventory.Manager Notify \
a{oa{sa{sv}}} 1 \
/xyz/openbmc_project/inventory/system/chassis/bmc/ethernet \
1 xyz.openbmc_project.Inventory.Item.NetworkInterface \
1 MACAddress s "C01850F1D796"
root@bletchley:~# journalctl -u xyz.openbmc_project.Network
Feb 10 13:48:31 bletchley phosphor-network-manager[537]: Wrote networkd file: /etc/systemd/network/00-bmc-eth0.network
Feb 10 13:48:31 bletchley phosphor-network-manager[537]: Setting MAC on eth0
root@bletchley:~# [ 185.469811] ftgmac100 1e670000.ftgmac eth0: Link is Up - 1Gbps/Full - flow control off
[ 185.471607] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
ifconfig
eth0 Link encap:Ethernet HWaddr C0:18:50:F1:D7:96
inet addr:10.0.2.16 Bcast:10.0.2.255 Mask:255.255.255.0
root@bletchley:~# systemctl restart xyz.openbmc_project.Network
root@bletchley:~# journalctl -u xyz.openbmc_project.Network
Feb 10 13:48:34 bletchley phosphor-network-manager[537]: Reloaded systemd-networkd
Feb 10 13:55:24 bletchley phosphor-network-manager[537]: Got TERM, exiting
Feb 10 13:55:24 bletchley systemd[1]: Stopping Phosphor Network Manager...
Feb 10 13:55:24 bletchley systemd[1]: xyz.openbmc_project.Network.service: Deactivated successfully.
Feb 10 13:55:24 bletchley systemd[1]: Stopped Phosphor Network Manager.
Feb 10 13:55:24 bletchley systemd[1]: Starting Phosphor Network Manager...
Feb 10 13:55:25 bletchley phosphor-network-manager[11066]: Using DHCP options from /etc/systemd/network/00-bmc-eth0.network
Feb 10 13:55:25 bletchley phosphor-network-manager[11066]: Force sync enabled, check VPD for MAC
Feb 10 13:55:25 bletchley phosphor-network-manager[11066]: Registering the Inventory Signals Matcher
Feb 10 13:55:25 bletchley phosphor-network-manager[11066]: Setting MAC on eth0
Feb 10 13:55:25 bletchley phosphor-network-manager[11066]: Removing the match for ethernet interfaces
Feb 10 13:55:25 bletchley systemd[1]: Started Phosphor Network Manager.
```

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Icf18e3d80f6d1f8c4567603fe51d774e9090334c

show more ...


# 9ede1b74 21-Nov-2022 William A. Kennington III <wak@google.com>

treewide: Codify memory pinning

This enforces movability constraints.

Change-Id: I49dbd43a791c1d70eb7e97f30708231c053901d9
Signed-off-by: William A. Kennington III <wak@google.com>


# 9bc50f5e 04-Dec-2022 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: use shorter type aliases

The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are

sdbusplus: use shorter type aliases

The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are for:
* bus_t
* exception_t
* manager_t
* match_t
* message_t
* object_t
* slot_t

Change-Id: I2d41abae9cbf4878979966d5509f68e34dacdbba
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 0b111d4e 04-Oct-2022 William A. Kennington III <wak@google.com>

inventory_mac: Migrate code out of other places

Change-Id: I5a84c07eebad1b9b0dc535a47edbf6bf0f72b6cb
Signed-off-by: William A. Kennington III <wak@google.com>