summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFan Zhang <roy.fan.zhang@intel.com>2020-11-18 09:46:39 +0000
committerDamjan Marion <dmarion@me.com>2020-12-01 08:02:06 +0000
commit153e41a331e7894dc3284bbfa41d9bd839e73a41 (patch)
tree352d7ce237362ead8a275007942c9275e760e351
parentbb7991a037a23eb966aee2d6f8069353c6a64c94 (diff)
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 <roy.fan.zhang@intel.com> Change-Id: I48de0bb2c57dbb09cfab63925bf8dc96613d8bcf
-rw-r--r--src/vnet/ipsec/esp_decrypt.c2
-rw-r--r--src/vnet/ipsec/esp_encrypt.c2
2 files changed, 2 insertions, 2 deletions
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,
'n199' href='#n199'>199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344