diff options
author | Florin Coras <fcoras@cisco.com> | 2023-05-29 16:19:38 -0700 |
---|---|---|
committer | Dave Barach <vpp@barachs.net> | 2023-06-02 16:19:33 +0000 |
commit | 607eb203b1e954ac3f7ed82bd7bde3cf3aad60cf (patch) | |
tree | 93c847e971bb3b3c7f9d5e68c050d5d3fede13ee /src/vcl/vcl_private.h | |
parent | 645ac119e8f2602454050f5da6cafc4a22def7ff (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.h | 16 |
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 */ |