summaryrefslogtreecommitdiffstats
path: root/src/vcl/vcl_private.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vcl/vcl_private.c')
-rw-r--r--src/vcl/vcl_private.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vcl/vcl_private.c b/src/vcl/vcl_private.c
index 14582ce025d..300b82c4f21 100644
--- a/src/vcl/vcl_private.c
+++ b/src/vcl/vcl_private.c
@@ -390,6 +390,15 @@ vcl_session_write_ready (vcl_session_t * session)
if (vcl_session_is_ct (session))
return svm_fifo_max_enqueue_prod (session->ct_tx_fifo);
+ if (session->is_dgram)
+ {
+ u32 max_enq = svm_fifo_max_enqueue_prod (session->tx_fifo);
+
+ if (max_enq <= sizeof (session_dgram_hdr_t))
+ return 0;
+ return max_enq - sizeof (session_dgram_hdr_t);
+ }
+
return svm_fifo_max_enqueue_prod (session->tx_fifo);
}