Error while invalidating the resource dump over PLDM.
Problem:
The wrong identifier type was passed to the host dump
transport for deleting the dump, so an exception
is thrown.
Fix was needed in two places
1) Dump identifier number was old in resource dump manager
2) PLDM_FILE_TYPE_RESOURCE_DUMP_PARAMS was given as dump
identifier instead of PLDM_FILE_TYPE_RESOURCE_DUMP.
Test:
- Created a new dump
- Invalidated the dump
Result: Dump is deleted from the host.
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
Change-Id: If68f415439d8322f47fa6a6bc7a9b230e9f67fb1
diff --git a/dump-extensions/openpower-dumps/resource_dump_entry.cpp b/dump-extensions/openpower-dumps/resource_dump_entry.cpp
index e8e73f3..0954e9a 100644
--- a/dump-extensions/openpower-dumps/resource_dump_entry.cpp
+++ b/dump-extensions/openpower-dumps/resource_dump_entry.cpp
@@ -15,7 +15,7 @@
// TODO #ibm-openbmc/issues/2859
// Revisit host transport impelementation
// This value is used to identify the dump in the transport layer to host,
-constexpr auto TRANSPORT_DUMP_TYPE_IDENTIFIER = 7;
+constexpr auto TRANSPORT_DUMP_TYPE_IDENTIFIER = 9;
using namespace phosphor::logging;
void Entry::initiateOffload(std::string uri)
diff --git a/host-transport-extensions/pldm/oem/ibm/pldm_oem_cmds.cpp b/host-transport-extensions/pldm/oem/ibm/pldm_oem_cmds.cpp
index 981076c..13df7e4 100644
--- a/host-transport-extensions/pldm/oem/ibm/pldm_oem_cmds.cpp
+++ b/host-transport-extensions/pldm/oem/ibm/pldm_oem_cmds.cpp
@@ -152,8 +152,8 @@
case PLDM_FILE_TYPE_DUMP:
pldmDumpType = PLDM_FILE_TYPE_DUMP;
break;
- case PLDM_FILE_TYPE_RESOURCE_DUMP_PARMS:
- pldmDumpType = PLDM_FILE_TYPE_RESOURCE_DUMP_PARMS;
+ case PLDM_FILE_TYPE_RESOURCE_DUMP:
+ pldmDumpType = PLDM_FILE_TYPE_RESOURCE_DUMP;
break;
default:
throw std::runtime_error("Unknown pldm dump file-io type to delete "