[RFC,04/16] crypto: enhance raw process for protocol offload

Message ID 20210812071244.28799-5-hemant.agrawal@nxp.com (mailing list archive)
State Superseded, archived
Delegated to: akhil goyal
Headers
Series crypto: add raw vector support in DPAAx |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Hemant Agrawal Aug. 12, 2021, 7:12 a.m. UTC
  From: Gagandeep Singh <g.singh@nxp.com>

This patch improves the raw vector processing for security
protocol with OOP processing.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
---
 lib/cryptodev/rte_crypto_sym.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Comments

Akhil Goyal Aug. 12, 2021, 8:11 a.m. UTC | #1
> From: Gagandeep Singh <g.singh@nxp.com>
> 
> This patch improves the raw vector processing for security
> protocol with OOP processing.
> 
> Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
> ---
Can you explain the reasoning for this change in commit message.
Is this a bug? Do we need to backport it?

++Fan/Konstantin

>  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 978708845f..a48228a646 100644
> --- a/lib/cryptodev/rte_crypto_sym.h
> +++ b/lib/cryptodev/rte_crypto_sym.h
> @@ -1003,6 +1003,7 @@ rte_crypto_mbuf_to_vec(const struct rte_mbuf
> *mb, uint32_t ofs, uint32_t len,
>  			vec[i].len = left;
>  			vec[i].tot_len = mb->buf_len;
>  			left = 0;
> +			i++;
>  			break;
>  		}
> 
> @@ -1013,7 +1014,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;
>  }
> 
> 
> --
> 2.17.1
  

Patch

diff --git a/lib/cryptodev/rte_crypto_sym.h b/lib/cryptodev/rte_crypto_sym.h
index 978708845f..a48228a646 100644
--- a/lib/cryptodev/rte_crypto_sym.h
+++ b/lib/cryptodev/rte_crypto_sym.h
@@ -1003,6 +1003,7 @@  rte_crypto_mbuf_to_vec(const struct rte_mbuf *mb, uint32_t ofs, uint32_t len,
 			vec[i].len = left;
 			vec[i].tot_len = mb->buf_len;
 			left = 0;
+			i++;
 			break;
 		}
 
@@ -1013,7 +1014,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;
 }