Skip to content

Commit 0e44db1

Browse files
committed
mctpd: update supports_vdm check
Updated supports_vdm check to be decided based on supported PCIE/IANA message type instead of formatID. Signed-off-by: rutaabhyankar <ruta.abhyankar@intel.com>
1 parent 4df64d5 commit 0e44db1

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

src/mctpd.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3163,10 +3163,8 @@ static int query_peer_properties(struct peer *peer)
31633163
}
31643164

31653165
for (unsigned int i = 0; i < peer->num_message_types; i++) {
3166-
if (peer->message_types[i] ==
3167-
MCTP_GET_VDM_SUPPORT_IANA_FORMAT_ID ||
3168-
peer->message_types[i] ==
3169-
MCTP_GET_VDM_SUPPORT_PCIE_FORMAT_ID) {
3166+
if (peer->message_types[i] == MCTP_TYPE_VENDOR_IANA ||
3167+
peer->message_types[i] == MCTP_TYPE_VENDOR_PCIE) {
31703168
supports_vdm = true;
31713169
break;
31723170
}

tests/test_mctpd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ async def test_query_vdm_types(dbus, mctpd):
641641
"""Test that VendorDefinedMessageTypes is queried and populated."""
642642
iface = mctpd.system.interfaces[0]
643643
vdm_support = [[0, 0x1234, 0x5678], [1, 0xABCDEF12, 0x3456]]
644-
ep = Endpoint(iface, bytes([0x1E]), eid=15, vdm_msg_types=vdm_support)
644+
ep = Endpoint(iface, bytes([0x1E]), eid=15, types=[0, 0x7E, 0x7F], vdm_msg_types=vdm_support)
645645
mctpd.network.add_endpoint(ep)
646646

647647
mctp = await mctpd_mctp_iface_obj(dbus, iface)

0 commit comments

Comments
 (0)