summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session_node.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/session/session_node.c')
-rw-r--r--src/vnet/session/session_node.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/vnet/session/session_node.c b/src/vnet/session/session_node.c
index 30eca1e6577..f023a95c98c 100644
--- a/src/vnet/session/session_node.c
+++ b/src/vnet/session/session_node.c
@@ -872,7 +872,8 @@ session_tx_fifo_read_and_snd_i (session_worker_t * wrk,
{
u32 n_custom_tx;
ctx->s->flags &= ~SESSION_F_CUSTOM_TX;
- n_custom_tx = ctx->transport_vft->custom_tx (ctx->tc, max_burst);
+ ctx->sp.max_burst_size = max_burst;
+ n_custom_tx = ctx->transport_vft->custom_tx (ctx->tc, &ctx->sp);
*n_tx_packets += n_custom_tx;
if (PREDICT_FALSE
(ctx->s->session_state >= SESSION_STATE_TRANSPORT_CLOSED))
@@ -1068,8 +1069,9 @@ session_tx_fifo_dequeue_internal (session_worker_t * wrk,
vlib_node_runtime_t * node,
session_evt_elt_t * elt, int *n_tx_packets)
{
+ transport_send_params_t *sp = &wrk->ctx.sp;
session_t *s = wrk->ctx.s;
- u32 n_packets, max_pkts;
+ u32 n_packets;
if (PREDICT_FALSE (s->session_state >= SESSION_STATE_TRANSPORT_CLOSED))
return 0;
@@ -1077,18 +1079,17 @@ 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;
- max_pkts = clib_min (VLIB_FRAME_SIZE - *n_tx_packets,
- TRANSPORT_PACER_MAX_BURST_PKTS);
- n_packets = transport_custom_tx (session_get_transport_proto (s), s,
- max_pkts);
- *n_tx_packets -= n_packets;
+ sp->max_burst_size = clib_min (VLIB_FRAME_SIZE - *n_tx_packets,
+ TRANSPORT_PACER_MAX_BURST_PKTS);
- if (svm_fifo_max_dequeue_cons (s->tx_fifo)
- || (s->flags & SESSION_F_CUSTOM_TX))
+ n_packets = transport_custom_tx (session_get_transport_proto (s), s, sp);
+ *n_tx_packets += n_packets;
+
+ if (s->flags & SESSION_F_CUSTOM_TX)
{
session_evt_add_old (wrk, elt);
}
- else
+ else if (!(sp->flags & TRANSPORT_SND_F_DESCHED))
{
svm_fifo_unset_event (s->tx_fifo);
if (svm_fifo_max_dequeue_cons (s->tx_fifo))