aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2023-05-17 23:20:56 -0700
committerDave Wallace <dwallacelf@gmail.com>2023-05-19 19:31:49 +0000
commitbc4d5b0aceddc81af52afc46ce8e646749888c71 (patch)
tree1567e10ce45a8bf6ec17d76c82f208fe918299a0
parent4817855115f2dab37cad85fa8bf8ba51b3871235 (diff)
vcl: set want deq flag earlier in epoll ctl mod
On epoll ctl mod, set want deq flag before checking if unhandled events are needed. Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Id1491837c7156a66c21e0e45af60b04b1c18601c
-rw-r--r--src/vcl/vppcom.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c
index 43f6b741d0c..0b4d75765ea 100644
--- a/src/vcl/vppcom.c
+++ b/src/vcl/vppcom.c
@@ -2929,6 +2929,15 @@ vppcom_epoll_ctl (uint32_t vep_handle, int op, uint32_t session_handle,
goto done;
}
+ txf = vcl_session_is_ct (s) ? s->ct_tx_fifo : s->tx_fifo;
+ 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);
+ }
+
/* Generate EPOLLOUT if session write ready nd event was not on */
if ((event->events & EPOLLOUT) && !(s->vep.ev.events & EPOLLOUT) &&
(vcl_session_write_ready (s) > 0))
@@ -2945,14 +2954,7 @@ 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 (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;