History log of /openbmc/phosphor-networkd/src/ (Results 1 – 25 of 318)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
434dd67a26-Nov-2025 Rashid MP <rashidmp@ami.com>

Fix VLAN info not added to interfacesByIdx map

VLAN interfaces were initially created with a temporary index, which
only updated the `interfaces` map and not `interfacesByIdx`. This change
updates `

Fix VLAN info not added to interfacesByIdx map

VLAN interfaces were initially created with a temporary index, which
only updated the `interfaces` map and not `interfacesByIdx`. This change
updates `interfacesByIdx` once `createInterface` is triggered after VLAN
creation.

Tested:
1. Enabled VLAN.
2. Verified VLAN IP by launching WebUI with VLAN IP.
3. Checked VLAN D-Bus objects are created.
4. Disabled VLAN.
5. Checked VLAN D-Bus objects are deleted.

Change-Id: I077adc400ff1248c9c7dda726206f9c54d8fb361
Signed-off-by: Rashid MP <rashidmp@ami.com>

show more ...

6c4859ed16-Nov-2025 Adi Fogel <afogel@nvidia.com>

Adding verbose option to ncsi-cmd

Add a -v/--verbose flag to ncsi-cmd that prints
the NC-SI response data directly to stdout in
addition to debug logging.
The logger remains unchanged and continues

Adding verbose option to ncsi-cmd

Add a -v/--verbose flag to ncsi-cmd that prints
the NC-SI response data directly to stdout in
addition to debug logging.
The logger remains unchanged and continues to
record all responses in the journal log.

Test:
'''
root@dpu-bmc:~# timeout 5 ncsi-cmd -v -m 100 -p 3 raw 0
Response 24 bytes: 00 01 00 f8 80 7f 00 04 00 00 00 00 00 00 00 00 00 01 00 02 ff ff 7e 81
'''
Change-Id: If9f6541e351b3ef42ce24d869cd91a675a6fd9da
Signed-off-by: Adi Fogel <afogel@nvidia.com>

show more ...

4a27fdc517-Nov-2025 Rashid MP <rashidmp@ami.com>

Fix cppcheck warnings

This patch fixes the following cppcheck issues:

git/src/argument.cpp:52:35:
Parameter 'argv' can be const. [constParameter]

git/src/ncsi_util.hpp:104,105,158,159:
Missing

Fix cppcheck warnings

This patch fixes the following cppcheck issues:

git/src/argument.cpp:52:35:
Parameter 'argv' can be const. [constParameter]

git/src/ncsi_util.hpp:104,105,158,159:
Missing 'override' on virtuals. [missingOverride]

git/src/ncsi_util.cpp:387:33:
C-style cast used. [cstyleCast]

git/src/ncsi_util.cpp:654:26:
'respPayload' not assigned. [unassignedVariable]

static_gateway.cpp:17:60:
Param 'addr' should be const ref. [passedByValue]

Change-Id: Icb96e9fb891512924febef48b09aaf291a50add1
Signed-off-by: Rashid MP <rashidmp@ami.com>

show more ...

137d944104-Nov-2025 Patrick Williams <patrick@stwcx.xyz>

use sdbusplus unpack syntax

Rather than defining a variable and then reading it from a message,
sdbusplus also supports directly unpack-ing from the message. Use
this syntax instead as it is more e

use sdbusplus unpack syntax

Rather than defining a variable and then reading it from a message,
sdbusplus also supports directly unpack-ing from the message. Use
this syntax instead as it is more efficient and succinct.

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

show more ...

3c4f35eb04-Nov-2025 Patrick Williams <patrick@stwcx.xyz>

remove is_method_error call

An `is_method_error` is not appropriate after an sdbus `call` since
`call` will always throw an exception. Remove the pointless call
and instead catch the exception.

Si

remove is_method_error call

An `is_method_error` is not appropriate after an sdbus `call` since
`call` will always throw an exception. Remove the pointless call
and instead catch the exception.

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

show more ...

64dd8c9e29-Oct-2025 Hariharan Rangasamy <hariharanr@ami.com>

Fix cppcheck errors

Error message:

src/ncsi_util.cpp:224:36: error: Uninitialized struct member:
chan.version_major [uninitStructMember]
pkg.channels.push_back(chan);

Fix cppcheck errors

Error message:

src/ncsi_util.cpp:224:36: error: Uninitialized struct member:
chan.version_major [uninitStructMember]
pkg.channels.push_back(chan);
^
src/ncsi_util.cpp:224:36: error: Uninitialized struct member:
chan.version_minor [uninitStructMember]
pkg.channels.push_back(chan);
^
src/ncsi_util.cpp:224:36: error: Uninitialized struct member:
chan.link_state [uninitStructMember]
pkg.channels.push_back(chan);

Change-Id: I8364084e6a8e79d5fea9b788297ac0f1c5069c11
Signed-off-by: Hariharan Rangasamy <hariharanr@ami.com>

show more ...

306542d030-Oct-2025 Alexander Hansen <alexander.hansen@9elements.com>

Copyright: Move to SPDX-License-Identifier

Original copyright holders have been preserved, this patch moves the
copyright notice to the compact SPDX notation.

Change-Id: I77f6405c57e376852a778b708e

Copyright: Move to SPDX-License-Identifier

Original copyright holders have been preserved, this patch moves the
copyright notice to the compact SPDX notation.

Change-Id: I77f6405c57e376852a778b708e9ecdec076f2cdd
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...

ef08036205-Jun-2025 Anderson Kuo <Anderson.Kuo@quantatw.com>

Refactor inventory path matching for precise MAC retrieval

Refactored inventory path matching to perform exact string comparison
on the final path segment, ensuring the MAC is retrieved from the
cor

Refactor inventory path matching for precise MAC retrieval

Refactored inventory path matching to perform exact string comparison
on the final path segment, ensuring the MAC is retrieved from the
correct inventory path. Previously, partial prefix matching caused
retrieval of the MAC from incorrect paths, for example, intending to
retrieve Minerva_CMM but retrieving Minerva_CMM_SCM instead. This
change matches the string after the last '/' to select only the
intended inventory path.

Tested:
* Configured inventory paths with
xyz.openbmc_project.Inventory.Item.NetworkInterface and MACAddress
properties:
- /xyz/openbmc_project/inventory/system/board/Minerva_CMM_SCM
- /xyz/openbmc_project/inventory/system/board/Minerva_CMM_BSM
- /xyz/openbmc_project/inventory/system/board/Minerva_CMM

* Logs:
'''
Before:
Case 1: Inventory MAC existed before phosphor-network started
root@bmc:~# journalctl -u xyz.openbmc_project.Network
bmc systemd[1]: Starting Phosphor Network Manager...
bmc phosphor-network-manager[537]: Check VPD for MAC: Force sync enabled
bmc phosphor-network-manager[537]: Registering the Inventory Signals Matcher
bmc phosphor-network-manager[537]: Get info on interface Minerva_CMM, object /xyz/openbmc_project/inventory/system/board/Minerva_CMM_SCM
bmc phosphor-network-manager[537]: Mac Address 74:d4:dd:f4:39:8c in Inventory on Interface eth0
bmc phosphor-network-manager[537]: Wrote networkd file: /etc/systemd/network/00-bmc-eth0.network
bmc phosphor-network-manager[537]: Setting MAC 74:d4:dd:f4:39:8c on interface eth0
bmc phosphor-network-manager[537]: Removing the match for ethernet interfaces
bmc phosphor-network-manager[537]: Setting NIC down on eth0
bmc systemd[1]: Started Phosphor Network Manager.
bmc phosphor-network-manager[537]: Reloaded systemd-networkd

Case 2: Inventory MAC didn't exist before phosphor-network started
root@bmc:~# journalctl -u xyz.openbmc_project.Network
bmc systemd[1]: Starting Phosphor Network Manager...
bmc phosphor-network-manager[428]: Check VPD for MAC: Force sync enabled
bmc phosphor-network-manager[428]: Registering the Inventory Signals Matcher
bmc phosphor-network-manager[428]: No Object has implemented the interface xyz.openbmc_project.Inventory.Item.NetworkInterface
bmc phosphor-network-manager[428]: The operation failed internally.
bmc phosphor-network-manager[428]: Exception occurred during getting of MAC address from Inventory
bmc systemd[1]: Started Phosphor Network Manager.
bmc phosphor-network-manager[428]: Setting MAC 74D4DDF4398C on interface eth0
bmc phosphor-network-manager[428]: Wrote networkd file: /etc/systemd/network/00-bmc-eth0.network
bmc phosphor-network-manager[428]: Setting MAC 74D4DDF4398D on interface eth0
bmc phosphor-network-manager[428]: Wrote networkd file: /etc/systemd/network/00-bmc-eth0.network
bmc phosphor-network-manager[428]: Setting MAC 74D4DDF4398E on interface eth0
bmc phosphor-network-manager[428]: Setting NIC down on eth0
bmc phosphor-network-manager[428]: Setting NIC down on eth0
bmc phosphor-network-manager[428]: Reloaded systemd-networkd

After:
Case 1: Inventory MAC existed before phosphor-network started
root@bmc:~# journalctl -u xyz.openbmc_project.Network
bmc systemd[1]: Starting Phosphor Network Manager...
bmc phosphor-network-manager[447]: Check VPD for MAC: Force sync enabled
bmc phosphor-network-manager[447]: Registering the Inventory Signals Matcher
bmc phosphor-network-manager[447]: No Object has implemented the interface xyz.openbmc_project.Inventory.Item.NetworkInterface
bmc phosphor-network-manager[447]: The operation failed internally.
bmc phosphor-network-manager[447]: Exception occurred during getting of MAC address from Inventory
bmc systemd[1]: Started Phosphor Network Manager.
bmc phosphor-network-manager[447]: Wrote networkd file: /etc/systemd/network/00-bmc-eth0.network
bmc phosphor-network-manager[447]: Setting MAC 74D4DDF4398D on interface eth0
bmc phosphor-network-manager[447]: Check xyz.openbmc_project.Network.IP for sdbus response
bmc phosphor-network-manager[447]: Check xyz.openbmc_project.Object.Delete for sdbus response
bmc phosphor-network-manager[447]: Setting NIC down on eth0
bmc phosphor-network-manager[447]: Reloaded systemd-networkd

Case 2: Inventory MAC didn't exist before phosphor-network started
root@bmc:~# journalctl -u xyz.openbmc_project.Network
bmc systemd[1]: Starting Phosphor Network Manager...
bmc phosphor-network-manager[1040]: Check VPD for MAC: Force sync enabled
bmc phosphor-network-manager[1040]: Registering the Inventory Signals Matcher
bmc phosphor-network-manager[1040]: Get info on interface Minerva_CMM, object /xyz/openbmc_project/inventory/system/board/Minerva_CMM_SCM
bmc phosphor-network-manager[1040]: Get info on interface Minerva_CMM, object /xyz/openbmc_project/inventory/system/board/Minerva_CMM_BSM
bmc phosphor-network-manager[1040]: Get info on interface Minerva_CMM, object /xyz/openbmc_project/inventory/system/board/Minerva_CMM
bmc phosphor-network-manager[1040]: Mac Address 74:d4:dd:f4:39:8d in Inventory on Interface eth0
bmc phosphor-network-manager[1040]: Setting MAC 74:d4:dd:f4:39:8d on interface eth0
bmc phosphor-network-manager[1040]: Removing the match for ethernet interfaces
bmc systemd[1]: Started Phosphor Network Manager.
'''

Change-Id: Ibe9171372bd244dbaa524d9b8c7ed58d94aa5b91
Signed-off-by: Anderson Kuo <Anderson.Kuo@quantatw.com>

show more ...

84f58c2d09-Jul-2025 Patrick Williams <patrick@stwcx.xyz>

meson: use non-deprecated systemd packageconfig

Systemd's packageconfig file has both `systemdsystemunitdir` and
`systemd_system_unit_dir` defined. The non-underscore one appears
to be a deprecated

meson: use non-deprecated systemd packageconfig

Systemd's packageconfig file has both `systemdsystemunitdir` and
`systemd_system_unit_dir` defined. The non-underscore one appears
to be a deprecated alias[1]. Move to the non-deprecated /
underscore-separated variant.

[1]: https://github.com/systemd/systemd/commit/4908de44b0a0409f84a7cdc5641b114d6ce8ba03

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

show more ...

618ac41927-Apr-2025 Patrick Williams <patrick@stwcx.xyz>

clang-format: update latest spec and reformat

Copy the latest format file from the docs repository and apply.

Change-Id: I29c7168fd2fe69b1738a026e1d1360a6de7b5f5e
Signed-off-by: Patrick Williams <p

clang-format: update latest spec and reformat

Copy the latest format file from the docs repository and apply.

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

show more ...

64f6126406-Nov-2022 William A. Kennington III <wak@google.com>

ethernet_interface: Runtime detect uboot-env

We don't need a build time option as systems not using it don't include
uboot fw_setenv.

Change-Id: I922fb9ebb0309ab1a792892c28417794f5ed6ef0
Signed-off

ethernet_interface: Runtime detect uboot-env

We don't need a build time option as systems not using it don't include
uboot fw_setenv.

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

show more ...

f7116de808-Dec-2024 Ravi Teja <raviteja28031990@gmail.com>

Add LLDP configuration support

This commit implements EmitLLDP D-bus property to support configuration
of enable/disable LLDP of each ethernet interface.

Tested by:
Set EmitLLDP D-bus property on
x

Add LLDP configuration support

This commit implements EmitLLDP D-bus property to support configuration
of enable/disable LLDP of each ethernet interface.

Tested by:
Set EmitLLDP D-bus property on
xyz.openbmc_project.Network.EthernetInterface

Change-Id: I4ebedff9d3f914219f2f84c861fdee126584a94b
Signed-off-by: Ravi Teja <raviteja28031990@gmail.com>

show more ...

4fe8613f15-Sep-2024 Jishnu CM <jishnunambiarcm@duck.com>

Filter static ntp servers from ntpservers

EthernetInterface::ntpServers contains both static and dynamic
ntpservers. EthernetInterface::ntpServers is returned as network
provided ntp servers in red

Filter static ntp servers from ntpservers

EthernetInterface::ntpServers contains both static and dynamic
ntpservers. EthernetInterface::ntpServers is returned as network
provided ntp servers in redfish response.

In bmcweb,
NTPServers = ntpServers = StaticNTPServers of networkd
NetworkSuppliedServers = dynamicNtpServers = NTPServers of networkd

This commit filter out static ntp servers from the ntpServers to have it
contain only network provided ntp servers.

Tested by:

1. Enable DHCP to fetch NTP servers list from the DHCP server. Do a
GET on NetworkProtocol and verify the NetworkSuppliedServers contains
NTP servers from DHCP only.

2. Verified it has not altered the behavior of static NTPServers list

"Id": "NetworkProtocol",
"NTP": {
"NTPServers": [<Static NTP Servers>],
"NetworkSuppliedServers": [<NTP servers from DHCP>],
"ProtocolEnabled": false
},

Change-Id: I0cf186cae9159bd56a3166d5921d32d51216cf47
Signed-off-by: Jishnu CM <jishnunambiarcm@duck.com>

show more ...

e034990a12-Apr-2025 Milton D. Miller II <mdmii@outlook.com>

Identify MAC address as invalid

The problem is with the Media Access Controller address not an
Internet Protocol address.

Probably introduced due to incomplete editing of a similar message.

Change

Identify MAC address as invalid

The problem is with the Media Access Controller address not an
Internet Protocol address.

Probably introduced due to incomplete editing of a similar message.

Change-Id: If4648f73a3f33da8832078d8ce540570bdb449bd
Signed-off-by: Milton Miller <mdmii@outlook.com>

show more ...

0779db7f07-Jan-2025 kokilav <kokilavaradhan@gmail.com>

Handle IPv4 address for IPv6 Static Default Gateway

Error is not thrown when an IPV4 address is provided.
This commit addresses the issue by explicitly handling such cases
and returning an InvalidAr

Handle IPv4 address for IPv6 Static Default Gateway

Error is not thrown when an IPV4 address is provided.
This commit addresses the issue by explicitly handling such cases
and returning an InvalidArgument error when a IPV4address
is configured for IPV6 Static Default Gateway field.

Tested By:
Verified the test case and ensured proper
invalid argument error is thrown.

Change-Id: Ibc3d2a77ae56f5b23c3f8bca12409693aa2f3ad9
Signed-off-by: kokilav <kokilavaradhan@gmail.com>

show more ...

f51a2c6a12-Dec-2024 kokilav <kokilavaradhan@gmail.com>

Handle InvalidArgument Error for Out-of-Range MAC addresses

Error is not thrown when an out-of-range MAC address is provided.
This commit addresses the issue by explicitly handling such cases
and re

Handle InvalidArgument Error for Out-of-Range MAC addresses

Error is not thrown when an out-of-range MAC address is provided.
This commit addresses the issue by explicitly handling such cases
and returning an InvalidArgument error when a MAC address
falls outside the valid range.

Tested By:
Verified the out-of-range MAC address case and ensured proper
invalid argument error is thrown.

Change-Id: I508cf267878811fcf70fcce7dfa7ff804b160bc1
Signed-off-by: kokilav <kokilavaradhan@gmail.com>

show more ...

36658cc708-Feb-2025 eddylu <puzzy8338@gmail.com>

ncsi-cmd: Add 'discover' subcommand for MCTP

This commit introduces a new 'discover' subcommand to the ncsi-cmd tool,
enabling scanning for available NC-SI packages and channels via MCTP.
The discov

ncsi-cmd: Add 'discover' subcommand for MCTP

This commit introduces a new 'discover' subcommand to the ncsi-cmd tool,
enabling scanning for available NC-SI packages and channels via MCTP.
The discovery process starts from Package 0 and iterates through
channels to identify functional combinations.
Once a valid package and channel are found, the process stops.

Testing:
./ncsi-cmd -m 91 discover

Change-Id: I2e38b23c5995f3f34e2dc3d22fed4eead8194835
Signed-off-by: eddy lu <puzzy8338@gmail.com>

show more ...

ef2be3cd12-Dec-2024 eddylu <puzzy8338@gmail.com>

Implement Receive Data from NC Command (0x4D) for NC-SI

This commit implements the "Receive Data from NC" command
(0x4D) as specified in the NC-SI standard. It also
includes related unit tests to en

Implement Receive Data from NC Command (0x4D) for NC-SI

This commit implements the "Receive Data from NC" command
(0x4D) as specified in the NC-SI standard. It also
includes related unit tests to ensure functionality.

The dump subcommand has been enhanced to allow specifying
the data handle and output file name when sending the
command.

Testing:
./ncsi-cmd -m 91 -p 0 -c 1f core-dump mctp_core.log
./ncsi-cmd -i 2 -p 0 -c 1f core-dump rbt_core.log

Change-Id: I43a9e8ba08772f3edc65ed5efb5b83cb4ae52e03
Signed-off-by: eddy lu <puzzy8338@gmail.com>

show more ...

a42a865104-Dec-2024 Jeremy Kerr <jk@codeconstruct.com.au>

ncsi-cmd: mctp: Add a simple IID allocator for NCSI commands

Currently, we just use a fixed IID of zero for NCSI commands. However,
DSP0222 has a requirement that the IID of a command should not mat

ncsi-cmd: mctp: Add a simple IID allocator for NCSI commands

Currently, we just use a fixed IID of zero for NCSI commands. However,
DSP0222 has a requirement that the IID of a command should not match
that of a previously-issued command.

So, implement a straightforward per-EID IID allocator, which will
persist the current IID over invocations of ncsi-cmd. We keep state in
/run/ncsi-mctp-iids, with an IID byte per possible MCTP EID.

Tested: on first usage against a specific EID, commands are issued with
IID 1, and subsequent commands use an incremented IID.

Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Change-Id: Iafc942abe6253a2560997ee5392a04af4412dc2e

show more ...

ca9d867716-Sep-2024 Jeremy Kerr <jk@codeconstruct.com.au>

ncsi: Add a NCSI-over-MCTP transport

Add a facility for performing NCSI commands over a NCSI-over-MCTP
interface, alongside the existing Netlink transport.

This adds a new Interface subclass, MCTPI

ncsi: Add a NCSI-over-MCTP transport

Add a facility for performing NCSI commands over a NCSI-over-MCTP
interface, alongside the existing Netlink transport.

This adds a new Interface subclass, MCTPInterface, which performs the
MCTP encapsulation/decapsulation, over an AF_MCTP socket.

Tested: able to perform NCSI commands over a MCTP link, to both emulated
and hardware NIC devices. The -m argument can now target a NIC using
MCTP.

For example, sending a raw command to perform a Get Version ID (type
0x15):

root@bmc:~# ncsi-cmd -m 9 --package 0 raw 0x15
<7> Command: type 0x15, payload 0 bytes:
<7> Response 60 bytes: 00 01 00 2b 95 [...]

Change-Id: I9a7bfddfc4fd1b5bb8d0bff187936a0258d3dade
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>

show more ...

0963c4b706-Mar-2025 Jeremy Kerr <jk@codeconstruct.com.au>

ncsi-netlink: ncsi-cmd fallback: move -c argument before operation

If a channel argument was used for ncsi-netlink, and we're falling-back
to the ncsi-cmd wrapper, we will place the "-c" argument af

ncsi-netlink: ncsi-cmd fallback: move -c argument before operation

If a channel argument was used for ncsi-netlink, and we're falling-back
to the ncsi-cmd wrapper, we will place the "-c" argument after the "raw"
command:

```
root@p10bmc:~# strace -e trace=execve ncsi-netlink -x 2 -p 0 -c 0 -o 5000000157200001
execve("/usr/bin/ncsi-netlink", ["ncsi-netlink", "-x", "2", "-p", "0", "-c", "0", "-o", "5000000157200001"], 0x7e98acc8 /* 20 vars */) = 0
<7> ncsi-netlink [..] -o is deprecated by ncsi-cmd
execve("/usr/local/bin/ncsi-cmd", ["ncsi-cmd", "-i", "2", "-p", "0", "raw", "-c", "0", "50", "00000157200001"], 0x7e945ccc /* 20 vars */) = -1 ENOENT (No such file or directory)
execve("/usr/bin/ncsi-cmd", ["ncsi-cmd", "-i", "2", "-p", "0", "raw", "-c", "0", "50", "00000157200001"], 0x7e945ccc /* 20 vars */) = 0
Invalid command type value
+++ exited with 1 +++
```

Instead, move the "raw" argument out of the initial list, and add it
once we have processed the channel.

Tested: we can now call the ncsi-netlink wrapper with -c:

```
root@p10bmc:~# strace -e trace=execve ncsi-netlink -x 2 -p 0 -c 0 -o 5000000157200001
execve("/usr/bin/ncsi-netlink", ["ncsi-netlink", "-x", "2", "-p", "0", "-c", "0", "-o", "5000000157200001"], 0x7e80fcd8 /* 19 vars */) = 0
<7> ncsi-netlink [..] -o is deprecated by ncsi-cmd
execve("/usr/local/bin/ncsi-cmd", ["ncsi-cmd", "-i", "2", "-p", "0", "-c", "0", "raw", "50", "00000157200001"], 0x7ef61cec /* 19 vars */) = -1 ENOENT (No such file or directory)
execve("/usr/bin/ncsi-cmd", ["ncsi-cmd", "-i", "2", "-p", "0", "-c", "0", "raw", "50", "00000157200001"], 0x7ef61cec /* 19 vars */) = 0
```

Which results in the OEM NCSI command being transmitted:

```
07:04:12 [TRACE] rx: NcsiPacket { mc: 0, iid: 29, type: Unknown (50), chan: p0c00, flags: 00, payload: 7: [00, 00, 01, 57, 20, 00, 01] }
```

Reported-by: George Keishing <gkeishin@gmail.com>
Fixes: bad17c0 ("ncsi-cmd: Add a new executable for issuing NCSI commands")
Change-Id: I196ec1b52d34e6b260e9696e4bd1e7c7482a6402
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>

show more ...

297a63b403-Mar-2025 Patrick Williams <patrick@stwcx.xyz>

meson: reformat with meson formatter

Apply the `meson format` results.

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

bad17c0b21-Nov-2024 Jeremy Kerr <jk@codeconstruct.com.au>

ncsi-cmd: Add a new executable for issuing NCSI commands

At the moment, the ncsi-netlink utility does two things:

- allows management of the kernel NCSI state, such as the channel and
package m

ncsi-cmd: Add a new executable for issuing NCSI commands

At the moment, the ncsi-netlink utility does two things:

- allows management of the kernel NCSI state, such as the channel and
package masks

- allows issuing NCSI messages to the NCSI-capable NIC, through the
NCSI_CMD_SEND_CMD interface

While these two things do share the same kernel API, they have somewhat
different objectives: one is controlling local state, the other is
controlling remote (ie, the NIC) state.

In future, we want to allow non-netlink-based NCSI transports for
issuing commands to the NIC, which makes the ncsi-netlink name somewhat
inaccurate for those.

So, introduce a new tool, 'ncsi-cmd', for issuing NCSI commands over the
netlink interface.

This has similar command-line semantics to the existing
'ncsi-netlink [...] -o <PAYLOAD>' usage, but has a few changes for a
more ergonomic UI:

Firstly, the type (or "opcode") byte is no longer packed into the
payload data, because it's not really payload.

Secondly, we use --interface/-i rather than --index/-x, with a note that
interfaces are specified by index. This allows for future changes that
allow specifying interfaces by name.

Finally, to make it clear that we can issue more than just OEM
commands, we have separate subcommands: "oem" and "raw". These are
similar, just that "oem" implies the standard OEM type value of 0x50.
So, the following are equivalent:

ncsi-cmd -i2 -p0 oem 010203

ncsi-cmd -i2 -p0 raw 0x50 010203

But now we have a cleaner interface for not-OEM commands:

ncsi-cmd -i12 -p0 raw 0x15

For issuing command type 0x15, "Get Version ID".

We remove the send logic from ncsi-netlink, but leave a compatibility
shim that will exec() ncsi-cmd with the appropriate arguments instead.

Change-Id: Ied240db0d545d5770df0927da354c65b82ee9508
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>

show more ...

2d0b48da16-Sep-2024 Jeremy Kerr <jk@codeconstruct.com.au>

ncsi: make Interface virtual

Now that we have encapsulation for passing NCSI commands and responses
to/from an interface, we can make the Interface object virtual, and have
the Netlink implementatio

ncsi: make Interface virtual

Now that we have encapsulation for passing NCSI commands and responses
to/from an interface, we can make the Interface object virtual, and have
the Netlink implementation as a subclass.

We keep the netlink-specific operations in NetlinkInterface; getInfo(),
setChannel(), clearInterface(), and the channel/package mask operations
are all netlink-specific items to control kernel state.

Change-Id: I30b9cec41712d2e32d12685dd8406e08c6dea1f0
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>

show more ...

b788524a15-Sep-2024 Jeremy Kerr <jk@codeconstruct.com.au>

ncsi: encapsulate NC-SI commands with NCSICommand / NCSIResponse structs

... and rename Interface::sendOemCommand to Interface::sendCommand.

This provides a more clear facility to pass command and

ncsi: encapsulate NC-SI commands with NCSICommand / NCSIResponse structs

... and rename Interface::sendOemCommand to Interface::sendCommand.

This provides a more clear facility to pass command and response objects
around, for future command and transport implementations.

Change-Id: I46e594ab6467ed87cfc27189c3ec4bd321726ee5
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>

show more ...

12345678910>>...13