From: Florin Coras Date: Wed, 26 Aug 2020 02:07:02 +0000 (-0700) Subject: session: limit max number of ct sessions per dispatch X-Git-Tag: v21.01-rc0~76 X-Git-Url: https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commitdiff_plain;h=bcdc50d9007f72a6b4e1c45b4559ed8be4fb1c10 session: limit max number of ct sessions per dispatch Type: improvement Signed-off-by: Florin Coras Change-Id: Ia67662a5b988b3b5351cea21d6d92fb3a86629b5 --- diff --git a/src/vnet/session/application_local.c b/src/vnet/session/application_local.c index decff4ef68f..cea22e3ba6e 100644 --- a/src/vnet/session/application_local.c +++ b/src/vnet/session/application_local.c @@ -587,11 +587,14 @@ ct_session_tx (session_t * s) ct = (ct_connection_t *) session_get_transport (s); peer_ct = ct_connection_get (ct->peer_index); if (!peer_ct) - return -1; + return 0; peer_s = session_get (peer_ct->c_s_index, 0); if (peer_s->session_state >= SESSION_STATE_TRANSPORT_CLOSING) return 0; - return session_enqueue_notify (peer_s); + session_enqueue_notify (peer_s); + /* The scheduler uses packet count as a means of upper bounding the amount + * of work done per dispatch. So make it look like we have sent something */ + return 1; } static clib_error_t *