aboutsummaryrefslogtreecommitdiffstats
path: root/src/vcl/vcl_private.h
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2023-05-29 16:19:38 -0700
committerDave Barach <vpp@barachs.net>2023-06-02 16:19:33 +0000
commit607eb203b1e954ac3f7ed82bd7bde3cf3aad60cf (patch)
tree93c847e971bb3b3c7f9d5e68c050d5d3fede13ee /src/vcl/vcl_private.h
parent645ac119e8f2602454050f5da6cafc4a22def7ff (diff)
vcl: refactor want deq ntf checks for null fifos
Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I5d0445ca381f1a4943bb2fe454433b3454043b56
Diffstat (limited to 'src/vcl/vcl_private.h')
-rw-r--r--src/vcl/vcl_private.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/vcl/vcl_private.h b/src/vcl/vcl_private.h
index dabe52c899c..39a0f05034f 100644
--- a/src/vcl/vcl_private.h
+++ b/src/vcl/vcl_private.h
@@ -666,6 +666,22 @@ vcl_session_dgram_tx_evt (vcl_session_t *s, session_evt_type_t et)
return (s->flags & VCL_SESSION_F_CONNECTED) ? et : SESSION_IO_EVT_TX_MAIN;
}
+static inline void
+vcl_session_add_want_deq_ntf (vcl_session_t *s, svm_fifo_deq_ntf_t evt)
+{
+ svm_fifo_t *txf = vcl_session_is_ct (s) ? s->ct_tx_fifo : s->tx_fifo;
+ if (txf)
+ svm_fifo_add_want_deq_ntf (txf, evt);
+}
+
+static inline void
+vcl_session_del_want_deq_ntf (vcl_session_t *s, svm_fifo_deq_ntf_t evt)
+{
+ svm_fifo_t *txf = vcl_session_is_ct (s) ? s->ct_tx_fifo : s->tx_fifo;
+ if (txf)
+ svm_fifo_del_want_deq_ntf (txf, evt);
+}
+
/*
* Helpers
*/