diff options
author | Florin Coras <fcoras@cisco.com> | 2020-12-21 10:25:19 -0800 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2020-12-21 19:50:19 +0000 |
commit | dfd1caf24e94fc825edea6f669a4b1fbd687ed44 (patch) | |
tree | a7cdbcb98f3ce97d6ad4ec478ae95955b90681b9 /src/svm | |
parent | f9e500e81698bbe7f78f65792e934ad6a16fa602 (diff) |
svm: honor max requested bytes in fifo segments
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I00a6be53c4519937ac900560c669587921990821
Diffstat (limited to 'src/svm')
-rw-r--r-- | src/svm/svm_fifo.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/svm/svm_fifo.c b/src/svm/svm_fifo.c index ff941a7a6dd..0c08dba7aa2 100644 --- a/src/svm/svm_fifo.c +++ b/src/svm/svm_fifo.c @@ -1289,7 +1289,7 @@ svm_fifo_segments (svm_fifo_t * f, u32 offset, svm_fifo_seg_t * fs, head_pos = start - c->start_byte; fs[0].data = c->data + head_pos; - fs[0].len = clib_min (c->length - head_pos, cursize - offset); + fs[0].len = clib_min (c->length - head_pos, to_read); n_bytes = fs[0].len; while (n_bytes < to_read && fs_index < n_segs) |