aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2022-01-09 19:03:09 -0800
committerFlorin Coras <florin.coras@gmail.com>2022-01-10 03:13:17 +0000
commit2b4f74ff9a48bfb1c764a4d23e00982ab347f1c3 (patch)
tree4145e07e4040644bf27b37bb496f38595f20b034 /src
parent9bd71be3eef15fa7a037debf9713f7d8db62935f (diff)
session: allow pacer to send when bucket hits 0
So after bucket reset session can send max burst of bytes. Also, reset pacer bucket to 0 not min burst Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Iced8948c407e6647e6eb4caff5c62c06d45ce0bf
Diffstat (limited to 'src')
-rw-r--r--src/vnet/session/transport.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vnet/session/transport.c b/src/vnet/session/transport.c
index e4d84a3e209..5d03a4f8453 100644
--- a/src/vnet/session/transport.c
+++ b/src/vnet/session/transport.c
@@ -668,7 +668,7 @@ spacer_max_burst (spacer_t * pacer, clib_us_time_t time_now)
pacer->bucket = clib_min (pacer->bucket + inc, (i64) pacer->max_burst);
}
- return pacer->bucket > 0 ? pacer->max_burst : 0;
+ return pacer->bucket >= 0 ? pacer->max_burst : 0;
}
static inline void
@@ -790,7 +790,7 @@ void
transport_connection_reschedule (transport_connection_t * tc)
{
tc->flags &= ~TRANSPORT_CONNECTION_F_DESCHED;
- transport_connection_tx_pacer_reset_bucket (tc, TRANSPORT_PACER_MIN_BURST);
+ transport_connection_tx_pacer_reset_bucket (tc, 0 /* bucket */);
if (transport_max_tx_dequeue (tc))
sesssion_reschedule_tx (tc);
else