From: Akhil Goyal <gakhil@marvell.com>
To: Shani Peretz <shperetz@nvidia.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "suanmingm@nvidia.com" <suanmingm@nvidia.com>,
"stable@dpdk.org" <stable@dpdk.org>,
Brian Dooley <brian.dooley@intel.com>,
Pablo de Lara <pablo.de.lara.guarch@intel.com>
Subject: RE: [EXTERNAL] [PATCH] app/crypto-perf: fix aad offset alignment
Date: Mon, 17 Mar 2025 10:22:31 +0000 [thread overview]
Message-ID: <CO6PR18MB44844B0F7C3BA22106DD9620D8DF2@CO6PR18MB4484.namprd18.prod.outlook.com> (raw)
In-Reply-To: <20250311090122.121190-1-shperetz@nvidia.com>
Hi,
> AAD offset in AES-GCM crypto test was calculated by adding
> 16-byte alignment after the IV, which is only needed in AES-CCM.
Agreed that CCM has a requirement for 16B alignment.
But for GCM, does it break any protocol? Can we not align to byte boundary for performance?
This is a performance application which mainly focus on getting the best throughput.
Did you check if it is having some performance degradation?
>
> The patch correct the AAD offset calculation in AES-GCM algorithm tests.
>
> Fixes: 0b242422d385 ("app/crypto-perf: set AAD after the crypto operation")
> Cc: stable@dpdk.org
>
> Signed-off-by: Shani Peretz <shperetz@nvidia.com>
> ---
> app/test-crypto-perf/cperf_ops.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/app/test-crypto-perf/cperf_ops.c b/app/test-crypto-perf/cperf_ops.c
> index 6d5f510220..f9be51e17f 100644
> --- a/app/test-crypto-perf/cperf_ops.c
> +++ b/app/test-crypto-perf/cperf_ops.c
> @@ -688,7 +688,9 @@ cperf_set_ops_aead(struct rte_crypto_op **ops,
> uint16_t i;
> /* AAD is placed after the IV */
> uint16_t aad_offset = iv_offset +
> - RTE_ALIGN_CEIL(test_vector->aead_iv.length, 16);
> + ((options->aead_algo == RTE_CRYPTO_AEAD_AES_CCM)
> ?
> + RTE_ALIGN_CEIL(test_vector->aead_iv.length, 16) :
> + test_vector->aead_iv.length);
>
> for (i = 0; i < nb_ops; i++) {
> struct rte_crypto_sym_op *sym_op = ops[i]->sym;
> --
> 2.25.1
prev parent reply other threads:[~2025-03-17 10:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-11 9:01 Shani Peretz
2025-03-17 10:22 ` Akhil Goyal [this message]
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=CO6PR18MB44844B0F7C3BA22106DD9620D8DF2@CO6PR18MB4484.namprd18.prod.outlook.com \
--to=gakhil@marvell.com \
--cc=brian.dooley@intel.com \
--cc=dev@dpdk.org \
--cc=pablo.de.lara.guarch@intel.com \
--cc=shperetz@nvidia.com \
--cc=stable@dpdk.org \
--cc=suanmingm@nvidia.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).