projects
/
barrelfish
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
02b00dc
)
networking: interface raw define batch size for adding rx descriptors
author
Roni Häcki
<roni.haecki@inf.ethz.ch>
Wed, 3 May 2017 14:41:11 +0000 (16:41 +0200)
committer
Roni Häcki
<roni.haecki@inf.ethz.ch>
Wed, 3 May 2017 14:41:11 +0000 (16:41 +0200)
Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>
lib/net_interfaces/interface_raw.c
patch
|
blob
|
history
diff --git
a/lib/net_interfaces/interface_raw.c
b/lib/net_interfaces/interface_raw.c
index
a917062
..
6e663c1
100644
(file)
--- a/
lib/net_interfaces/interface_raw.c
+++ b/
lib/net_interfaces/interface_raw.c
@@
-28,6
+28,7
@@
#define MAX_SERVICE_NAME_LEN 256 // Max len that a name of service can have
#define BUFFER_SIZE 2048
#define BUFFER_COUNT ((128*1024*1024) / BUFFER_SIZE)
+#define BATCH_SIZE 32
static uint64_t queue_id = 0;
static uint64_t card_mac = -1ULL;
@@
-82,10
+83,11
@@
errval_t buffer_rx_add(size_t idx)
}
batch_rx++;
- if (batch_rx > 31) {
+ if (batch_rx > BATCH_SIZE) {
err = devq_notify(devq);
batch_rx = 0;
}
+
return err;
}