base: decode_set_tid_req() in PLDM base

Add decode API for SetTID request based on DSP0240 1.2.0 Section
9.1.1 Table 8.

Change-Id: I448f76b810bfb5dbf2b84c85db266c32416a181a
Signed-off-by: Vishnu Santhosh <vishnu.santhosh@oss.qualcomm.com>
Signed-off-by: Deepak Kumar Singh <deepak.singh@oss.qualcomm.com>
Signed-off-by: Rameshwar Varaganti <rvaragan@qti.qualcomm.com>
diff --git a/src/dsp/base.c b/src/dsp/base.c
index 35e3eb0..1b16381 100644
--- a/src/dsp/base.c
+++ b/src/dsp/base.c
@@ -502,6 +502,28 @@
 	return PLDM_SUCCESS;
 }
 
+LIBPLDM_ABI_TESTING
+int decode_set_tid_req(const struct pldm_msg *msg, size_t payload_length,
+		       uint8_t *tid)
+{
+	PLDM_MSGBUF_DEFINE_P(buf);
+	int rc;
+
+	if (!msg || !tid) {
+		return -EINVAL;
+	}
+
+	rc = pldm_msgbuf_init_errno(buf, PLDM_SET_TID_REQ_BYTES, msg->payload,
+				    payload_length);
+	if (rc) {
+		return rc;
+	}
+
+	pldm_msgbuf_extract_p(buf, tid);
+
+	return pldm_msgbuf_complete_consumed(buf);
+}
+
 LIBPLDM_ABI_STABLE
 int decode_multipart_receive_req(const struct pldm_msg *msg,
 				 size_t payload_length, uint8_t *pldm_type,