summaryrefslogtreecommitdiffstats
path: root/src/vcl
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2023-08-27 23:14:50 -0700
committerDave Wallace <dwallacelf@gmail.com>2023-09-01 02:31:42 +0000
commitda652cc46604f5c98736404a2342ac3a178240e7 (patch)
tree577f3bfcefdcdfd34a1983ef371c745e622abdf8 /src/vcl
parentf234b0d4626d7e686422cc9dfd25958584f4931e (diff)
vcl: set min threshold for tx ntf
Make sure there's at least 3% space in the tx fifo before notifying vcl of a tx event. The threshold is somewhat arbibrary but for a 4M fifo, it now means that ~120kB of space should be available. Should help minimize the amount of tx notifications generated by session layer when apps are faster. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I11dd0931dca8f989000a2481f1f495bd267589c4
Diffstat (limited to 'src/vcl')
-rw-r--r--src/vcl/vcl_private.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/vcl/vcl_private.h b/src/vcl/vcl_private.h
index 8345e34e0c1..41a11b7123f 100644
--- a/src/vcl/vcl_private.h
+++ b/src/vcl/vcl_private.h
@@ -675,7 +675,11 @@ vcl_session_add_want_deq_ntf (vcl_session_t *s, svm_fifo_deq_ntf_t evt)
{
svm_fifo_t *txf = vcl_session_is_ct (s) ? s->ct_tx_fifo : s->tx_fifo;
if (txf)
- svm_fifo_add_want_deq_ntf (txf, evt);
+ {
+ svm_fifo_add_want_deq_ntf (txf, evt);
+ /* Request tx notification only if 3% of fifo is empty */
+ svm_fifo_set_deq_thresh (txf, 0.03 * svm_fifo_size (txf));
+ }
}
static inline void