From: Fan Zhang Date: Wed, 18 Nov 2020 09:46:39 +0000 (+0000) Subject: ipsec: change prediction X-Git-Tag: v21.06-rc0~92 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=153e41a331e7894dc3284bbfa41d9bd839e73a41;hp=bb7991a037a23eb966aee2d6f8069353c6a64c94;p=vpp.git ipsec: change prediction Type: improvement This patch changes the prediction of the comparison between SA owner thread index and the current thread index. Signed-off-by: Fan Zhang Change-Id: I48de0bb2c57dbb09cfab63925bf8dc96613d8bcf --- diff --git a/src/vnet/ipsec/esp_decrypt.c b/src/vnet/ipsec/esp_decrypt.c index 879e8f4fb73..a8d890bd2e7 100644 --- a/src/vnet/ipsec/esp_decrypt.c +++ b/src/vnet/ipsec/esp_decrypt.c @@ -1117,7 +1117,7 @@ esp_decrypt_inline (vlib_main_t * vm, ipsec_sa_assign_thread (thread_index)); } - if (PREDICT_TRUE (thread_index != sa0->decrypt_thread_index)) + if (PREDICT_FALSE (thread_index != sa0->decrypt_thread_index)) { esp_set_next_index (is_async, from, nexts, from[b - bufs], &n_async_drop, ESP_DECRYPT_NEXT_HANDOFF, next); diff --git a/src/vnet/ipsec/esp_encrypt.c b/src/vnet/ipsec/esp_encrypt.c index ed49cdc97eb..a2316944acd 100644 --- a/src/vnet/ipsec/esp_encrypt.c +++ b/src/vnet/ipsec/esp_encrypt.c @@ -669,7 +669,7 @@ esp_encrypt_inline (vlib_main_t * vm, vlib_node_runtime_t * node, ipsec_sa_assign_thread (thread_index)); } - if (PREDICT_TRUE (thread_index != sa0->encrypt_thread_index)) + if (PREDICT_FALSE (thread_index != sa0->encrypt_thread_index)) { esp_set_next_index (is_async, from, nexts, from[b - bufs], &n_async_drop,