projects
/
can-benchmark.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
18fae62
)
Limit socket recv buf size - to not have so big latencies
author
Michal Sojka
<sojkam1@fel.cvut.cz>
Mon, 20 Jan 2014 09:17:02 +0000
(10:17 +0100)
committer
Michal Sojka
<sojkam1@fel.cvut.cz>
Mon, 20 Jan 2014 09:17:02 +0000
(10:17 +0100)
ugw/ugw.c
patch
|
blob
|
history
diff --git
a/ugw/ugw.c
b/ugw/ugw.c
index
243fc5a
..
876d9ce
100644
(file)
--- a/
ugw/ugw.c
+++ b/
ugw/ugw.c
@@
-104,6
+104,9
@@
void init_read(struct in_ctx *ctx)
s = CHECK(socket(PF_CAN, SOCK_RAW, CAN_RAW));
+ int rcvbuf = 25000; /* Limit rcvbuf to not have so big queueing latencies */
+ CHECK(setsockopt(s, SOL_SOCKET, SO_RCVBUF, &rcvbuf, sizeof(rcvbuf)));
+
if (nonblocking) {
int flags = CHECK(fcntl(s, F_GETFL, 0));
CHECK(fcntl(s, F_SETFL, flags | O_NONBLOCK));