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
6cce5d92
Commit
6cce5d92
authored
Jan 30, 2024
by
Titouan Soulard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libcapulet: handle recvfrom errors
parent
b34accde
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
include/libcapulet/net_udp.h
include/libcapulet/net_udp.h
+0
-4
libcapulet/net_udp.c
libcapulet/net_udp.c
+6
-1
No files found.
include/libcapulet/net_udp.h
View file @
6cce5d92
...
...
@@ -14,10 +14,6 @@
#include "common/hashtable.h"
#define CAP_QP_INFO_PTYPE 0x01
#define CAP_MR_QUERY_PTYPE 0x10
#define CAP_MR_INFO_PTYPE 0x11
struct
CapuletRdmaMrMgr
;
struct
CapuletNetUdpQpInfoPacket
{
...
...
libcapulet/net_udp.c
View file @
6cce5d92
...
...
@@ -80,17 +80,22 @@ bool capulet_net_udp_serve_mr(struct CommonHashtableTable *hashtable, int server
struct
CommonHashtableElement
*
el
;
struct
ibv_mr
*
mr
;
ssize_t
recv_size
;
size_t
buffer_size
;
uint8_t
receive_buffer
[
256
];
while
(
1
)
{
// No need to go too fast, and CPU time is better used anywhere else
usleep
(
10
);
buffer_size
=
sizeof
(
struct
CapuletNetUdpMrQueryPacket
);
recvfrom
(
server_socket
,
receive_buffer
,
buffer_size
,
0
,
&
client_addr
,
&
client_addr_size
);
recv
_size
=
recv
from
(
server_socket
,
receive_buffer
,
buffer_size
,
0
,
&
client_addr
,
&
client_addr_size
);
memcpy
((
void
*
)
&
mr_query_pkt
,
(
void
*
)
receive_buffer
,
buffer_size
);
buffer_size
=
sizeof
(
struct
CapuletNetUdpMrInfoPacket
);
memset
(
&
mr_info_pkt
,
0
,
buffer_size
);
if
(
recv_size
==
-
1
)
return
false
;
el
=
common_hashtable_find
(
hashtable
,
mr_query_pkt
.
name
);
if
(
el
)
{
...
...
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