diff options
author | Florin Coras <fcoras@cisco.com> | 2022-02-04 13:31:25 -0800 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2022-02-05 21:19:53 +0000 |
commit | 3e157100b57237cc694ae3d002cf736b36043c3c (patch) | |
tree | ecfaa3f58fba287d3c097790c58550c7b1c418fb /src/vnet/session/session_node.c | |
parent | 6eaeea9003590ba46809c8d9f0023bbe8b78339f (diff) |
session: track bytes dequeued in snd params
Also reset send params flags before calling transports to avoid explicit
resets in all transports.
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I1da7b3fab009728e7fee4199425ced933fa8a122
Diffstat (limited to 'src/vnet/session/session_node.c')
-rw-r--r-- | src/vnet/session/session_node.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/vnet/session/session_node.c b/src/vnet/session/session_node.c index 162d54e7697..35ce091bc5a 100644 --- a/src/vnet/session/session_node.c +++ b/src/vnet/session/session_node.c @@ -1441,6 +1441,8 @@ session_tx_fifo_dequeue_internal (session_worker_t * wrk, /* Clear custom-tx flag used to request reschedule for tx */ s->flags &= ~SESSION_F_CUSTOM_TX; + sp->flags = 0; + sp->bytes_dequeued = 0; sp->max_burst_size = clib_min (SESSION_NODE_FRAME_SIZE - *n_tx_packets, TRANSPORT_PACER_MAX_BURST_PKTS); @@ -1459,8 +1461,8 @@ session_tx_fifo_dequeue_internal (session_worker_t * wrk, session_evt_add_head_old (wrk, elt); } - if (sp->max_burst_size && - svm_fifo_needs_deq_ntf (s->tx_fifo, sp->max_burst_size)) + if (sp->bytes_dequeued && + svm_fifo_needs_deq_ntf (s->tx_fifo, sp->bytes_dequeued)) session_dequeue_notify (s); return n_packets; |