History log of /openbmc/phosphor-networkd/src/ (Results 276 – 300 of 300)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
6ff633a909-Nov-2021 William A. Kennington III <wak@google.com>

network_manager: Add reload hooking

This changes no functionality currently, but it makes it possible to
defer actions until just before the systemd reload would occur.

Change-Id: I434b83fe5ad8b259

network_manager: Add reload hooking

This changes no functionality currently, but it makes it possible to
defer actions until just before the systemd reload would occur.

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

show more ...

ee2cba8a18-Nov-2021 sureshvijayv1 <suresh.vijayakumar@intel.com>

Check eth intf existence before creating VLAN

Request to create VLAN interface for non-existing interface causes
non-existing ethernet-interface object to be accessed which in turn
causes segmentati

Check eth intf existence before creating VLAN

Request to create VLAN interface for non-existing interface causes
non-existing ethernet-interface object to be accessed which in turn
causes segmentation fault.Check for requested ethernet root intf and
allow the creation of VLAN interface for ethernet objects.

Tested:
POSTMAN Request & Response
Request: https://xx.xx.xx.xx/redfish/v1/Managers/bmc/EthernetInterfaces/abcd/VLANs
Method: POST
Body Parameters: {"VLANId": 1, "VLANEnable": true }
Response:
"error": {
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The request failed due to an internal service error. The service is still operational.",
"MessageArgs": [],
"MessageId": "Base.1.8.1.InternalError",
"MessageSeverity": "Critical",
"Resolution": "Resubmit the request. If the problem persists, consider resetting the service."
}
],
"code": "Base.1.8.1.InternalError",
"message": "The request failed due to an internal service error. The service is still operational."
}

Signed-off-by: sureshvijayv1 <suresh.vijayakumar@intel.com>
Change-Id: I38e5cf64935e120a14b6b91c631e7e20b58789a1

show more ...

26c40a4303-Nov-2021 William A. Kennington III <wak@google.com>

network_manager: Ensure that systemd-networkd is ready

We have some instances where systemd-networkd takes longer than usual
to configure. Combined with a service that manipulates network settings,

network_manager: Ensure that systemd-networkd is ready

We have some instances where systemd-networkd takes longer than usual
to configure. Combined with a service that manipulates network settings,
this sometimes causes addresses and routes to be lost because
phosphor-networkd writes new configurations before the configs are even
loaded from the RWFS.

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

show more ...

4717d93b08-Oct-2021 William A. Kennington III <wak@google.com>

network_manager: Remove unused restart code

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

4209ceee23-Oct-2021 William A. Kennington III <wak@google.com>

ethernet_interface: Remove ip binary invocation

We can directly drop the interface without needing to execute another
binary using the same code as nicEnabled().

Change-Id: Ic889fd6464a898022d0d9c3

ethernet_interface: Remove ip binary invocation

We can directly drop the interface without needing to execute another
binary using the same code as nicEnabled().

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

show more ...

e056484923-Oct-2021 William A. Kennington III <wak@google.com>

routing_table: Deduplicate rebuilds

We don't need to rebuild the routing table for every single interface
and system configuration object. It now only rebuilds the table once
every refresh of the ob

routing_table: Deduplicate rebuilds

We don't need to rebuild the routing table for every single interface
and system configuration object. It now only rebuilds the table once
every refresh of the object tree.

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

show more ...

e0b8fd6a23-Oct-2021 William A. Kennington III <wak@google.com>

routing_table: Use common netlink parser

This reduces the LOC and redundant netlink parsing logic that is
untested.

It also happens to fix an issue with the current parsing breaking with
some of th

routing_table: Use common netlink parser

This reduces the LOC and redundant netlink parsing logic that is
untested.

It also happens to fix an issue with the current parsing breaking with
some of the routes returned by the kernel
```
[19259.086333] phosphor-network-manager[400]: Refreshing the objects.
[19259.094507] phosphor-network-manager[400]: Error validating header
[19259.095419] phosphor-network-manager[400]: The operation failed internally.
[19259.124862] phosphor-network-manager[400]: Error validating header
[19259.125593] phosphor-network-manager[400]: The operation failed internally.
[19259.143722] phosphor-network-manager[400]: Error validating header
[19259.144569] phosphor-network-manager[400]: The operation failed internally.
[19259.165901] phosphor-network-manager[400]: Error validating header
[19259.169497] phosphor-network-manager[400]: The operation failed internally.
[19259.204178] phosphor-network-manager[400]: Error validating header
[19259.204838] phosphor-network-manager[400]: The operation failed internally.
[19259.223547] phosphor-network-manager[400]: Error validating header
[19259.224302] phosphor-network-manager[400]: The operation failed internally.
[19259.604162] phosphor-network-manager[400]: Error validating header
[19259.605017] phosphor-network-manager[400]: The operation failed internally.
[19259.623701] phosphor-network-manager[400]: Refreshing complete.
```

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

show more ...

bd649af908-Oct-2021 William A. Kennington III <wak@google.com>

Convert all systemd-networkd service restarts to reloads

This removes all of the current invocations of managed service
restarting, and instead opts for targeted reloading of
configuration files.

I

Convert all systemd-networkd service restarts to reloads

This removes all of the current invocations of managed service
restarting, and instead opts for targeted reloading of
configuration files.

It also happens to fix some bugs around NIC enabled setting, as the
systemd-networkd service now has up to date runtime configurations at
the time that objects are refreshed.

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

show more ...

56ecc78a07-Oct-2021 William A. Kennington III <wak@google.com>

network_manager: Add support for non-disruptive reconfiguration

This makes it possible for network interfaces to non-disruptively reload
configurations and tell systemd-networkd to reconfigure inter

network_manager: Add support for non-disruptive reconfiguration

This makes it possible for network interfaces to non-disruptively reload
configurations and tell systemd-networkd to reconfigure interaces.

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

show more ...

a68ab4bb07-Oct-2021 William A. Kennington III <wak@google.com>

build: Add fmt subproject support

This makes it possible to build again without using the openbmc
container.

Change-Id: Ifa4c0ad2b1e070a0247480d4e0319e9a812046ab
Signed-off-by: William A. Kenningto

build: Add fmt subproject support

This makes it possible to build again without using the openbmc
container.

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

show more ...

5758db3f06-Oct-2021 Patrick Williams <patrick@stwcx.xyz>

catch exceptions as const

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

205cc10422-Sep-2021 sureshvijayv1 <suresh.vijayakumar@intel.com>

Fix for Network Manager Crash

RTNet Link Packet is received with a buffer size of 4096 bytes, the
pointer to the buffer is not moved back to the start address of buffer
when the pointer to the buffe

Fix for Network Manager Crash

RTNet Link Packet is received with a buffer size of 4096 bytes, the
pointer to the buffer is not moved back to the start address of buffer
when the pointer to the buffer is used to receive the next packet in
queue causing the pointer access of array out of bound. The fix for this
in this patch re-initializes the pointer to start address of buffer
before the next packet is received. No other checking is required to
validate the case of array out of bound as the NLMSG preprocessor
macros is taking care of checking the received and remaining length of
data in the packet and send for processing.

Tested:
Flashed the BMC image on available platforms in which the crash was
reported and regression of sending the Net Link Packet continuously.
No core file/crash was observed during the time of regression and
reboot cycle tests.

Signed-off-by: sureshvijayv1 <suresh.vijayakumar@intel.com>
Change-Id: Ibcfbb03dcce694d4116163be3db25f0597cda1eb

show more ...

2c0fc56803-Aug-2021 Tejas Patil <tejaspp@ami.com>

Add support for MTU property

This commit add support for the MTU property,
which shows the maximum size of the Protocol Data Uint (PDU) in bytes,
that can be passed in an Ethernet frame on the netwo

Add support for MTU property

This commit add support for the MTU property,
which shows the maximum size of the Protocol Data Uint (PDU) in bytes,
that can be passed in an Ethernet frame on the network interface.

We can Get or Set the MTU Size of any interface.
Also this property helps to populate MTUSize in Redfish.

The backend DBus interface code is committed to below location -
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces/+/45033

Tested:

Verified the property with dbus tool for Get, Set operations.

busctl introspect xyz.openbmc_project.Network /xyz/openbmc_project/network/eth3
NAME TYPE SIGNATURE RESULT/VALUE
xyz.openbmc_project.Network.EthernetInterface interface - -
.MTU property u 1500

dbus-send --system --print-reply --dest="xyz.openbmc_project.Network" "/xyz/openbmc_project/network/eth3" org.freedesktop.DBus.Properties.Get string:"xyz.openbmc_project.Network.EthernetInterface" string:"MTU"
method return time=1627365497.929314 sender=:1.39 -> destination=:1.46740 serial=3219493 reply_serial=2
variant uint32 1500

dbus-send --system --print-reply --dest="xyz.openbmc_project.Network" "/xyz/openbmc_project/network/eth3" org.freedesktop.DBus.Properties.Set string:"xyz.openbmc_project.Network.EthernetInterface" string:"MTU" variant:uint32:1480
method return time=1627365546.988526 sender=:1.39 -> destination=:1.46751 serial=3219999 reply_serial=2

dbus-send --system --print-reply --dest="xyz.openbmc_project.Network" "/xyz/openbmc_project/network/eth3" org.freedesktop.DBus.Properties.Get string:"xyz.openbmc_project.Network.EthernetInterface" string:"MTU"
method return time=1627365561.546701 sender=:1.39 -> destination=:1.46754 serial=3220200 reply_serial=2
variant uint32 1480

Signed-off-by: Tejas Patil <tejaspp@ami.com>
Change-Id: I1f501d89d0853467357751577e0c9a4d35f843cc

show more ...

b108fd7402-Sep-2021 Patrick Williams <patrick@stwcx.xyz>

exception: switch to public sdbus exception

SdBusError was intended to be a private error type inside sdbusplus.
Switch all catch locations to use the general sdbusplus::exception type.

Signed-off-

exception: switch to public sdbus exception

SdBusError was intended to be a private error type inside sdbusplus.
Switch all catch locations to use the general sdbusplus::exception type.

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

show more ...

167a4be802-Sep-2021 Patrick Williams <patrick@stwcx.xyz>

cleanup sdbus CAMELCASE define

The transition from 6aef769f1d2e8015b98cb3d8d6c20a81d60f1be0 is
complete so remove the old defines.

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

cleanup sdbus CAMELCASE define

The transition from 6aef769f1d2e8015b98cb3d8d6c20a81d60f1be0 is
complete so remove the old defines.

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

show more ...

cb2d408312-Aug-2021 Lei YU <yulei.sh@bytedance.com>

Do not config Gateway when DHCP is enabled

When DHCP is enabled and the Gateway is in the network config,
systemd-networkd will try to set the gateway anyway, and if the gateway
could not be set, it

Do not config Gateway when DHCP is enabled

When DHCP is enabled and the Gateway is in the network config,
systemd-networkd will try to set the gateway anyway, and if the gateway
could not be set, it fails with below error:

systemd-networkd[459]: eth0: Could not set route: No route to host
systemd-networkd[459]: eth0: Failed

The config should skip setting the gateway when the DHCP is enabled.

Tested: Verify the DHCP could be enabled from static config.

Fixes openbmc/phosphor-networkd#43

Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Change-Id: I6486284133003afbe5c657ef22c27d1994544f17

show more ...

252feec604-Aug-2021 Lei YU <yulei.sh@bytedance.com>

Remove the route settings from system config

The code was setting multiple [Route] from DBus settings and system
config settings.
This causes issue when there are multiple and different route settin

Remove the route settings from system config

The code was setting multiple [Route] from DBus settings and system
config settings.
This causes issue when there are multiple and different route settings.

Remove the config from system config and only respect the settings from
DBus, this makes sure only DBus settings are written to the network
config files.

This change requires the ipmid's update to set gateway to interface
config instead of system config:
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-host-ipmid/+/45806

Tested: Verify the BMC gets default gateway in the below case:
1. BMC gets DHCP IPv6 address and gateway;
2. The user sets the static IPv6 address and gateway.
Without this commit, the BMC will have no default gateway
because of two different gateways are in the network config.

Fixes openbmc/phosphor-networkd#40

Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Change-Id: Ice1f2c347f86181f534bc4ce426d4e427487477e

show more ...

3402757711-Aug-2021 Lei YU <yulei.sh@bytedance.com>

ethernet: Add origin to generateId()

Currently the code uses the ip address, prefix, and gateway to generate
the ID of the DBus object.
This results in the same DBus object path for the same IPs whi

ethernet: Add origin to generateId()

Currently the code uses the ip address, prefix, and gateway to generate
the ID of the DBus object.
This results in the same DBus object path for the same IPs while they
have different address origin.
E.g. if we have the DHCP address and assign the same static address, the
DBus object paths are the same and it gets
`org.freedesktop.DBus.Error.FileExists` exception while creating the new
object.

Add origin to generateId() so they generate the two different object
paths and the above issue could be fixed.

Tested: Verify in QEMU that setting static IP is OK from DHCP.

Fixes openbmc/phosphor-networkd#41

Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Change-Id: Iafe94cedff7e39490386be7777f3d975f1cf6b3f

show more ...

1ea3599426-Mar-2021 Alexander Filippov <a.filippov@yadro.com>

Apply settings after resetting.

During the reset method call the service overwrites all the config
files, but does not apply these changes.

This commit adds the force restart network after the conf

Apply settings after resetting.

During the reset method call the service overwrites all the config
files, but does not apply these changes.

This commit adds the force restart network after the config files were
overwritten.

Tested:
```
busctl call xyz.openbmc_project.Network /xyz/openbmc_project/network \
xyz.openbmc_project.Common.FactoryReset Reset
```
now leads to the `systemd-networkd.service` restarting and following
refreshing the objects inside the service.

Change-Id: Ifcc6c7194f2928ece766d87f63243fc3ab99c429
Signed-off-by: Alexander Filippov <a.filippov@yadro.com>

show more ...

26275a3f13-Jul-2021 William A. Kennington III <wak@google.com>

ethernet_interface: Detect nicEnabled from systemd-networkd

Our current method of interface detection can race with
systemd-networkd. If systemd-networkd takes too long to transition from
the initia

ethernet_interface: Detect nicEnabled from systemd-networkd

Our current method of interface detection can race with
systemd-networkd. If systemd-networkd takes too long to transition from
the initialized state to bringing up the link, phosphor-networkd will
see the link as administratively down and treat it as if it should be
Unmanaged. This is incorrect and causes us to lose BMC network
information about 1% of boots with our current configuration. This has
the consequence of being persistent across powercycles and even across
firmware updates. Without using some method of intervention, this
prevents automated tooling from configuring the management interface.

systemd-networkd can actually inform us to the state of network
interfaces via DBus. We can monitor the AdministrativeState property to
determine whether or not our NIC should be enabled. We now wait until
systemd-networkd has progressed far enough to detect it.

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

show more ...

fa1f5c0317-Sep-2020 Eddie James <eajames@linux.ibm.com>

Add support for sending NCSI command

Provide a means to send an OEM command to an NIC via NCSI netlink.
This may be invoked from a systemd Unit file to configure NIC
behavior.

Some NICs provide OEM

Add support for sending NCSI command

Provide a means to send an OEM command to an NIC via NCSI netlink.
This may be invoked from a systemd Unit file to configure NIC
behavior.

Some NICs provide OEM commands to influence their behavior, for
example maintaining full speed even when the host is down instead
of negotiating a lower speed for power.

Signed-off-by: Eddie James <eajames@linux.ibm.com>
Change-Id: Id920b618422e8fbfc51984fbf932045bfb5e56e6

show more ...

e9d095da07-Jul-2021 Johnathan Mantey <johnathanx.mantey@intel.com>

Manage configuration parser file state using RAII

Static code analysis tools flagged the file state handling as a
potential source of resource loss. Change the code to use RAII to
control the file s

Manage configuration parser file state using RAII

Static code analysis tools flagged the file state handling as a
potential source of resource loss. Change the code to use RAII to
control the file state automatically. This eliminates the need for
manual intervention, and errors that may arise from manual filehandle
management.

Tested:
Placed debug print statements to confirm the stream is still opened,
and the contents parsed. Removed the print statements following
confirmation.

Change-Id: I6f20117b948673a4babc4b702da741145e57a1c6
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>

show more ...

d49c5c6523-Jun-2021 Johnathan Mantey <johnathanx.mantey@intel.com>

Eliminate potential null pointer references

Static analysis tools flagged a few lines of code that could result in
null pointer references. This commit adds guards against dereferencing
the null poi

Eliminate potential null pointer references

Static analysis tools flagged a few lines of code that could result in
null pointer references. This commit adds guards against dereferencing
the null pointer. It also logs an error, and attempts to return to the
caller gracefully.

Tested:
Installed code changes into system under test, and searched the
journal for the error messages. The new error messages were not found,
indicating there were no null pointer references under normal
conditions.

Change-Id: Id328d71ac0456024c3ecb9878f716b98c27c7c45
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>

show more ...

37cf66c817-May-2021 William A. Kennington III <wak@google.com>

build: Full subproject support

This changes makes it possible to build phosphor-networkd outside of the
openbmc CI environment with only minimal dependencies available in most
linux distributions.

build: Full subproject support

This changes makes it possible to build phosphor-networkd outside of the
openbmc CI environment with only minimal dependencies available in most
linux distributions.

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

show more ...

1bbe3d1e14-May-2021 William A. Kennington III <wak@google.com>

build: Split c++ sources into a subdirectory

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


/openbmc/phosphor-networkd/.clang-format
/openbmc/phosphor-networkd/.gitignore
/openbmc/phosphor-networkd/.shellcheck
/openbmc/phosphor-networkd/LICENSE
/openbmc/phosphor-networkd/MAINTAINERS
/openbmc/phosphor-networkd/README.md
/openbmc/phosphor-networkd/docs/Network-Configuration.md
/openbmc/phosphor-networkd/gen/meson.build
/openbmc/phosphor-networkd/gen/regenerate-meson
/openbmc/phosphor-networkd/gen/run-ci
/openbmc/phosphor-networkd/gen/xyz/meson.build
/openbmc/phosphor-networkd/gen/xyz/openbmc_project/Network/IP/Create/meson.build
/openbmc/phosphor-networkd/gen/xyz/openbmc_project/Network/IP/meson.build
/openbmc/phosphor-networkd/gen/xyz/openbmc_project/Network/Neighbor/CreateStatic/meson.build
/openbmc/phosphor-networkd/gen/xyz/openbmc_project/Network/Neighbor/meson.build
/openbmc/phosphor-networkd/gen/xyz/openbmc_project/Network/VLAN/Create/meson.build
/openbmc/phosphor-networkd/gen/xyz/openbmc_project/Network/VLAN/meson.build
/openbmc/phosphor-networkd/gen/xyz/openbmc_project/Network/meson.build
/openbmc/phosphor-networkd/gen/xyz/openbmc_project/meson.build
/openbmc/phosphor-networkd/meson.build
/openbmc/phosphor-networkd/meson_options.txt
argument.cpp
argument.hpp
config_parser.cpp
config_parser.hpp
dhcp_configuration.cpp
dhcp_configuration.hpp
dns_updater.cpp
dns_updater.hpp
ethernet_interface.cpp
ethernet_interface.hpp
ipaddress.cpp
ipaddress.hpp
meson.build
ncsi_netlink_main.cpp
ncsi_util.cpp
ncsi_util.hpp
neighbor.cpp
neighbor.hpp
netlink.cpp
netlink.hpp
network_config.cpp
network_config.hpp
network_manager.cpp
network_manager.hpp
network_manager_main.cpp
routing_table.cpp
routing_table.hpp
rtnetlink_server.cpp
rtnetlink_server.hpp
system_configuration.cpp
system_configuration.hpp
types.hpp
util.cpp
util.hpp
vlan_interface.cpp
vlan_interface.hpp
watch.cpp
watch.hpp
/openbmc/phosphor-networkd/subprojects/googletest.wrap
/openbmc/phosphor-networkd/subprojects/sdbusplus.wrap
/openbmc/phosphor-networkd/subprojects/sdeventplus.wrap
/openbmc/phosphor-networkd/subprojects/stdplus.wrap
/openbmc/phosphor-networkd/test/global_network_objects.cpp
/openbmc/phosphor-networkd/test/meson.build
/openbmc/phosphor-networkd/test/mock_ethernet_interface.hpp
/openbmc/phosphor-networkd/test/mock_network_manager.hpp
/openbmc/phosphor-networkd/test/mock_syscall.cpp
/openbmc/phosphor-networkd/test/mock_syscall.hpp
/openbmc/phosphor-networkd/test/test_config_parser.cpp
/openbmc/phosphor-networkd/test/test_ethernet_interface.cpp
/openbmc/phosphor-networkd/test/test_neighbor.cpp
/openbmc/phosphor-networkd/test/test_netlink.cpp
/openbmc/phosphor-networkd/test/test_network_manager.cpp
/openbmc/phosphor-networkd/test/test_rtnetlink.cpp
/openbmc/phosphor-networkd/test/test_util.cpp
/openbmc/phosphor-networkd/test/test_vlan_interface.cpp
/openbmc/phosphor-networkd/xyz.openbmc_project.Network.conf.in
/openbmc/phosphor-networkd/xyz.openbmc_project.Network.service.in
/openbmc/phosphor-networkd/xyz/openbmc_project/Network/IP/Create.interface.yaml
/openbmc/phosphor-networkd/xyz/openbmc_project/Network/Neighbor/CreateStatic.interface.yaml
/openbmc/phosphor-networkd/xyz/openbmc_project/Network/VLAN/Create.interface.yaml

1...<<1112