Skip to content
This repository has been archived by the owner on Sep 24, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' of github.com:microsoft/dpdpu
Browse files Browse the repository at this point in the history
  • Loading branch information
qizzz committed Sep 21, 2023
2 parents 24627e8 + 9ca015f commit f927cec
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DPDPU/Common/Include/Protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,5 @@ assert_static_protocol(DDS_RESPONSE_RING_BYTES % DDS_CACHE_LINE_SIZE == 0, 5);
#pragma warning(pop)
#endif

#define DDS_BACKEND_ADDR "172.16.1.4"
#define DDS_BACKEND_ADDR "172.16.1.8"
#define DDS_BACKEND_PORT 4242
80 changes: 79 additions & 1 deletion DPDPU/StorageEngine/DDSBackEndDPUService/Source/FileBackEnd.c
Original file line number Diff line number Diff line change
Expand Up @@ -2612,9 +2612,87 @@ CheckAndProcessControlPlaneCompletions(
//
//
if (*(ErrorCodeT*)(ctrlConn->PendingControlPlanRequest.Response) == DDS_ERROR_CODE_IO_PENDING) {
continue;
//
// TODO: testing
//
//
switch (ctrlConn->PendingControlPlanRequest.RequestId)
{
case CTRL_MSG_F2B_REQ_CREATE_DIR:
{
CtrlMsgB2FAckCreateDirectory* resp = (CtrlMsgB2FAckCreateDirectory*)ctrlConn->PendingControlPlanRequest.Response;
resp->Result = DDS_ERROR_CODE_SUCCESS;
}
break;
case CTRL_MSG_F2B_REQ_REMOVE_DIR:
{
CtrlMsgB2FAckRemoveDirectory* resp = (CtrlMsgB2FAckRemoveDirectory*)ctrlConn->PendingControlPlanRequest.Response;
resp->Result = DDS_ERROR_CODE_SUCCESS;
}
break;
case CTRL_MSG_F2B_REQ_CREATE_FILE:
{
CtrlMsgB2FAckCreateFile* resp = (CtrlMsgB2FAckCreateFile*)ctrlConn->PendingControlPlanRequest.Response;
resp->Result = DDS_ERROR_CODE_SUCCESS;
}
break;
case CTRL_MSG_F2B_REQ_DELETE_FILE:
{
CtrlMsgB2FAckDeleteFile* resp = (CtrlMsgB2FAckDeleteFile*)ctrlConn->PendingControlPlanRequest.Response;
resp->Result = DDS_ERROR_CODE_SUCCESS;
}
break;
case CTRL_MSG_F2B_REQ_CHANGE_FILE_SIZE:
{
CtrlMsgB2FAckChangeFileSize* resp = (CtrlMsgB2FAckChangeFileSize*)ctrlConn->PendingControlPlanRequest.Response;
resp->Result = DDS_ERROR_CODE_SUCCESS;
}
break;
case CTRL_MSG_F2B_REQ_GET_FILE_SIZE:
{
CtrlMsgB2FAckGetFileSize* resp = (CtrlMsgB2FAckGetFileSize*)ctrlConn->PendingControlPlanRequest.Response;
resp->Result = DDS_ERROR_CODE_SUCCESS;
resp->FileSize = 0;
}
break;
case CTRL_MSG_F2B_REQ_GET_FILE_INFO:
{
CtrlMsgB2FAckGetFileInfo* resp = (CtrlMsgB2FAckGetFileInfo*)ctrlConn->PendingControlPlanRequest.Response;
resp->Result = DDS_ERROR_CODE_SUCCESS;
memset(&resp->FileInfo, 0, sizeof(resp->FileInfo));
}
break;
case CTRL_MSG_F2B_REQ_GET_FILE_ATTR:
{
CtrlMsgB2FAckGetFileAttr* resp = (CtrlMsgB2FAckGetFileAttr*)ctrlConn->PendingControlPlanRequest.Response;
resp->Result = DDS_ERROR_CODE_SUCCESS;
resp->FileAttr = 0;
}
break;
case CTRL_MSG_F2B_REQ_GET_FREE_SPACE:
{
CtrlMsgB2FAckGetFreeSpace* resp = (CtrlMsgB2FAckGetFreeSpace*)ctrlConn->PendingControlPlanRequest.Response;
resp->Result = DDS_ERROR_CODE_SUCCESS;
resp->FreeSpace = 0;
}
break;
case CTRL_MSG_F2B_REQ_MOVE_FILE:
{
CtrlMsgB2FAckMoveFile* resp = (CtrlMsgB2FAckMoveFile*)ctrlConn->PendingControlPlanRequest.Response;
resp->Result = DDS_ERROR_CODE_SUCCESS;
}
break;
default:
break;
}

// continue;
}

ctrlConn->PendingControlPlanRequest.RequestId = DDS_REQUEST_INVALID;
ctrlConn->PendingControlPlanRequest.Request = NULL;
ctrlConn->PendingControlPlanRequest.Response = NULL;

//
// It's complete. Respond back to the host
//
Expand Down

0 comments on commit f927cec

Please sign in to comment.