diff options
author | Dimitri Staessens <dimitri.staessens@ugent.be> | 2018-04-02 19:16:01 +0200 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@ugent.be> | 2018-04-05 10:32:55 +0200 |
commit | 490145fc49bc55280ebf16229d3e78419ec251c6 (patch) | |
tree | 899995c4a66c590db776fbcf09150f8b6976b725 /src/lib/shm_rdrbuff.c | |
parent | 458e610a988d6c0db332b607250e75a94f0b2c03 (diff) | |
download | ouroboros-490145fc49bc55280ebf16229d3e78419ec251c6.tar.gz ouroboros-490145fc49bc55280ebf16229d3e78419ec251c6.zip |
ipcpd: Avoid unnecessary copy in eth reader
This reads from the Ethernet device directly into the rdrbuff to avoid
a copy on the read side in the Ethernet IPCPs. This does not work for
the netmap device.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
Diffstat (limited to 'src/lib/shm_rdrbuff.c')
-rw-r--r-- | src/lib/shm_rdrbuff.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/shm_rdrbuff.c b/src/lib/shm_rdrbuff.c index 6e3dbca4..12e29bef 100644 --- a/src/lib/shm_rdrbuff.c +++ b/src/lib/shm_rdrbuff.c @@ -652,5 +652,5 @@ void shm_du_buff_truncate(struct shm_du_buff * sdb, assert(sdb); assert(len <= sdb->size); - sdb->du_tail -= sdb->size - len; + sdb->du_tail = sdb->du_head + len; } |