summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2023-11-16 21:16:13 -0800
committerDave Wallace <dwallacelf@gmail.com>2023-11-17 12:08:58 +0000
commitcfe6462fd295b367ddb1ff7ac05a0e8bc0bd2d1f (patch)
tree9ca255bc4d4d9038fb38d9ccdcebca7e30429290 /src
parentdac9e566cd16fc375fff14280b37cb5135584fc6 (diff)
session: always clear rx evt flag on ntf
Apps may drain fifos prior to handling of accept notification, e.g., vcl session relying on epoll lt mode. Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I7d105d35a6bf33c419f4f137a5132e6a5d294fe7
Diffstat (limited to 'src')
-rw-r--r--src/vnet/session/session_input.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/vnet/session/session_input.c b/src/vnet/session/session_input.c
index 42d71819b0a..91e4b90d167 100644
--- a/src/vnet/session/session_input.c
+++ b/src/vnet/session/session_input.c
@@ -113,20 +113,22 @@ app_worker_flush_events_inline (app_worker_t *app_wrk, u32 thread_index,
{
case SESSION_IO_EVT_RX:
s = session_get (evt->session_index, thread_index);
+ s->flags &= ~SESSION_F_RX_EVT;
/* Application didn't confirm accept yet */
if (PREDICT_FALSE (s->session_state == SESSION_STATE_ACCEPTING ||
s->session_state == SESSION_STATE_CONNECTING))
break;
- s->flags &= ~SESSION_F_RX_EVT;
app->cb_fns.builtin_app_rx_callback (s);
break;
/* Handle sessions that might not be on current thread */
case SESSION_IO_EVT_BUILTIN_RX:
s = session_get_from_handle_if_valid (evt->session_handle);
- if (!s || s->session_state == SESSION_STATE_ACCEPTING ||
- s->session_state == SESSION_STATE_CONNECTING)
+ if (!s)
break;
s->flags &= ~SESSION_F_RX_EVT;
+ if (PREDICT_FALSE (s->session_state == SESSION_STATE_ACCEPTING ||
+ s->session_state == SESSION_STATE_CONNECTING))
+ break;
app->cb_fns.builtin_app_rx_callback (s);
break;
case SESSION_IO_EVT_TX: