From: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
To: Hemant Agrawal <hemant.agrawal@nxp.com>,
"dev@dpdk.org" <dev@dpdk.org>,
"gakhil@marvell.com" <gakhil@marvell.com>
Cc: "Zhang, Roy Fan" <roy.fan.zhang@intel.com>,
Gagandeep Singh <g.singh@nxp.com>,
"marcinx.smoczynski@intel.com" <marcinx.smoczynski@intel.com>,
"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-stable] [PATCH v4 04/15] crypto: fix raw process for multi-seg case
Date: Fri, 15 Oct 2021 17:39:47 +0000 [thread overview]
Message-ID: <DM6PR11MB449107D50786C1D87C5D7AB49AB99@DM6PR11MB4491.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20211013190032.2308-5-hemant.agrawal@nxp.com>
>
> From: Gagandeep Singh <g.singh@nxp.com>
>
> If no next segment available the “for” loop will fail and it still
> returns i+1 i.e. 2, which is wrong as it has filled only 1 buffer.
>
> Fixes: 7adf992fb9bf ("cryptodev: introduce CPU crypto API")
> Cc: marcinx.smoczynski@intel.com
> Cc: stable@dpdk.org
>
> Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
> ---
> lib/cryptodev/rte_crypto_sym.h | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/lib/cryptodev/rte_crypto_sym.h b/lib/cryptodev/rte_crypto_sym.h
> index b6a229e263..dc88ad6dcc 100644
> --- a/lib/cryptodev/rte_crypto_sym.h
> +++ b/lib/cryptodev/rte_crypto_sym.h
> @@ -1004,6 +1004,7 @@ rte_crypto_mbuf_to_vec(const struct rte_mbuf *mb, uint32_t ofs, uint32_t len,
> vec[i].tot_len = mb->buf_len - rte_pktmbuf_headroom(mb)
> - ofs;
> left = 0;
> + i++;
> break;
> }
>
> @@ -1014,7 +1015,7 @@ rte_crypto_mbuf_to_vec(const struct rte_mbuf *mb, uint32_t ofs, uint32_t len,
> }
>
> RTE_ASSERT(left == 0);
> - return i + 1;
> + return i;
> }
>
>
> --
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> 2.17.1
next prev parent reply other threads:[~2021-10-15 17:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210812071244.28799-1-hemant.agrawal@nxp.com>
[not found] ` <20210825071510.7913-1-hemant.agrawal@nxp.com>
2021-08-25 7:14 ` [dpdk-stable] [PATCH " Hemant Agrawal
2021-09-06 18:38 ` [dpdk-stable] [EXT] " Akhil Goyal
[not found] ` <20210907075957.28848-1-hemant.agrawal@nxp.com>
2021-09-07 7:59 ` [dpdk-stable] [PATCH v2 " Hemant Agrawal
[not found] ` <20211013190032.2308-1-hemant.agrawal@nxp.com>
2021-10-13 19:00 ` [dpdk-stable] [PATCH v4 " Hemant Agrawal
2021-10-15 17:39 ` Ananyev, Konstantin [this message]
[not found] ` <20211017161651.9220-1-hemant.agrawal@nxp.com>
2021-10-17 16:16 ` [dpdk-stable] [PATCH v5 " Hemant Agrawal
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=DM6PR11MB449107D50786C1D87C5D7AB49AB99@DM6PR11MB4491.namprd11.prod.outlook.com \
--to=konstantin.ananyev@intel.com \
--cc=dev@dpdk.org \
--cc=g.singh@nxp.com \
--cc=gakhil@marvell.com \
--cc=hemant.agrawal@nxp.com \
--cc=marcinx.smoczynski@intel.com \
--cc=roy.fan.zhang@intel.com \
--cc=stable@dpdk.org \
/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).