From 289183a4b399ca54e124b933a84d3215bc3db30c Mon Sep 17 00:00:00 2001 From: Thu Nguyen Date: Fri, 13 Dec 2024 00:42:14 +0000 Subject: [PATCH] Update mctp APIs to mctp codeconstruct version 2.0 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 --- examples/mi-conf.c | 9 +++++---- src/nvme/mi-mctp.c | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/examples/mi-conf.c b/examples/mi-conf.c index 4fdd4055..e47d281f 100644 --- a/examples/mi-conf.c +++ b/examples/mi-conf.c @@ -25,9 +25,9 @@ #include -#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) { @@ -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; diff --git a/src/nvme/mi-mctp.c b/src/nvme/mi-mctp.c index 2f1c02d4..a4124f04 100644 --- a/src/nvme/mi-mctp.c +++ b/src/nvme/mi-mctp.c @@ -26,8 +26,8 @@ #ifdef CONFIG_DBUS #include -#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