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; 6+ 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] 6+ 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; 6+ 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] 6+ 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; 6+ 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] 6+ 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
       [not found]       ` <20211017161651.9220-1-hemant.agrawal@nxp.com>
  1 sibling, 1 reply; 6+ 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] 6+ 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; 6+ 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] 6+ messages in thread

* [dpdk-stable] [PATCH v5 04/15] crypto: fix raw process for multi-seg case
       [not found]       ` <20211017161651.9220-1-hemant.agrawal@nxp.com>
@ 2021-10-17 16:16         ` Hemant Agrawal
  0 siblings, 0 replies; 6+ messages in thread
From: Hemant Agrawal @ 2021-10-17 16:16 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>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.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 c907b1646d..daa090b978 100644
--- a/lib/cryptodev/rte_crypto_sym.h
+++ b/lib/cryptodev/rte_crypto_sym.h
@@ -990,6 +990,7 @@ rte_crypto_mbuf_to_vec(const struct rte_mbuf *mb, uint32_t ofs, uint32_t len,
 			/* whole requested data is completed */
 			vec[i].len = left;
 			left = 0;
+			i++;
 			break;
 		}
 
@@ -999,7 +1000,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] 6+ messages in thread

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

Thread overview: 6+ 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
     [not found]       ` <20211017161651.9220-1-hemant.agrawal@nxp.com>
2021-10-17 16:16         ` [dpdk-stable] [PATCH v5 " Hemant Agrawal

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