From: Piotr Bronowski Date: Sun, 2 Mar 2025 21:45:55 +0000 (+0000) Subject: crypto-ipsecmb: call init_mb_mgr_auto instead of the logic implemented on the plugin... X-Git-Tag: v25.10-rc0~71 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F47%2F42447%2F3;p=vpp.git crypto-ipsecmb: call init_mb_mgr_auto instead of the logic implemented on the plugin side This patch replaces logic for calling init version with the supported vector instruction set for a given processor family in the plugin with the call to init_mb_mgr_auto, which correctly implements it on the ipsecmb engine side. Type: improvement Change-Id: I43e502f622f5cc5613917e1c5c943c0ff27d8982 Signed-off-by: Piotr Bronowski --- diff --git a/src/crypto_engines/ipsecmb/ipsecmb.c b/src/crypto_engines/ipsecmb/ipsecmb.c index 9981d738401..3006c5294d5 100644 --- a/src/crypto_engines/ipsecmb/ipsecmb.c +++ b/src/crypto_engines/ipsecmb/ipsecmb.c @@ -861,6 +861,7 @@ crypto_ipsecmb_init (vnet_crypto_engine_registration_t *r) ipsecmb_alg_data_t *ad; ipsecmb_per_thread_data_t *ptd; IMB_MGR *m = 0; + IMB_ARCH arch; if (!clib_cpu_supports_aes ()) return "AES ISA not available on this CPU"; @@ -875,12 +876,8 @@ crypto_ipsecmb_init (vnet_crypto_engine_registration_t *r) clib_memset_u8 (ptd->burst_jobs, 0, sizeof (IMB_JOB) * IMB_MAX_BURST_SIZE); #endif - if (clib_cpu_supports_avx512f ()) - init_mb_mgr_avx512 (ptd->mgr); - else if (clib_cpu_supports_avx2 () && clib_cpu_supports_bmi2 ()) - init_mb_mgr_avx2 (ptd->mgr); - else - init_mb_mgr_sse (ptd->mgr); + + init_mb_mgr_auto (ptd->mgr, &arch); if (ptd == imbm->per_thread_data) m = ptd->mgr;