DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Shani Peretz <shperetz@nvidia.com>
Cc: <dev@dpdk.org>, <suanmingm@nvidia.com>, <stable@dpdk.org>,
	Kai Ji <kai.ji@intel.com>,
	Michal Kobylinski <michalx.kobylinski@intel.com>,
	Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>,
	Marcin Kerlin <marcinx.kerlin@intel.com>,
	Piotr Azarewicz <piotr.azarewicz@intel.com>,
	Declan Doherty <declan.doherty@intel.com>
Subject: Re: [PATCH] app/crypto-perf: fix plaintext size exceeds buffer size
Date: Tue, 5 Aug 2025 08:49:34 -0700	[thread overview]
Message-ID: <20250805084934.3b112d93@hermes.local> (raw)
In-Reply-To: <20250805063800.225231-1-shperetz@nvidia.com>

On Tue, 5 Aug 2025 09:38:00 +0300
Shani Peretz <shperetz@nvidia.com> wrote:

> diff --git a/app/test-crypto-perf/cperf_test_vector_parsing.c b/app/test-crypto-perf/cperf_test_vector_parsing.c
> index 737d61d4af..04ca9cf019 100644
> --- a/app/test-crypto-perf/cperf_test_vector_parsing.c
> +++ b/app/test-crypto-perf/cperf_test_vector_parsing.c
> @@ -308,6 +308,12 @@ parse_entry(char *entry, struct cperf_test_vector *vector,
>  	if (strstr(key_token, "plaintext")) {
>  		rte_free(vector->plaintext.data);
>  		vector->plaintext.data = data;
> +
> +		if (opts->test == CPERF_TEST_TYPE_VERIFY && data_length > opts->max_buffer_size) {
> +			printf("Global plaintext larger than buffer_sz\n");
> +			return -1;
> +		}
> +
>  	

It might help user to print the sizes?

      reply	other threads:[~2025-08-05 15:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-05  6:38 Shani Peretz
2025-08-05 15:49 ` Stephen Hemminger [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=20250805084934.3b112d93@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=kai.ji@intel.com \
    --cc=marcinx.kerlin@intel.com \
    --cc=michalx.kobylinski@intel.com \
    --cc=piotr.azarewicz@intel.com \
    --cc=shperetz@nvidia.com \
    --cc=slawomirx.mrozowicz@intel.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).