diff options
author | Janne Peltonen <janne.peltonen@nokia.com> | 2023-03-02 21:49:06 +0200 |
---|---|---|
committer | Matias Elo <matias.elo@nokia.com> | 2023-04-12 15:52:37 +0300 |
commit | cf3cb94e09480f351a7870cf0273f173a8ad3c37 (patch) | |
tree | f7f88346699dfaf3f454fe1afab3970d7634affb /test | |
parent | 18931e32af51d98ec8a5a5b3b50dd4f83cd7a7f9 (diff) |
test: performance: crypto: simplify crypto operation result checking
Check crypto operation success from the return value of odp_crypto_result()
instead of the ok field of the result structure.
Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Reviewed-by: Anoob Joseph <anoobj@marvell.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/performance/odp_crypto.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/test/performance/odp_crypto.c b/test/performance/odp_crypto.c index d1de919c0..52af6d2fc 100644 --- a/test/performance/odp_crypto.c +++ b/test/performance/odp_crypto.c @@ -853,8 +853,6 @@ run_measure_one(crypto_args_t *cargs, } packets_sent += rc; } else { - odp_crypto_packet_result_t result; - rc = odp_crypto_op(&pkt, &out_pkt, ¶ms, 1); if (rc <= 0) { @@ -865,8 +863,7 @@ run_measure_one(crypto_args_t *cargs, } packets_sent += rc; packets_received++; - if (odp_unlikely(odp_crypto_result(&result, out_pkt) != 0) || - odp_unlikely(!result.ok)) { + if (odp_unlikely(odp_crypto_result(NULL, out_pkt) != 0)) { ODPH_ERR("Crypto operation failed\n"); odp_packet_free(out_pkt); return -1; @@ -889,7 +886,6 @@ run_measure_one(crypto_args_t *cargs, if (cargs->schedule || cargs->poll) { odp_event_t ev; - odp_crypto_packet_result_t result; odp_packet_t out_pkt; if (cargs->schedule) @@ -900,8 +896,7 @@ run_measure_one(crypto_args_t *cargs, while (ev != ODP_EVENT_INVALID) { out_pkt = odp_crypto_packet_from_event(ev); - if (odp_unlikely(odp_crypto_result(&result, out_pkt) != 0) || - odp_unlikely(!result.ok)) { + if (odp_unlikely(odp_crypto_result(NULL, out_pkt) != 0)) { ODPH_ERR("Crypto operation failed\n"); odp_packet_free(out_pkt); return -1; |