diff options
author | Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> | 2018-03-23 18:19:48 +0300 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2018-03-29 17:24:10 +0300 |
commit | 68b1a52611e6ac9be306e5a17d009a6fd46c455e (patch) | |
tree | 381a15ee4125430986d3099d4ea288c991248055 /test/performance/odp_ipsec.c | |
parent | 59d636481fd1771107f3eb4632c2a9fc868afc11 (diff) |
performance: ipsec: add AH measurements
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'test/performance/odp_ipsec.c')
-rw-r--r-- | test/performance/odp_ipsec.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/test/performance/odp_ipsec.c b/test/performance/odp_ipsec.c index 6552c0e0b..6fdd033cb 100644 --- a/test/performance/odp_ipsec.c +++ b/test/performance/odp_ipsec.c @@ -122,6 +122,12 @@ typedef struct { * Specified through -t argument. */ int tunnel; + + /* + * Use AH transformation. + * Specified through -u argument. + */ + int ah; } ipsec_args_t; /* @@ -778,6 +784,7 @@ static void usage(char *progname) " -s, --schedule Use scheduler for completion events.\n" " -p, --poll Poll completion queue for completion events.\n" " -t, --tunnel Use tunnel-mode IPsec transformation.\n" + " -u, --ah Use AH transformation instead of ESP.\n" " -h, --help Display help and exit.\n" "\n"); } @@ -798,10 +805,11 @@ static void parse_args(int argc, char *argv[], ipsec_args_t *cargs) {"poll", no_argument, NULL, 'p'}, {"schedule", no_argument, NULL, 's'}, {"tunnel", no_argument, NULL, 't'}, + {"ah", no_argument, NULL, 'u'}, {NULL, 0, NULL, 0} }; - static const char *shortopts = "+a:c:df:hi:m:nl:spt"; + static const char *shortopts = "+a:c:df:hi:m:nl:sptu"; /* let helper collect its own arguments (e.g. --odph_proc) */ odph_parse_options(argc, argv, shortopts, longopts); @@ -813,6 +821,7 @@ static void parse_args(int argc, char *argv[], ipsec_args_t *cargs) cargs->payload_length = 0; cargs->alg_config = NULL; cargs->schedule = 0; + cargs->ah = 0; opterr = 0; /* do not issue errors on helper options */ @@ -860,6 +869,9 @@ static void parse_args(int argc, char *argv[], ipsec_args_t *cargs) case 't': cargs->tunnel = 1; break; + case 'u': + cargs->ah = 1; + break; default: break; } @@ -1011,6 +1023,10 @@ int main(int argc, char *argv[]) for (i = 0; i < (sizeof(algs_config) / sizeof(ipsec_alg_config_t)); i++) { + if (cargs.ah && + algs_config[i].crypto.cipher_alg != + ODP_CIPHER_ALG_NULL) + continue; run_measure_one_config(&cargs, algs_config + i); } } |