Skip to content

Commit bc4d5b0

Browse files
florincorasdwallacelf
authored andcommitted
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
1 parent 4817855 commit bc4d5b0

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/vcl/vppcom.c

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2929,6 +2929,15 @@ vppcom_epoll_ctl (uint32_t vep_handle, int op, uint32_t session_handle,
29292929
goto done;
29302930
}
29312931

2932+
txf = vcl_session_is_ct (s) ? s->ct_tx_fifo : s->tx_fifo;
2933+
if (txf)
2934+
{
2935+
if (event->events & EPOLLOUT)
2936+
svm_fifo_add_want_deq_ntf (txf, SVM_FIFO_WANT_DEQ_NOTIF_IF_FULL);
2937+
else
2938+
svm_fifo_del_want_deq_ntf (txf, SVM_FIFO_WANT_DEQ_NOTIF_IF_FULL);
2939+
}
2940+
29322941
/* Generate EPOLLOUT if session write ready nd event was not on */
29332942
if ((event->events & EPOLLOUT) && !(s->vep.ev.events & EPOLLOUT) &&
29342943
(vcl_session_write_ready (s) > 0))
@@ -2945,14 +2954,7 @@ vppcom_epoll_ctl (uint32_t vep_handle, int op, uint32_t session_handle,
29452954
}
29462955
s->vep.et_mask = VEP_DEFAULT_ET_MASK;
29472956
s->vep.ev = *event;
2948-
txf = vcl_session_is_ct (s) ? s->ct_tx_fifo : s->tx_fifo;
2949-
if (txf)
2950-
{
2951-
if (event->events & EPOLLOUT)
2952-
svm_fifo_add_want_deq_ntf (txf, SVM_FIFO_WANT_DEQ_NOTIF_IF_FULL);
2953-
else
2954-
svm_fifo_del_want_deq_ntf (txf, SVM_FIFO_WANT_DEQ_NOTIF_IF_FULL);
2955-
}
2957+
29562958
VDBG (1, "EPOLL_CTL_MOD: vep_sh %u, sh %u, events 0x%x, data 0x%llx!",
29572959
vep_handle, session_handle, event->events, event->data.u64);
29582960
break;

0 commit comments

Comments
 (0)