diff options
author | Florin Coras <fcoras@cisco.com> | 2020-08-25 19:07:02 -0700 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2020-08-27 10:35:48 +0000 |
commit | bcdc50d9007f72a6b4e1c45b4559ed8be4fb1c10 (patch) | |
tree | d731ff04997f5efb295c0f69d5989213ef5ff551 | |
parent | e2f5236dc521f64c8ea08dc84893ff81f9ac7232 (diff) |
session: limit max number of ct sessions per dispatch
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ia67662a5b988b3b5351cea21d6d92fb3a86629b5
-rw-r--r-- | src/vnet/session/application_local.c | 7 |
1 files changed, 5 insertions, 2 deletions
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 * |