diff --git a/src/dsp/file.c b/src/dsp/file.c
index fb3d1de..988d284 100644
--- a/src/dsp/file.c
+++ b/src/dsp/file.c
@@ -49,6 +49,67 @@
 }
 
 LIBPLDM_ABI_TESTING
+int decode_pldm_file_df_open_req(const struct pldm_msg *msg,
+				 size_t payload_length,
+				 struct pldm_file_df_open_req *req)
+{
+	PLDM_MSGBUF_DEFINE_P(buf);
+	int rc;
+
+	if (!msg || !req) {
+		return -EINVAL;
+	}
+
+	rc = pldm_msgbuf_init_errno(buf, PLDM_DF_OPEN_REQ_BYTES, msg->payload,
+				    payload_length);
+	if (rc) {
+		return rc;
+	}
+
+	pldm_msgbuf_extract(buf, req->file_identifier);
+	pldm_msgbuf_extract(buf, req->file_attribute.value);
+
+	return pldm_msgbuf_complete_consumed(buf);
+}
+
+LIBPLDM_ABI_TESTING
+int encode_pldm_file_df_open_resp(uint8_t instance_id,
+				  const struct pldm_file_df_open_resp *resp,
+				  struct pldm_msg *msg, size_t *payload_length)
+{
+	PLDM_MSGBUF_DEFINE_P(buf);
+	int rc;
+
+	if (!msg || !resp) {
+		return -EINVAL;
+	}
+
+	struct pldm_header_info header = { 0 };
+	header.instance = instance_id;
+	header.msg_type = PLDM_RESPONSE;
+	header.pldm_type = PLDM_FILE;
+	header.command = PLDM_FILE_CMD_DF_OPEN;
+
+	rc = pack_pldm_header_errno(&header, &(msg->hdr));
+	if (rc) {
+		return rc;
+	}
+
+	rc = pldm_msgbuf_init_errno(buf, PLDM_DF_OPEN_RESP_BYTES, msg->payload,
+				    *payload_length);
+	if (rc) {
+		return rc;
+	}
+
+	pldm_msgbuf_insert(buf, resp->completion_code);
+	if (resp->completion_code == PLDM_SUCCESS) {
+		pldm_msgbuf_insert(buf, resp->file_descriptor);
+	}
+
+	return pldm_msgbuf_complete_used(buf, *payload_length, payload_length);
+}
+
+LIBPLDM_ABI_TESTING
 int decode_pldm_file_df_open_resp(const struct pldm_msg *msg,
 				  size_t payload_length,
 				  struct pldm_file_df_open_resp *resp)
@@ -73,6 +134,11 @@
 	}
 
 	pldm_msgbuf_extract(buf, resp->completion_code);
+	if (resp->completion_code != PLDM_SUCCESS) {
+		// Return the CC directly without decoding the rest of the payload
+		return pldm_msgbuf_complete(buf);
+	}
+
 	pldm_msgbuf_extract(buf, resp->file_descriptor);
 
 	return pldm_msgbuf_complete_consumed(buf);
@@ -114,6 +180,64 @@
 }
 
 LIBPLDM_ABI_TESTING
+int decode_pldm_file_df_close_req(const struct pldm_msg *msg,
+				  size_t payload_length,
+				  struct pldm_file_df_close_req *req)
+{
+	PLDM_MSGBUF_DEFINE_P(buf);
+	int rc;
+
+	if (!msg || !req) {
+		return -EINVAL;
+	}
+
+	rc = pldm_msgbuf_init_errno(buf, PLDM_DF_CLOSE_REQ_BYTES, msg->payload,
+				    payload_length);
+	if (rc) {
+		return rc;
+	}
+
+	pldm_msgbuf_extract(buf, req->file_descriptor);
+	pldm_msgbuf_extract(buf, req->df_close_options.value);
+
+	return pldm_msgbuf_complete_consumed(buf);
+}
+
+LIBPLDM_ABI_TESTING
+int encode_pldm_file_df_close_resp(uint8_t instance_id,
+				   const struct pldm_file_df_close_resp *resp,
+				   struct pldm_msg *msg, size_t *payload_length)
+{
+	PLDM_MSGBUF_DEFINE_P(buf);
+	int rc;
+
+	if (!msg || !resp) {
+		return -EINVAL;
+	}
+
+	struct pldm_header_info header = { 0 };
+	header.instance = instance_id;
+	header.msg_type = PLDM_RESPONSE;
+	header.pldm_type = PLDM_FILE;
+	header.command = PLDM_FILE_CMD_DF_CLOSE;
+
+	rc = pack_pldm_header_errno(&header, &(msg->hdr));
+	if (rc) {
+		return rc;
+	}
+
+	rc = pldm_msgbuf_init_errno(buf, PLDM_DF_CLOSE_RESP_BYTES, msg->payload,
+				    *payload_length);
+	if (rc) {
+		return rc;
+	}
+
+	pldm_msgbuf_insert(buf, resp->completion_code);
+
+	return pldm_msgbuf_complete_used(buf, *payload_length, payload_length);
+}
+
+LIBPLDM_ABI_TESTING
 int decode_pldm_file_df_close_resp(const struct pldm_msg *msg,
 				   size_t payload_length,
 				   struct pldm_file_df_close_resp *resp)
