5a456061 | 15-Feb-2024 |
Johnathan Mantey <johnathanx.mantey@intel.com> |
Add Set Package and Channel Mask to ncsi-netlink utility
The NCSI driver has added two commands for setting the Package Mask and the Channel Mask within a package. The ncsi-netlink utility does not
Add Set Package and Channel Mask to ncsi-netlink utility
The NCSI driver has added two commands for setting the Package Mask and the Channel Mask within a package. The ncsi-netlink utility does not support these new commands.
Add the ability to set the package and the channel mask values.
Tested: Instrumented the NCSI kernel driver to print mask values. Issued 'ncsi-netlink -x 3 -j 0x3' and saw the NCSI driver print the new package mask. Issued 'ncsi-netlink -x 3 -p 0 -k 0x3' and saw the NCSI driver print the new channel mask.
Change-Id: Icd2188e789de43f631fe26d9e751d564ba5f822f Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
show more ...
|
3865db2a | 27-Sep-2023 |
Johnathan Mantey <johnathanx.mantey@intel.com> |
Replace originIsManuallyAssigned with inline test
The originIsManuallyAssigned function does not need to be present.
When automatic link local addresses are active, the conditional compilation made
Replace originIsManuallyAssigned with inline test
The originIsManuallyAssigned function does not need to be present.
When automatic link local addresses are active, the conditional compilation made sure to only test for addresses of 'static' origin.
When manual link local addresses are active, by definition the address assignment is done using a IPSRC == static action. It is not possible to use IPMI or Redfish to assert a "link local" flag. Thus all link local addresses are merely statically assigned addresses. The systemd-network stack asserts the link local scope based on the IP address assigned.
Tested: Enabled LINK_LOCAL_AUTOCONFIGURATION and used DHCP and static address assignments. When DHCPv4 is turned off, a link local address is assigned to the link. With DHCPv4 turned on, the link local address is disabled.
Explicitly adding a static address inside the 169.254 address space causes systemd to report the address scope to be link local.
Restoring DHCPv4 disables all link local addresses per IETF RFCs.
Manually disabled LINK_LOCAL_AUTOCONFIGURATION, as phosphor-network does provide dynamic control. Disabled DHCPv4 and confirmed there are no link local or DHCPv4 addresses. Assigned a 169.254.x.x address w/o DHCPv4 or LinkLocalAddressing. Confirmed a "scope link" address was reported via 'ip addr'.
Change-Id: I4d7e55dc3014b5b0acdd12bd8ac85ea650c13b9c Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
show more ...
|
8e3c1fbd | 12-Mar-2024 |
Johnathan Mantey <johnathanx.mantey@intel.com> |
Use ActivationPolicy to enable/disable network interfaces
The systemd.network "Unmanaged" control, used to cause a network interface to prevent a NIC from being configured by systemd is too aggressi
Use ActivationPolicy to enable/disable network interfaces
The systemd.network "Unmanaged" control, used to cause a network interface to prevent a NIC from being configured by systemd is too aggressive. The goal is to control the IFF_UP/IFF_DOWN state of the NIC.
The systemd-networkd developers, as part of discussions around "Unmanaged", created an alternate control to perform the required action. The control is called ActivationPolicy.
Switch from using Unmanaged to ActivationPolicy in order to manage IFF_UP/IFF_DOWN conditions.
Tested: The systemd-network.service initial state has no ActivationPolicy entry. The default state is for ActivationPolicy to be enabled.
Issued a Redfish request: PATCH :url/redfish/v1/Managers/bmc/EthernetInterfaces/eth1 { "InterfaceEnabled": false } to assign "ActivationPolicy=down", and causing the link to stay down until another request re-enables it. Confirmed the NIC is IFF_DOWN, and the systemd.network configuration file contains ActivationPolicy=down.
Sending another request to set InterfaceEanbled: "true" causes the entry to be removed from the systemd.network file, and the NIC enters the IFF_UP state.
Change-Id: I8b5bb4d30a1c7282494526169f65e0eda26e04cf Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
show more ...
|
871f163e | 21-Aug-2024 |
Patrick Williams <patrick@stwcx.xyz> |
ibm: hypervisor-network-mgr: adjust includes and fwd declarations
clang-18 with C++23 complains as follows:
``` /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_ptr.h:
ibm: hypervisor-network-mgr: adjust includes and fwd declarations
clang-18 with C++23 complains as follows:
``` /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_ptr.h:97:16: error: invalid application of 'sizeof' to an incomplete type 'phosphor::network::HypSysConfig' 97 | static_assert(sizeof(_Tp)>0, ... ../src/ibm/hypervisor-network-mgr-src/hyp_network_manager.hpp:159:32: note: in instantiation of member function 'std::unique_ptr<phosphor::network::HypSysConfig>::~unique_ptr' requested here 159 | SystemConfPtr systemConf = nullptr; ```
Get rid of the forward declaration and adjust some of the include directives to satisfy clang.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Id2ebe1f5f7fce4962c0e3ffdf04bcaa476772e9a
show more ...
|
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 ...
|
1ebea28c | 15-Feb-2024 |
Johnathan Mantey <johnathanx.mantey@intel.com> |
Make Send Command feature more flexible
The sendOemCommand command, used to send NCSI_CMD_SEND_CMD payloads, is hardcoded to only send one command.
Update the sendOemCommand function to allow the s
Make Send Command feature more flexible
The sendOemCommand command, used to send NCSI_CMD_SEND_CMD payloads, is hardcoded to only send one command.
Update the sendOemCommand function to allow the sub-operation to be passed as a command line argument. This is done by prepending the sub-operation byte to the front of the Send Cmd payload.
Doing this allows sub-operations without any payload bytes to be called. For example "-o 0a", where the sub-operation for Send Cmd is the 0x0a value.
Tested: Sent 'ncsi-netlink -x 3 -p 0 -c 0 -o 50000001572100' and confirmed the 0x50 byte worked the same way as the original hard-coded value. Sent 'ncsi-netlink -x 3 -p 0 -c 0 -o 0a' and confirmed the 0x0a sub-operation functioned on the submitters SUT.
Change-Id: I20f093fd8296f549fce03dc5729b8e5fedcab313 Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
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 ...
|
91f60564 | 17-Apr-2024 |
Ravi Teja <raviteja28031990@gmail.com> |
IPv4/IPv6 Gateway: Configure GatewayOnLink
Currently when both interfaces configured static ip addresses and one of that static ip address is in private network then while reload network configurati
IPv4/IPv6 Gateway: Configure GatewayOnLink
Currently when both interfaces configured static ip addresses and one of that static ip address is in private network then while reload network configuration further, route order keep changes and interface with private network is not reachable when other gateway route is on the top of routing table.
This commit configures IPv4/IPv6 static gateway using systemd-networkd's Route option and sets GatewayOnLink option and make sure interfaces network reachable irrespective of route order while reloading networkd.
Tested By: configure one interface in static and other interface DHCP. configure both interfaces with static IP and one interface on private network.
Sample IPv4 network route added in systemd-networkd configuration file [Route] GatewayOnLink=true Gateway=9.10.x.1
Change-Id: Id7c9ba74cf7e71e6105536c5affc905754cae908 Signed-off-by: Ravi Teja <raviteja28031990@gmail.com>
show more ...
|
c3c6b4c3 | 18-Apr-2024 |
William A. Kennington III <wak@google.com> |
dhcp_configuration: Use the correct file for DHCP settings
Now that we are writing settings per interface, we should only look at settings for that interface itself, not the latest file in the netwo
dhcp_configuration: Use the correct file for DHCP settings
Now that we are writing settings per interface, we should only look at settings for that interface itself, not the latest file in the network directory.
Change-Id: I51910a28cac7fa8b876d4c2c28617023f24ed61a Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
945878a4 | 17-Apr-2024 |
William A. Kennington III <wak@google.com> |
ethernet_interface: Write an update marker to tmpfs
Currently, many BMC systems use JFFS2 as a filesystem for their RWFS. JFFS2 doesn't support sub-second timestamps, and we sometimes have instances
ethernet_interface: Write an update marker to tmpfs
Currently, many BMC systems use JFFS2 as a filesystem for their RWFS. JFFS2 doesn't support sub-second timestamps, and we sometimes have instances of configuration writes happening within the same second around a networkd reload. The second write is then ignored upon the next networkd reload as the timestamp of the file hasn't changed!
Therefore, we leverage tmpfs which has higher precision timestamps as a mechanism to guarantee networkd sees our updates without making extra changes to networkd or writes to the RWFS.
Tested: Verified that during a gateway set operation (or any other property write) the updated file is set with microsecond granularity. Also verified that subsequent updates change the timestamp and it's set right before networkd reloads for MAC updates.
Change-Id: Ibfd0463166223d0e4a6f7205d780f4de8590a0c1 Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
fad525c0 | 17-Apr-2024 |
William A. Kennington III <wak@google.com> |
ethernet_interface: Emit DHCP objects after parent
We don't want the DHCP objects to get emitted onto the bus if the parent hasn't been submitted yet, change the ordering to make more sense.
Change
ethernet_interface: Emit DHCP objects after parent
We don't want the DHCP objects to get emitted onto the bus if the parent hasn't been submitted yet, change the ordering to make more sense.
Change-Id: Ib97b2a82586a41eb5bc2cfe421864b2cb729c0e2 Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
44937b1a | 17-Apr-2024 |
William A. Kennington III <wak@google.com> |
dhcp_configuration: SendHostname is valid for v4 and v6
We should present this option for both DHCP types as systemd supports it for both. It would be surprising to an end user if DHCPv6 just ate th
dhcp_configuration: SendHostname is valid for v4 and v6
We should present this option for both DHCP types as systemd supports it for both. It would be surprising to an end user if DHCPv6 just ate this option without passing it along.
Change-Id: I7ae046c0a92ab199e2026ffe3dfb78b8763223a0 Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
f179e70c | 17-Apr-2024 |
William A. Kennington III <wak@google.com> |
ethernet_interface: Simplify DHCPConfiguration enumeration
We don't have more than 2 types of DHCP objects, don't use an arbitrary vector and depend on enum values for indices.
Change-Id: I5c519e8b
ethernet_interface: Simplify DHCPConfiguration enumeration
We don't have more than 2 types of DHCP objects, don't use an arbitrary vector and depend on enum values for indices.
Change-Id: I5c519e8b95b273a4684e553f18027f038d025f17 Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
86d25bb7 | 24-Mar-2024 |
Ravi Teja <raviteja28031990@gmail.com> |
Remove unused BUFSIZE variable
Change-Id: I84f186a83a7c800048f68350a55d5bad5b032970 Signed-off-by: Ravi Teja <raviteja28031990@gmail.com> |
b6595b29 | 23-Feb-2024 |
Ravi Teja <raviteja28031990@gmail.com> |
DHCP Config: Add DomainEnabled D-bus property
This commit implements DomainEnabled D-bus property for DHCP configuration. When DomainEnabled is set to true then the domain names received from the DH
DHCP Config: Add DomainEnabled D-bus property
This commit implements DomainEnabled D-bus property for DHCP configuration. When DomainEnabled is set to true then the domain names received from the DHCP server
Tested by: Set DomainEnabled D-bus property to true or false Check domain name configured on BMC
Change-Id: Ia3db5f5054d4c758be336851175b05ddc05d2eda Signed-off-by: Ravi Teja <raviteja28031990@gmail.com>
show more ...
|
57dfea94 | 05-May-2023 |
Jishnu CM <jishnunambiarcm@duck.com> |
Configure DHCP4 and DHCP6 parameters independently
At present, DHCP parameters like DNSEnabled, NTPEnabled etc. are shared between DHCPv4 and DHCPv6 in the network configuration.
Hence any update o
Configure DHCP4 and DHCP6 parameters independently
At present, DHCP parameters like DNSEnabled, NTPEnabled etc. are shared between DHCPv4 and DHCPv6 in the network configuration.
Hence any update on the ipv4 parameters impacts the ipv6 and get applied to both the interfaces.
This change is to enable the possibility to configure DHCP attributes independently, by having different dbus objects for dhcp4 and dhcp6 and moving the dhcp configuration from network level to ethernet interface.
tested by:
Used the busctl command to set and get the parameter values individually for both DHCPv4 and DHCPv6. Verified the network configuration file is updated accordingly
Tree Structure: busctl tree xyz.openbmc_project.Network `-/xyz `-/xyz/openbmc_project `-/xyz/openbmc_project/network |-/xyz/openbmc_project/network/config |-/xyz/openbmc_project/network/eth0 | |-/xyz/openbmc_project/network/eth0/dhcp4 | `-/xyz/openbmc_project/network/eth0/dhcp6 `-/xyz/openbmc_project/network/eth1 |-/xyz/openbmc_project/network/eth1/dhcp4 `-/xyz/openbmc_project/network/eth1/dhcp6
Change-Id: If7dbbf596bdaf866ea459d631e716153f54302ec Signed-off-by: Jishnu CM <jishnunambiarcm@duck.com>
show more ...
|
581cb0b3 | 21-Mar-2023 |
nitinkotania <gitnkotania@gmail.com> |
Avoid writing duplicate DNS entries to config file
Currently, we store the dbus DNS values in a vector without checking duplicate entries. which allows duplicate entries to be saved if the user supp
Avoid writing duplicate DNS entries to config file
Currently, we store the dbus DNS values in a vector without checking duplicate entries. which allows duplicate entries to be saved if the user supplies same DNS server settings multiple times.
With this commit, we will check duplicate entries and remove them to get a unique list of DNS values.
Tested By: PATCH -d '{"StaticNameServers":["10.4.5.60", "10.4.5.60"]}' https://${bmc_ip}/redfish/v1/Managers/bmc/EthernetInterfaces/eth0
Change-Id: I0c18eb5fec36c4305f1ded4c5e57bbd046ca4576 Signed-off-by: nitinkotania <gitnkotania@gmail.com>
show more ...
|
46dda597 | 12-Jan-2024 |
Ravi Teja <raviteja28031990@gmail.com> |
Handle InvalidArgument error for hostname
Systemd throws InvalidArgument error for hostname with special characters.
This commit handles InvalidArgument error.
Tested By: verified by passing hostn
Handle InvalidArgument error for hostname
Systemd throws InvalidArgument error for hostname with special characters.
This commit handles InvalidArgument error.
Tested By: verified by passing hostname with special char
Change-Id: I732ce9705044d45a25c05f0164bfa5e47e03f025 Signed-off-by: Ravi Teja <raviteja28031990@gmail.com>
show more ...
|
1f0052f8 | 07-Dec-2023 |
Patrick Williams <patrick@stwcx.xyz> |
meson: adjust nlohmann-json dependency
Simplify the meson dependency logic and reuse the subproject wrap from other repositories for consistency.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
meson: adjust nlohmann-json dependency
Simplify the meson dependency logic and reuse the subproject wrap from other repositories for consistency.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I74646501b1e10c01cb2af47c294fcf5a8a89e7c3
show more ...
|
6f256bc5 | 20-Oct-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-17 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-17 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: Ief40c08041429a57684a6debd84eecea2a298dff Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
af38fe9d | 12-Oct-2023 |
Yuxiao Zhang <yuxiaozhang@google.com> |
phosphor-networkd: write down the config when GW changes
We saw issues when gateway is set in phosphor networkd but not in the systemd config files. This will ensure that systemd is in sync with pho
phosphor-networkd: write down the config when GW changes
We saw issues when gateway is set in phosphor networkd but not in the systemd config files. This will ensure that systemd is in sync with phosphor networkd when gateway changes.
Change-Id: Iff2ddd8cd4ee7eb5935adb59dcb9ab7a4b170795 Signed-off-by: Yuxiao Zhang <yuxiaozhang@google.com>
show more ...
|
40f9b3d8 | 06-Oct-2023 |
Ravi Teja <raviteja28031990@gmail.com> |
Remove unrelevant comments
This commit removes unrelevant comments which are nolonger needed This issue is no longer applies for latest networkd code. https://github.com/openbmc/openbmc/issues/1751
Remove unrelevant comments
This commit removes unrelevant comments which are nolonger needed This issue is no longer applies for latest networkd code. https://github.com/openbmc/openbmc/issues/1751
Change-Id: I1ad6952478cce0a1dbbad89577073ccdeb1e6739 Signed-off-by: Ravi Teja <raviteja28031990@gmail.com>
show more ...
|
08d34312 | 04-Oct-2023 |
Ravi Teja <raviteja28031990@gmail.com> |
Hypervisor Network: Remove unused log header file
This commit removes unused log header file
Change-Id: I717e80929e58b1e45426677aef91d59b76b8a815 Signed-off-by: Ravi Teja <raviteja28031990@gmail.co
Hypervisor Network: Remove unused log header file
This commit removes unused log header file
Change-Id: I717e80929e58b1e45426677aef91d59b76b8a815 Signed-off-by: Ravi Teja <raviteja28031990@gmail.com>
show more ...
|
c53f2ed9 | 28-Sep-2023 |
William A. Kennington III <wak@google.com> |
system_queries: Log NIC up / down actions
This will help when debugging reconfiguration issues.
Change-Id: I3d5d9fe054b8afce47ea4fec4d4cb0ff3271f353 Signed-off-by: William A. Kennington III <wak@go
system_queries: Log NIC up / down actions
This will help when debugging reconfiguration issues.
Change-Id: I3d5d9fe054b8afce47ea4fec4d4cb0ff3271f353 Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
4693807c | 26-Sep-2023 |
Yuxiao Zhang <yuxiaozhang@google.com> |
Fix race condition for mac setting
We have observed that if systemd-networkd reload is invoked by some other process after a mac config kick off but before the real phosphor-networkd reload, the int
Fix race condition for mac setting
We have observed that if systemd-networkd reload is invoked by some other process after a mac config kick off but before the real phosphor-networkd reload, the interface will be down and never be brought back up. This CL ensures that the reload happens by touching the config file.
Change-Id: I094b4dd71b37bb3b61837ee49a3b6d244cc8fe86 Signed-off-by: Yuxiao Zhang <yuxiaozhang@google.com>
show more ...
|