diff options
author | Florin Coras <fcoras@cisco.com> | 2021-05-19 19:28:40 -0700 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2021-05-20 10:03:57 +0000 |
commit | e3c6a54995b052045709b1d80039eede1757f43f (patch) | |
tree | 0be3cb21df3fc374f5f1ee70de47ae997d384de7 /src/svm | |
parent | 05bc33c15d814409933d741f6c88c450c4392fc9 (diff) |
tls svm: prealloc tcp fifo chunks before ssl write
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I7c47b55ec6f0c83f2d13e0e737d0559a32f7c837
Diffstat (limited to 'src/svm')
-rw-r--r-- | src/svm/svm_fifo.c | 3 |
1 files changed, 3 insertions, 0 deletions
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; |