aboutsummaryrefslogtreecommitdiffstats
path: root/src/vppinfra/vector/test/sha2.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2022-04-06 21:16:37 +0200
committerFlorin Coras <florin.coras@gmail.com>2022-04-08 15:53:10 +0000
commitd5045e68a782d484e3f0e54edb4a88dc3dfac291 (patch)
treef0cf5627b672050e4463d1dee4ea952a066c12d6 /src/vppinfra/vector/test/sha2.c
parentdfc43164078b481e39dc0a87e8e358cc6a56d14e (diff)
vppinfra: introduce clib_perfmom
Type: improvement Change-Id: I85a90774eb313020435c9bc2297c1bdf23d52efc Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vppinfra/vector/test/sha2.c')
-rw-r--r--src/vppinfra/vector/test/sha2.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/vppinfra/vector/test/sha2.c b/src/vppinfra/vector/test/sha2.c
index 58fb2e74401..81365792063 100644
--- a/src/vppinfra/vector/test/sha2.c
+++ b/src/vppinfra/vector/test/sha2.c
@@ -293,7 +293,7 @@ check_digest (clib_error_t *err, int tc, u8 *calculated, const u8 *expected,
return err; \
} \
\
- void __test_perf_fn perftest_sha##bits##_byte (int fd, test_perf_t *tp) \
+ void __test_perf_fn perftest_sha##bits##_byte (test_perf_t *tp) \
{ \
volatile uword *np = &tp->n_ops; \
volatile uword *kl = &tp->arg0; \
@@ -302,9 +302,9 @@ check_digest (clib_error_t *err, int tc, u8 *calculated, const u8 *expected,
u8 *data = test_mem_alloc_and_fill_inc_u8 (*np, 0, 0); \
u8 *digest = test_mem_alloc (64); \
\
- test_perf_event_enable (fd); \
+ test_perf_event_enable (tp); \
clib_hmac_sha##bits (key, *kl, data, *np, digest); \
- test_perf_event_disable (fd); \
+ test_perf_event_disable (tp); \
\
test_mem_free (key); \
test_mem_free (data); \
@@ -314,7 +314,6 @@ check_digest (clib_error_t *err, int tc, u8 *calculated, const u8 *expected,
.name = "clib_hmac_sha" #bits, \
.fn = test_clib_hmac_sha##bits, \
.perf_tests = PERF_TESTS ({ .name = "byte", \
- .op_name = "Byte", \
.n_ops = 16384, \
.arg0 = 20, \
.fn = perftest_sha##bits##_byte }) \