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
This commit is contained in:
Florin Coras
2022-01-18 20:51:08 -08:00
committed by Damjan Marion
parent 95bbbe479e
commit b85de19145
5 changed files with 15 additions and 14 deletions

View File

@ -194,10 +194,10 @@ static int
openssl_write_from_fifo_into_ssl (svm_fifo_t *f, SSL *ssl, u32 max_len)
{
int wrote = 0, rv, i = 0, len;
const int n_segs = 2;
u32 n_segs = 2;
svm_fifo_seg_t fs[n_segs];
len = svm_fifo_segments (f, 0, fs, n_segs, max_len);
len = svm_fifo_segments (f, 0, fs, &n_segs, max_len);
if (len <= 0)
return 0;