DPDK patches and discussions
 help / color / mirror / Atom feed
From: Akhil Goyal <gakhil@marvell.com>
To: Gagandeep Singh <g.singh@nxp.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: RE: [EXT] [PATCH v2] app/test-crypto-perf: fix segment size for IPsec operation
Date: Tue, 16 Nov 2021 10:42:06 +0000	[thread overview]
Message-ID: <CO6PR18MB4484513DF17FEA22D386EEF6D8999@CO6PR18MB4484.namprd18.prod.outlook.com> (raw)
In-Reply-To: <20211116103714.2148007-1-g.singh@nxp.com>

> 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@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


  reply	other threads:[~2021-11-16 10:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-16 10:23 [PATCH] " Gagandeep Singh
2021-11-16 10:37 ` [PATCH v2] " Gagandeep Singh
2021-11-16 10:42   ` Akhil Goyal [this message]
2021-11-16 11:47     ` [EXT] " Gagandeep Singh
2021-11-17  6:36       ` Akhil Goyal
2021-11-17  7:00         ` Gagandeep Singh
2021-11-17  7:40   ` [PATCH v3] " Gagandeep Singh
2021-11-23 19:49     ` [EXT] " Akhil Goyal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CO6PR18MB4484513DF17FEA22D386EEF6D8999@CO6PR18MB4484.namprd18.prod.outlook.com \
    --to=gakhil@marvell.com \
    --cc=dev@dpdk.org \
    --cc=g.singh@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).