platform: Stabilise related decode_entity_auxiliary_names_pdr*() APIs
See usage example at:
https://gerrit.openbmc.org/c/openbmc/pldm/+/72610
Change-Id: I16c6d42ad11afa59b04676fa187f5ea0764d1880
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ae750a9..79ca67f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -27,6 +27,10 @@
6. pdr: Add related decode_entity_auxiliary_names_pdr() APIs
7. fw_update: Add encode req & decode resp for get_downstream_fw_params
+### Changed
+
+1. pdr: Stabilise related decode_entity_auxiliary_names_pdr() APIs
+
### Deprecated
1. fru: Deprecate `get_fru_record_by_option_check()`
diff --git a/abi/x86_64/gcc.dump b/abi/x86_64/gcc.dump
index 2cdc0e4..3c38772 100644
--- a/abi/x86_64/gcc.dump
+++ b/abi/x86_64/gcc.dump
@@ -5176,6 +5176,45 @@
'Return' => '100',
'ShortName' => 'pldm_pdr_add_check'
},
+ '94945' => {
+ 'Header' => 'platform.h',
+ 'Line' => '2428',
+ 'Param' => {
+ '0' => {
+ 'name' => 'pdr',
+ 'type' => '95858'
+ }
+ },
+ 'Return' => '100',
+ 'ShortName' => 'decode_pldm_entity_auxiliary_names_pdr_index'
+ },
+ '95868' => {
+ 'Header' => 'platform.h',
+ 'Line' => '2406',
+ 'Param' => {
+ '0' => {
+ 'name' => 'data',
+ 'type' => '2341'
+ },
+ '1' => {
+ 'name' => 'data_length',
+ 'type' => '1145'
+ },
+ '2' => {
+ 'name' => 'pdr',
+ 'type' => '95858'
+ },
+ '3' => {
+ 'name' => 'pdr_length',
+ 'type' => '1145'
+ }
+ },
+ 'Reg' => {
+ '2' => 'rbx'
+ },
+ 'Return' => '100',
+ 'ShortName' => 'decode_entity_auxiliary_names_pdr'
+ },
'102380' => {
'Header' => 'platform.h',
'Line' => '1781',
@@ -9193,6 +9232,7 @@
'decode_cancel_update_component_resp' => 1,
'decode_cancel_update_resp' => 1,
'decode_descriptor_type_length_value' => 1,
+ 'decode_entity_auxiliary_names_pdr' => 1,
'decode_event_message_buffer_size_resp' => 1,
'decode_event_message_supported_resp' => 1,
'decode_file_ack_req' => 1,
@@ -9247,6 +9287,7 @@
'decode_platform_event_message_req' => 1,
'decode_platform_event_message_resp' => 1,
'decode_pldm_comp_image_info' => 1,
+ 'decode_pldm_entity_auxiliary_names_pdr_index' => 1,
'decode_pldm_package_header_info' => 1,
'decode_pldm_pdr_repository_change_record_data' => 1,
'decode_pldm_pdr_repository_chg_event_data' => 1,
@@ -11312,6 +11353,15 @@
'Size' => '4',
'Type' => 'Typedef'
},
+ '88958' => {
+ 'BaseType' => '927',
+ 'Header' => 'types.h',
+ 'Line' => '55',
+ 'Name' => '__uint_least16_t',
+ 'PrivateABI' => 1,
+ 'Size' => '2',
+ 'Type' => 'Typedef'
+ },
'89011' => {
'BaseType' => '88858',
'Header' => 'stdint-intn.h',
@@ -11347,6 +11397,15 @@
'Size' => '4',
'Type' => 'Typedef'
},
+ '89922' => {
+ 'BaseType' => '88958',
+ 'Header' => 'uchar.h',
+ 'Line' => '51',
+ 'Name' => 'char16_t',
+ 'PrivateABI' => 1,
+ 'Size' => '2',
+ 'Type' => 'Typedef'
+ },
'90633' => {
'Header' => 'platform.h',
'Line' => '288',
@@ -11888,6 +11947,95 @@
'Size' => '112',
'Type' => 'Struct'
},
+ '92888' => {
+ 'BaseType' => '89922',
+ 'Header' => 'platform.h',
+ 'Line' => '828',
+ 'Name' => 'pldm_utf16be',
+ 'Size' => '2',
+ 'Type' => 'Typedef'
+ },
+ '92901' => {
+ 'Header' => 'platform.h',
+ 'Line' => '830',
+ 'Memb' => {
+ '0' => {
+ 'name' => 'tag',
+ 'offset' => '0',
+ 'type' => '982'
+ },
+ '1' => {
+ 'name' => 'name',
+ 'offset' => '8',
+ 'type' => '92943'
+ }
+ },
+ 'Name' => 'struct pldm_entity_auxiliary_name',
+ 'Size' => '16',
+ 'Type' => 'Struct'
+ },
+ '92943' => {
+ 'BaseType' => '92888',
+ 'Name' => 'pldm_utf16be*',
+ 'Size' => '8',
+ 'Type' => 'Pointer'
+ },
+ '92948' => {
+ 'Header' => 'platform.h',
+ 'Line' => '840',
+ 'Memb' => {
+ '0' => {
+ 'name' => 'hdr',
+ 'offset' => '0',
+ 'type' => '92176'
+ },
+ '1' => {
+ 'name' => 'container',
+ 'offset' => '18',
+ 'type' => '63152'
+ },
+ '2' => {
+ 'name' => 'shared_name_count',
+ 'offset' => '24',
+ 'type' => '121'
+ },
+ '3' => {
+ 'name' => 'name_string_count',
+ 'offset' => '25',
+ 'type' => '121'
+ },
+ '4' => {
+ 'name' => 'names',
+ 'offset' => '36',
+ 'type' => '93062'
+ },
+ '5' => {
+ 'name' => 'auxiliary_name_data_size',
+ 'offset' => '50',
+ 'type' => '1145'
+ },
+ '6' => {
+ 'name' => 'auxiliary_name_data',
+ 'offset' => '64',
+ 'type' => '93067'
+ }
+ },
+ 'Name' => 'struct pldm_entity_auxiliary_names_pdr',
+ 'Size' => '40',
+ 'Type' => 'Struct'
+ },
+ '93062' => {
+ 'BaseType' => '92901',
+ 'Name' => 'struct pldm_entity_auxiliary_name*',
+ 'Size' => '8',
+ 'Type' => 'Pointer'
+ },
+ '93067' => {
+ 'BaseType' => '114',
+ 'Name' => 'char[]',
+ 'Size' => '8',
+ 'Type' => 'Array'
+ },
'93082' => {
'Header' => 'platform.h',
'Line' => '870',
@@ -12092,6 +12240,12 @@
'Size' => '3',
'Type' => 'Struct'
},
+ '95858' => {
+ 'BaseType' => '92948',
+ 'Name' => 'struct pldm_entity_auxiliary_names_pdr*',
+ 'Size' => '8',
+ 'Type' => 'Pointer'
+ },
'103985' => {
'BaseType' => '94070',
'Name' => 'struct pldm_get_state_effecter_states_resp*',
diff --git a/src/dsp/platform.c b/src/dsp/platform.c
index 3d27802..4a5388c 100644
--- a/src/dsp/platform.c
+++ b/src/dsp/platform.c
@@ -2693,7 +2693,7 @@
return pldm_msgbuf_destroy_consumed(buf);
}
-LIBPLDM_ABI_TESTING
+LIBPLDM_ABI_STABLE
int decode_entity_auxiliary_names_pdr(
const void *data, size_t data_length,
struct pldm_entity_auxiliary_names_pdr *pdr, size_t pdr_length)
@@ -2805,7 +2805,7 @@
return 0;
}
-LIBPLDM_ABI_TESTING
+LIBPLDM_ABI_STABLE
int decode_pldm_entity_auxiliary_names_pdr_index(
struct pldm_entity_auxiliary_names_pdr *pdr)
{
diff --git a/tests/dsp/platform.cpp b/tests/dsp/platform.cpp
index 0cf7c39..299c986 100644
--- a/tests/dsp/platform.cpp
+++ b/tests/dsp/platform.cpp
@@ -5031,7 +5031,6 @@
return endptr - startptr;
}
-#ifdef LIBPLDM_API_TESTING
TEST(decodeEntityAuxNamePdrData, GoodTest)
{
std::vector<uint8_t> pdr1{
@@ -5150,9 +5149,7 @@
free(decodedPdr->names);
free(decodedPdr);
}
-#endif
-#ifdef LIBPLDM_API_TESTING
TEST(decodeEntityAuxNamePdrData, BadTest)
{
std::vector<uint8_t> pdr1{
@@ -5196,4 +5193,3 @@
EXPECT_EQ(-EBADMSG, rc);
free(decodedPdr);
}
-#endif