From e3c6a54995b052045709b1d80039eede1757f43f Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Wed, 19 May 2021 19:28:40 -0700 Subject: tls svm: prealloc tcp fifo chunks before ssl write Type: improvement Signed-off-by: Florin Coras Change-Id: I7c47b55ec6f0c83f2d13e0e737d0559a32f7c837 --- src/svm/svm_fifo.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/svm') diff --git a/src/svm/svm_fifo.c b/src/svm/svm_fifo.c index 14eeb1c0802..2150694ef46 100644 --- a/src/svm/svm_fifo.c +++ b/src/svm/svm_fifo.c @@ -1257,6 +1257,9 @@ svm_fifo_provision_chunks (svm_fifo_t *f, svm_fifo_seg_t *fs, u32 n_segs, if (n_avail < len && f_try_chunk_alloc (f, head, tail, len)) return SVM_FIFO_EGROW; + if (!fs || !n_segs) + return 0; + c = f_tail_cptr (f); head_pos = (tail - c->start_byte); fs[0].data = c->data + head_pos; -- cgit 1.2.3-korg