[EXT] [PATCH v2] app/test-crypto-perf: fix segment size for IPsec operation
Akhil Goyal
gakhil at marvell.com
Tue Nov 16 11:42:06 CET 2021
> Application calculates segment size based on buffer size plus
> digest size only, But if the operation mode is IPsec then
> packet length can be increased up to 73 bytes due to IPsec
> overhead.
>
Can you explain the calculation for 73 bytes in the code?
Will it be sufficient for IPv6?
> In this patch, adding the IPsec overhead length in segment size
> when there is no user given segment size.
>
> Fixes: 28dde5da503e ("app/crypto-perf: support lookaside IPsec")
>
> Signed-off-by: Gagandeep Singh <g.singh at nxp.com>
> ---
> v2-change-log:
> Update commit message with fixline.
>
> app/test-crypto-perf/cperf_options.h | 1 +
> app/test-crypto-perf/cperf_options_parsing.c | 5 ++++-
> 2 files changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/app/test-crypto-perf/cperf_options.h b/app/test-crypto-
> perf/cperf_options.h
> index 031b238b20..cdbc027b89 100644
> --- a/app/test-crypto-perf/cperf_options.h
> +++ b/app/test-crypto-perf/cperf_options.h
> @@ -61,6 +61,7 @@
> #define CPERF_PMDCC_DELAY_MS ("pmd-cyclecount-delay-ms")
>
> #define MAX_LIST 32
> +#define CPERF_IPSEC_OVERHEAD 73
>
> enum cperf_perf_test_type {
> CPERF_TEST_TYPE_THROUGHPUT,
> diff --git a/app/test-crypto-perf/cperf_options_parsing.c b/app/test-crypto-
> perf/cperf_options_parsing.c
> index c244f81bbf..268f544936 100644
> --- a/app/test-crypto-perf/cperf_options_parsing.c
> +++ b/app/test-crypto-perf/cperf_options_parsing.c
> @@ -1132,9 +1132,12 @@ cperf_options_check(struct cperf_options
> *options)
> * If segment size is not set, assume only one segment,
> * big enough to contain the largest buffer and the digest
> */
> - if (options->segment_sz == 0)
> + if (options->segment_sz == 0) {
> options->segment_sz = options->max_buffer_size +
> options->digest_sz;
> + if (options->op_type == CPERF_IPSEC)
> + options->segment_sz += CPERF_IPSEC_OVERHEAD;
> + }
>
> if (options->segment_sz < options->digest_sz) {
> RTE_LOG(ERR, USER1,
> --
> 2.25.1
More information about the dev
mailing list