aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-12-03 18:19:39 -0800
committerDave Barach <openvpp@barachs.net>2020-12-04 18:30:56 +0000
commit7a105fdad6d44519fd31beb15fdc1c79fdd82e6f (patch)
treed6865ed209d7aefe6c3bf2a548ab148099a339f1
parenta17381a41d17fd813df77b97102b18127731b013 (diff)
udp session: fix deq notification for dgrams
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I1440c11fb9d962a05d877aebb4de364c86f9953e
-rw-r--r--src/vnet/session/session_node.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vnet/session/session_node.c b/src/vnet/session/session_node.c
index 12080122c8e..2fde85b03ec 100644
--- a/src/vnet/session/session_node.c
+++ b/src/vnet/session/session_node.c
@@ -1128,7 +1128,10 @@ session_tx_fifo_read_and_snd_i (session_worker_t * wrk,
if (!peek_data)
{
- if (svm_fifo_needs_deq_ntf (ctx->s->tx_fifo, ctx->max_len_to_snd))
+ u32 n_dequeued = ctx->max_len_to_snd;
+ if (ctx->transport_vft->transport_options.tx_type == TRANSPORT_TX_DGRAM)
+ n_dequeued += ctx->n_segs_per_evt * SESSION_CONN_HDR_LEN;
+ if (svm_fifo_needs_deq_ntf (ctx->s->tx_fifo, n_dequeued))
session_dequeue_notify (ctx->s);
}
return SESSION_TX_OK;