summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2021-02-17 17:35:32 -0800
committerDave Barach <openvpp@barachs.net>2021-02-18 15:38:37 +0000
commit8fb22fdade3633f1116c44b913934fcffe0d861b (patch)
tree857ff1f60508978e3979aee60f523962517c2ba5
parent89ece7dba33f87a69350406a9bfd0ad7976544e0 (diff)
vcl: epoll out deq notifications only if fifo exists
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ia37d8474224f6074826c9ffb82feb919b2ef52f7
-rw-r--r--src/vcl/vppcom.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c
index 80f0ad7b202..b576e1a8dd3 100644
--- a/src/vcl/vppcom.c
+++ b/src/vcl/vppcom.c
@@ -2658,10 +2658,13 @@ vppcom_epoll_ctl (uint32_t vep_handle, int op, uint32_t session_handle,
s->vep.et_mask = VEP_DEFAULT_ET_MASK;
s->vep.ev = *event;
txf = vcl_session_is_ct (s) ? s->ct_tx_fifo : s->tx_fifo;
- if (event->events & EPOLLOUT)
- svm_fifo_add_want_deq_ntf (txf, SVM_FIFO_WANT_DEQ_NOTIF_IF_FULL);
- else
- svm_fifo_del_want_deq_ntf (txf, SVM_FIFO_WANT_DEQ_NOTIF_IF_FULL);
+ if (txf)
+ {
+ if (event->events & EPOLLOUT)
+ svm_fifo_add_want_deq_ntf (txf, SVM_FIFO_WANT_DEQ_NOTIF_IF_FULL);
+ else
+ svm_fifo_del_want_deq_ntf (txf, SVM_FIFO_WANT_DEQ_NOTIF_IF_FULL);
+ }
VDBG (1, "EPOLL_CTL_MOD: vep_sh %u, sh %u, events 0x%x, data 0x%llx!",
vep_handle, session_handle, event->events, event->data.u64);
break;