X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvcl%2Fvppcom.c;h=d51f69f8a4168194e2f6f98f263c544da2e8edfc;hb=c2a1417c5af9f29a0f267e49cfd164aa3085842c;hp=e3fb14fa4e5ab138e217cdc4e64478e0aeba0d0d;hpb=56bfc63b289cbf7e7f8ebf5bee97d7f2ec78ae1a;p=vpp.git diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c index e3fb14fa4e5..d51f69f8a41 100644 --- a/src/vcl/vppcom.c +++ b/src/vcl/vppcom.c @@ -1465,6 +1465,8 @@ vcl_epoll_lt_add (vcl_worker_t *wrk, vcl_session_t *s) { vcl_session_t *cur, *prev; + ASSERT (s->vep.lt_next == VCL_INVALID_SESSION_INDEX); + if (wrk->ep_lt_current == VCL_INVALID_SESSION_INDEX) { wrk->ep_lt_current = s->session_index; @@ -1488,10 +1490,13 @@ vcl_epoll_lt_del (vcl_worker_t *wrk, vcl_session_t *s) { vcl_session_t *prev, *next; + ASSERT (s->vep.lt_next != VCL_INVALID_SESSION_INDEX); + if (s->vep.lt_next == s->session_index) { wrk->ep_lt_current = VCL_INVALID_SESSION_INDEX; s->vep.lt_next = VCL_INVALID_SESSION_INDEX; + s->vep.lt_prev = VCL_INVALID_SESSION_INDEX; return; } @@ -1505,6 +1510,7 @@ vcl_epoll_lt_del (vcl_worker_t *wrk, vcl_session_t *s) wrk->ep_lt_current = s->vep.lt_next; s->vep.lt_next = VCL_INVALID_SESSION_INDEX; + s->vep.lt_prev = VCL_INVALID_SESSION_INDEX; } int @@ -2761,7 +2767,8 @@ vcl_epoll_ctl_add_unhandled_event (vcl_worker_t *wrk, vcl_session_t *s, { if (!is_epollet) { - vcl_epoll_lt_add (wrk, s); + if (s->vep.lt_next == VCL_INVALID_SESSION_INDEX) + vcl_epoll_lt_add (wrk, s); return; }