Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
rdma-mwe
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Titouan Soulard
rdma-mwe
Commits
b1145888
Commit
b1145888
authored
Feb 14, 2024
by
Titouan Soulard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libtrx: fill RDMA Recv queue
parent
8761063e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
libtrx/trx_rdma.c
libtrx/trx_rdma.c
+10
-3
No files found.
libtrx/trx_rdma.c
View file @
b1145888
...
...
@@ -13,13 +13,13 @@ void *trx_rdma_recv_thread(void *context) {
in_data
=
(
struct
SDRMemoryRegion
*
)
sdr_context
->
in_mr
->
addr
;
while
(
1
)
{
// Post a Recv request and poll for completion
capulet_rdma_ib_post_recv
(
&
sdr_context
->
ib_ctx
,
sdr_context
->
in_mr
,
sizeof
(
struct
SDRMemoryRegion
));
do
{
result
=
ibv_poll_cq
(
sdr_context
->
ib_ctx
.
recv_cq
,
1
,
&
poll_wc
);
}
while
(
result
==
0
);
// Post a Recv request and poll for completion
capulet_rdma_ib_post_recv
(
&
sdr_context
->
ib_ctx
,
sdr_context
->
in_mr
,
sizeof
(
struct
SDRMemoryRegion
));
// Copy data from RDMA buffer to local buffer
sample_count
=
in_data
->
meta
.
sample_count
;
// XXX: should handle multiple channels
...
...
@@ -121,6 +121,13 @@ int trx_rdma_start(TRXState *s, const TRXDriverParams2 *p) {
result
=
capulet_rdma_ib_set_peer_from_udp
(
&
sdr_context
->
ib_ctx
,
sdr_context
->
udp_ctx
);
if
(
!
result
)
return
-
1
;
// Fill the Recv queue
for
(
int
i
=
0
;
i
<
16
;
i
++
)
{
capulet_rdma_ib_post_recv
(
&
sdr_context
->
ib_ctx
,
sdr_context
->
in_mr
,
sizeof
(
struct
SDRMemoryRegion
));
}
usleep
(
1000
);
// Samples will be received (and sent) using a separate thread which manipulates a finite circular
// buffer. The size of the buffer depends on the latency of the network.
sdr_context
->
recv_buffer
=
common_circular_buffer_create
(
TRX_RDMA_BUFFER_SAMPLES
*
sizeof
(
TRXComplex
),
false
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment