patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 04/15] crypto: fix raw process for multi-seg case
       [not found] ` <20210825071510.7913-1-hemant.agrawal@nxp.com>
@ 2021-08-25  7:14   ` Hemant Agrawal
  2021-09-06 18:38     ` [dpdk-stable] [EXT] " Akhil Goyal
       [not found]   ` <20210907075957.28848-1-hemant.agrawal@nxp.com>
  1 sibling, 1 reply; 5+ messages in thread
From: Hemant Agrawal @ 2021-08-25  7:14 UTC (permalink / raw)
  To: dev, gakhil
  Cc: konstantin.ananyev, roy.fan.zhang, Gagandeep Singh,
	marcinx.smoczynski, stable

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-stable] [EXT] [PATCH 04/15] crypto: fix raw process for multi-seg case
  2021-08-25  7:14   ` [dpdk-stable] [PATCH 04/15] crypto: fix raw process for multi-seg case Hemant Agrawal
@ 2021-09-06 18:38     ` Akhil Goyal
  0 siblings, 0 replies; 5+ messages in thread
From: Akhil Goyal @ 2021-09-06 18:38 UTC (permalink / raw)
  To: Hemant Agrawal, dev, roy.fan.zhang
  Cc: konstantin.ananyev, Gagandeep Singh, marcinx.smoczynski, stable

> 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>
@Fan: Could you please review this patch.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dpdk-stable] [PATCH v2 04/15] crypto: fix raw process for multi-seg case
       [not found]   ` <20210907075957.28848-1-hemant.agrawal@nxp.com>
@ 2021-09-07  7:59     ` Hemant Agrawal
       [not found]     ` <20211013190032.2308-1-hemant.agrawal@nxp.com>
  1 sibling, 0 replies; 5+ messages in thread
From: Hemant Agrawal @ 2021-09-07  7:59 UTC (permalink / raw)
  To: dev, gakhil
  Cc: konstantin.ananyev, roy.fan.zhang, Gagandeep Singh,
	marcinx.smoczynski, stable

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dpdk-stable] [PATCH v4 04/15] crypto: fix raw process for multi-seg case
       [not found]     ` <20211013190032.2308-1-hemant.agrawal@nxp.com>
@ 2021-10-13 19:00       ` Hemant Agrawal
  2021-10-15 17:39         ` Ananyev, Konstantin
  0 siblings, 1 reply; 5+ messages in thread
From: Hemant Agrawal @ 2021-10-13 19:00 UTC (permalink / raw)
  To: dev, gakhil
  Cc: konstantin.ananyev, roy.fan.zhang, Gagandeep Singh,
	marcinx.smoczynski, stable

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;
 }
 
 
-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-stable] [PATCH v4 04/15] crypto: fix raw process for multi-seg case
  2021-10-13 19:00       ` [dpdk-stable] [PATCH v4 " Hemant Agrawal
@ 2021-10-15 17:39         ` Ananyev, Konstantin
  0 siblings, 0 replies; 5+ messages in thread
From: Ananyev, Konstantin @ 2021-10-15 17:39 UTC (permalink / raw)
  To: Hemant Agrawal, dev, gakhil
  Cc: Zhang, Roy Fan, Gagandeep Singh, marcinx.smoczynski, stable


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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-10-15 17:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [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 04/15] crypto: fix raw process for multi-seg case 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

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git