Skip to content

Commit

Permalink
Update mctp APIs to mctp codeconstruct version 2.0
Browse files Browse the repository at this point in the history
The mctp codeconstruct released the mctp APIs version 2.0 as [1]. Update
code to use new APIs.

[1] https://github.com/CodeConstruct/mctp/blob/v2.0/docs/mctpd.md

Signed-off-by: Thu Nguyen <[email protected]>
  • Loading branch information
ThuBaNguyen authored and igaw committed Dec 13, 2024
1 parent 27ed889 commit 289183a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions examples/mi-conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@

#include <dbus/dbus.h>

#define MCTP_DBUS_NAME "xyz.openbmc_project.MCTP"
#define MCTP_DBUS_PATH "/xyz/openbmc_project/mctp"
#define MCTP_DBUS_EP_IFACE "au.com.CodeConstruct.MCTP.Endpoint"
#define MCTP_DBUS_NAME "au.com.codeconstruct.MCTP1"
#define MCTP_DBUS_PATH "/au/com/codeconstruct/mctp1"
#define MCTP_DBUS_EP_IFACE "au.com.codeconstruct.MCTP.Endpoint1"

static int parse_mctp(const char *devstr, unsigned int *net, uint8_t *eid)
{
Expand Down Expand Up @@ -87,7 +87,8 @@ int set_local_mtu(DBusConnection *bus, unsigned int net, uint8_t eid,
char *ep_path;
int rc;

rc = asprintf(&ep_path, "%s/%u/%hhu", MCTP_DBUS_PATH, net, eid);
rc = asprintf(&ep_path, "%s/networks/%u/endpoints/%hhu", MCTP_DBUS_PATH,
net, eid);
if (rc < 0) {
warn("Failed to create dbus path");
return -1;
Expand Down
4 changes: 2 additions & 2 deletions src/nvme/mi-mctp.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
#ifdef CONFIG_DBUS
#include <dbus/dbus.h>

#define MCTP_DBUS_PATH "/xyz/openbmc_project/mctp"
#define MCTP_DBUS_IFACE "xyz.openbmc_project.MCTP"
#define MCTP_DBUS_PATH "/au/com/codeconstruct/mctp1"
#define MCTP_DBUS_IFACE "au.com.codeconstruct.MCTP1"
#define MCTP_DBUS_IFACE_ENDPOINT "xyz.openbmc_project.MCTP.Endpoint"
#endif

Expand Down

0 comments on commit 289183a

Please sign in to comment.