aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2024-02-14 16:14:46 -0800
committerDave Wallace <dwallacelf@gmail.com>2024-03-01 14:29:11 +0000
commit7453b5dfe8a52d0e033ec675eba3ada26ba771a3 (patch)
treee99888dc60fc3e9649f0dfab3962c8250bc8503d
parent455960759b5417c767ed331748c7ee76662ffd18 (diff)
session: postpone ct cleanup if rx evt pending
Type: fix Change-Id: I8cfaa62abd38d5356263b0ffd428638d1a027617 Signed-off-by: Florin Coras <fcoras@cisco.com> (cherry picked from commit 3efcbaf3b1119b4312ae1f3a1c59dea2d746bec4)
-rw-r--r--src/vnet/session/application_local.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/vnet/session/application_local.c b/src/vnet/session/application_local.c
index 8c6cf8a93fa..5bd1471b6fc 100644
--- a/src/vnet/session/application_local.c
+++ b/src/vnet/session/application_local.c
@@ -1132,10 +1132,10 @@ ct_handle_cleanups (void *args)
clib_fifo_sub2 (wrk->pending_cleanups, req);
ct = ct_connection_get (req->ct_index, thread_index);
s = session_get (ct->c_s_index, ct->c_thread_index);
- if (!svm_fifo_has_event (s->tx_fifo))
- ct_session_postponed_cleanup (ct);
- else
+ if (svm_fifo_has_event (s->tx_fifo) || (s->flags & SESSION_F_RX_EVT))
clib_fifo_add1 (wrk->pending_cleanups, *req);
+ else
+ ct_session_postponed_cleanup (ct);
n_to_handle -= 1;
}
@@ -1411,6 +1411,7 @@ ct_session_tx (session_t * s)
peer_s = session_get (peer_ct->c_s_index, peer_ct->c_thread_index);
if (peer_s->session_state >= SESSION_STATE_TRANSPORT_CLOSING)
return 0;
+ peer_s->flags |= SESSION_F_RX_EVT;
return session_enqueue_notify (peer_s);
}