Initial Changes for RDMA as a platform for MsQuic#5113
Initial Changes for RDMA as a platform for MsQuic#5113
Conversation
…quic into srsubra/msquic_rdma
|
@srsubra please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
guhetier
left a comment
There was a problem hiding this comment.
Review in progress, making my way through the RDMA code.
Added a few generic comments.
| ClientRecvContextLength, | ||
| UdpCallbacks, | ||
| TcpCallbacks, | ||
| RdmaCallbacks, |
There was a problem hiding this comment.
We need to clarify which design we follow for RDMA, between the "TCP / UDP" one and the "normal/xdp" one.
Which is tricky, because RDMA is a protocol (like udp/tcp) but it also largely align with what we do for xdp (co-exists as an alternative pipe to the network).
Maybe it will have to be part of a bigger refactoring of the datapath, later.
| { | ||
| if (Socket->UseTcp || (Socket->RawSocketAvailable && | ||
| !IS_LOOPBACK(Offloads[0].Address))) { | ||
| !IS_LOOPBACK(Offloads[0].Address))) { |
| // | ||
| // The following APIs are specific for RDMA Implementation | ||
| // | ||
| #define CXPLAT_RDMA_FLAG_SHARE_ENDPOINT 0x00000001 // Forces sharing of the address and port |
There was a problem hiding this comment.
Please use an enum for flags.
| { | ||
| if (CxPlatRefDecrement(&Socket->RefCount)) { | ||
| if (CxPlatRefDecrement(&Socket->RefCount)) | ||
| { |
There was a problem hiding this comment.
nit: We try to keep a consistent style. Before we conclude the PR, we will need to fix it ({ are opened on the line of the if, a few spaces issues, etc... through the PR).
I won't comment on it for now, just a todo for later.
| @@ -0,0 +1,138 @@ | |||
| <Project ToolsVersion="Current"> | |||
There was a problem hiding this comment.
File checked in by mistake?
src/platform/datapath_winrdma.c
Outdated
|
|
||
| if (RdmaConnection->QueuePair) | ||
| { | ||
| RdmaConnection->QueuePair->lpVtbl->Release(RdmaConnection->QueuePair); |
There was a problem hiding this comment.
By curiosity, what is your logic for function that your wrapped vs these direct calls?
|
|
||
| Status = NdspiCreateOverlappedFile(RdmaAdapter, &RdmaAdapter->OverlappedFile); | ||
| if (QUIC_FAILED(Status)) { | ||
| QuicTraceLogError( |
There was a problem hiding this comment.
Here (and in other occurences with wrappers), we end up logging the same error multiple time. It might be worth chosing between loging in the wrapper or out of it and systematically apply it.
| Status = QUIC_STATUS_OUT_OF_MEMORY; | ||
| goto ErrorExit; | ||
| } | ||
| memset(RdmaConnection, 0, sizeof(RDMA_CONNECTION)); |
There was a problem hiding this comment.
| memset(RdmaConnection, 0, sizeof(RDMA_CONNECTION)); | |
| CxPlatZeroMemory(RdmaConnection, sizeof(RDMA_CONNECTION)); |
| RemoteAddress ? | ||
| ((uint16_t)(CxPlatProcCurrentNumber() % Datapath->PartitionCount)) : 0; | ||
| Socket->Mtu = CXPLAT_MAX_MTU; | ||
| Socket->RecvBufLen = |
There was a problem hiding this comment.
This should probably be updated for RDMA. I don't think receive coalescing can apply
| goto ErrorExit; | ||
| } | ||
|
|
||
| if (RemoteAddress != NULL) |
There was a problem hiding this comment.
What does it mean for a client socket to not have a remote address? Is it possible / valid?
this PR is mainly for help with debugging issues with datapath tests. A New PR will be raised only the code has completed testing