diff --git a/perf/ipsec_perf.c b/perf/ipsec_perf.c index 8ce1c71ab8d7d2d6b60c6e2a8070040073ea4cfe..61a64cd3b73aa419aafb88ceadd7bb41a7a8a2ba 100644 --- a/perf/ipsec_perf.c +++ b/perf/ipsec_perf.c @@ -1766,7 +1766,6 @@ do_test_quic_aes_ecb_hp(struct params_s *params, const uint32_t num_iter, IMB_MG return time / num_iter; } -#endif /* __aarch64__ */ static uint64_t do_test_quic_chacha20_hp(struct params_s *params, const uint32_t num_iter, IMB_MGR *p_mgr, @@ -1821,6 +1820,7 @@ do_test_quic_chacha20_hp(struct params_s *params, const uint32_t num_iter, IMB_M return time / num_iter; } +#endif /* __aarch64__ */ /* Performs test using AES_HMAC or DOCSIS */ static uint64_t diff --git a/test/kat-app/api_test.c b/test/kat-app/api_test.c index f4b0d19034f13049deb4f476bce1b6c5497546e1..058790b60ba0435c49ff566885f0dad61e721727 100644 --- a/test/kat-app/api_test.c +++ b/test/kat-app/api_test.c @@ -711,9 +711,6 @@ test_burst_api(struct IMB_MGR *mb_mgr) uint32_t i, completed_jobs, n_jobs = MAX_BURST_JOBS; struct IMB_JOB **null_jobs = NULL; int err; -#ifdef __aarch64__ - int earliest_job, next_job; -#endif printf("SUBMIT_BURST() API behavior test:\n"); @@ -776,6 +773,10 @@ test_burst_api(struct IMB_MGR *mb_mgr) print_progress(); } + /* from this point IMB_CIPHER_ZUC_EEA3 will be used instead of + * IMB_CIPHER_CBC for aarch64, since IMB_CIPHER_CBC is not + * supported for aarch64 */ + /* ======== test 4 : invalid job order */ while (IMB_GET_NEXT_BURST(mb_mgr, n_jobs, jobs) < n_jobs) @@ -862,37 +863,6 @@ test_burst_api(struct IMB_MGR *mb_mgr) if (!quiet_mode) printf("\n"); -#ifdef __aarch64__ - if ((mb_mgr->features & IMB_FEATURE_SAFE_PARAM) == 0) { - /* ======== test 6: full job queue wprapping around */ - earliest_job = mb_mgr->earliest_job; - next_job = mb_mgr->next_job; - /* simulate mb_mgr job queue being almost full of jobs that are still processing */ - mb_mgr->earliest_job = mb_mgr->next_job = 0; - /* mark one job as complete, so SUBMIT_BURST has something to return */ - mb_mgr->jobs[0].status = IMB_STATUS_COMPLETED; - for (i = 1; i < IMB_MAX_JOBS; i++) { - mb_mgr->jobs[i].status = IMB_STATUS_BEING_PROCESSED; - } - /* just collect completions */ - IMB_SUBMIT_BURST_NOCHECK(mb_mgr, 0, jobs); - - /* ensure that mbr_mgr job buffer was not marked as "empty" in the process */ - if (mb_mgr->earliest_job == -1) { - printf("%s: test %d, job buffer unexpectedly marked 'empty'\n", __func__, - TEST_INVALID_BURST); - return 1; - } - /* restore job queue state */ - for (i = 0; i < IMB_MAX_JOBS; i++) { - mb_mgr->jobs[i].status = IMB_STATUS_COMPLETED; - } - mb_mgr->earliest_job = earliest_job; - mb_mgr->next_job = next_job; - - return 0; - } -#else /* ======== test 6: full job queue wrapping around */ struct IMB_JOB *burst_jobs[IMB_MAX_BURST_SIZE] = { NULL }; @@ -916,11 +886,20 @@ test_burst_api(struct IMB_MGR *mb_mgr) return 1; } + /* using IMB_CIPHER_SNOW3G_UEA2_BITLEN instead of IMB_CIPHER_ZUC_EEA3 + * for the aarch64 in the following case to have succesful validation + * of msg_len_to_cipher_in_bytes for the first job */ + /* fill in valid jobs */ for (i = 0; i < num_jobs; i++) { job = burst_jobs[i]; +#ifndef __aarch64__ fill_in_job(job, IMB_CIPHER_CBC, IMB_DIR_ENCRYPT, IMB_AUTH_NULL, IMB_ORDER_CIPHER_HASH, NULL, NULL); +#else /* __aarch64__ */ + fill_in_job(job, IMB_CIPHER_SNOW3G_UEA2_BITLEN, IMB_DIR_ENCRYPT, IMB_AUTH_NULL, + IMB_ORDER_CIPHER_HASH, NULL, NULL); +#endif /* __aarch64__ */ imb_set_session(mb_mgr, job); } @@ -974,8 +953,13 @@ test_burst_api(struct IMB_MGR *mb_mgr) /* fill in valid jobs */ for (i = 0; i < num_jobs; i++) { job = burst_jobs[i]; +#ifndef __aarch64__ fill_in_job(job, IMB_CIPHER_CBC, IMB_DIR_ENCRYPT, IMB_AUTH_NULL, IMB_ORDER_CIPHER_HASH, NULL, NULL); +#else /* __aarch64__ */ + fill_in_job(job, IMB_CIPHER_ZUC_EEA3, IMB_DIR_ENCRYPT, IMB_AUTH_NULL, + IMB_ORDER_CIPHER_HASH, NULL, NULL); +#endif /* __aarch64__ */ imb_set_session(mb_mgr, job); } @@ -1033,7 +1017,7 @@ test_burst_api(struct IMB_MGR *mb_mgr) if ((mb_mgr->features & IMB_FEATURE_SAFE_PARAM) == 0) return 0; -#endif + printf("GET_NEXT_BURST() API behavior test:\n"); /* ======== test 7 : NULL pointer to burst job array */ diff --git a/test/xvalid-app/misc_aarch64.S b/test/xvalid-app/misc_aarch64.S index 27882c2467e8fe66ba98c7f9e29ed5d583f92f87..c032ebee9418ab46da12551e55e64f1d18696863 100644 --- a/test/xvalid-app/misc_aarch64.S +++ b/test/xvalid-app/misc_aarch64.S @@ -28,6 +28,18 @@ **********************************************************************/ .arch armv8-a+sve +.section .bss + +.align 8 +gps: +.space 29*8 + +.align 8 +simd_regs: +.space 32*32 + +.section .text + .global nosimd_memcpy .type nosimd_memcpy,%function .align 5