diff options
author | Ping Yu <ping.yu@intel.com> | 2018-08-13 10:26:26 -0400 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2018-08-14 16:49:49 +0000 |
commit | 998dfd3c0fa1e25d3cea247fd9391a158108858b (patch) | |
tree | 3b9d0e49b01cc302af8f2adc5660ed58d42e9f79 /src | |
parent | 22130e163ee2fc618b6681861ab9eafbc7ebf32d (diff) |
reduce polling and resume overhead by checking if inflight request exists
Change-Id: I0777a00f0cc082bab3348be8ec0be39faa50ffed
Signed-off-by: Ping Yu <ping.yu@intel.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/tlsopenssl/tls_async.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/plugins/tlsopenssl/tls_async.c b/src/plugins/tlsopenssl/tls_async.c index 3b469b9d3c4..110a6311673 100644 --- a/src/plugins/tlsopenssl/tls_async.c +++ b/src/plugins/tlsopenssl/tls_async.c @@ -512,11 +512,14 @@ tls_async_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f) { u8 thread_index; + openssl_async_t *om = &openssl_async_main; thread_index = vlib_get_thread_index (); - openssl_async_polling (); - - tls_resume_from_crypto (thread_index); + if (pool_elts (om->evt_pool[thread_index]) > 0) + { + openssl_async_polling (); + tls_resume_from_crypto (thread_index); + } return 0; } |