svm: update number of segments in svm_fifo_segments
In addition to returning the number of bytes also update the number of
segments to reflect the number used.
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ia87dc2aa62cea38b18dfa83df94dc2abe29d5121
diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c
index 44543bb..4a6c46b 100644
--- a/src/vcl/vppcom.c
+++ b/src/vcl/vppcom.c
@@ -2084,7 +2084,7 @@
}
n_read = svm_fifo_segments (rx_fifo, s->rx_bytes_pending,
- (svm_fifo_seg_t *) ds, n_segments, max_bytes);
+ (svm_fifo_seg_t *) ds, &n_segments, max_bytes);
if (n_read < 0)
return VPPCOM_EAGAIN;