[2/6] crypto/mvsam: update hash digest sizes

Message ID 1535118895-6505-3-git-send-email-tdu@semihalf.com (mailing list archive)
State Superseded, archived
Delegated to: akhil goyal
Headers
Series crypto/mvsam: add new features and fixes |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Tomasz Duszynski Aug. 24, 2018, 1:54 p.m. UTC
  From: Szymon Sliwa <szs@semihalf.com>

Update hash digest sizes to match hardware capabilities.

Signed-off-by: Szymon Sliwa <szs@semihalf.com>
Reviewed-by: Yelena Krivosheev <yelena@marvell.com>
Reviewed-by: Natalie Samsonov <nsamsono@marvell.com>
---
 drivers/crypto/mvsam/rte_mrvl_pmd_ops.c | 46 ++++++++++++++++-----------------
 1 file changed, 23 insertions(+), 23 deletions(-)
  

Comments

Akhil Goyal Sept. 17, 2018, 1:54 p.m. UTC | #1
Hi Tomasz,

Is this patch a fix which needs to be applied for stable as well or you have
added some changes in the code which can support this.

-Akhil

On 8/24/2018 7:24 PM, Tomasz Duszynski wrote:
> From: Szymon Sliwa <szs@semihalf.com>
>
> Update hash digest sizes to match hardware capabilities.
>
> Signed-off-by: Szymon Sliwa <szs@semihalf.com>
> Reviewed-by: Yelena Krivosheev <yelena@marvell.com>
> Reviewed-by: Natalie Samsonov <nsamsono@marvell.com>
> ---
>   drivers/crypto/mvsam/rte_mrvl_pmd_ops.c | 46 ++++++++++++++++-----------------
>   1 file changed, 23 insertions(+), 23 deletions(-)
>
> diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
> index c045562..e2cfc07 100644
> --- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
> +++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
> @@ -30,9 +30,9 @@ static const struct rte_cryptodev_capabilities
>   					.increment = 1
>   				},
>   				.digest_size = {
> -					.min = 16,
> +					.min = 12,
>   					.max = 16,
> -					.increment = 0
> +					.increment = 4
>   				},
>   			}, }
>   		}, }
> @@ -50,9 +50,9 @@ static const struct rte_cryptodev_capabilities
>   						.increment = 0
>   					},
>   					.digest_size = {
> -						.min = 16,
> +						.min = 12,
>   						.max = 16,
> -						.increment = 0
> +						.increment = 4
>   					},
>   				}, }
>   			}, }
> @@ -70,9 +70,9 @@ static const struct rte_cryptodev_capabilities
>   						.increment = 1
>   					},
>   					.digest_size = {
> -						.min = 20,
> +						.min = 12,
>   						.max = 20,
> -						.increment = 0
> +						.increment = 4
>   					},
>   				}, }
>   			}, }
> @@ -90,9 +90,9 @@ static const struct rte_cryptodev_capabilities
>   					.increment = 0
>   				},
>   				.digest_size = {
> -					.min = 20,
> +					.min = 12,
>   					.max = 20,
> -					.increment = 0
> +					.increment = 4
>   				},
>   			}, }
>   		}, }
> @@ -110,9 +110,9 @@ static const struct rte_cryptodev_capabilities
>   					.increment = 0
>   				},
>   				.digest_size = {
> -					.min = 28,
> +					.min = 12,
>   					.max = 28,
> -					.increment = 0
> +					.increment = 4
>   				},
>   			}, }
>   		}, }
> @@ -130,9 +130,9 @@ static const struct rte_cryptodev_capabilities
>   						.increment = 1
>   					},
>   					.digest_size = {
> -						.min = 32,
> +						.min = 12,
>   						.max = 32,
> -						.increment = 0
> +						.increment = 4
>   					},
>   				}, }
>   			}, }
> @@ -150,9 +150,9 @@ static const struct rte_cryptodev_capabilities
>   						.increment = 0
>   					},
>   					.digest_size = {
> -						.min = 32,
> +						.min = 12,
>   						.max = 32,
> -						.increment = 0
> +						.increment = 4
>   					},
>   				}, }
>   			}, }
> @@ -170,9 +170,9 @@ static const struct rte_cryptodev_capabilities
>   					.increment = 1
>   				},
>   				.digest_size = {
> -					.min = 48,
> +					.min = 12,
>   					.max = 48,
> -					.increment = 0
> +					.increment = 4
>   				},
>   			}, }
>   		}, }
> @@ -190,9 +190,9 @@ static const struct rte_cryptodev_capabilities
>   					.increment = 0
>   				},
>   				.digest_size = {
> -					.min = 48,
> +					.min = 12,
>   					.max = 48,
> -					.increment = 0
> +					.increment = 4
>   				},
>   			}, }
>   		}, }
> @@ -210,9 +210,9 @@ static const struct rte_cryptodev_capabilities
>   					.increment = 1
>   				},
>   				.digest_size = {
> -					.min = 64,
> -					.max = 64,
> -					.increment = 0
> +					.min = 12,
> +					.max = 48,
> +					.increment = 4
>   				},
>   			}, }
>   		}, }
> @@ -230,8 +230,8 @@ static const struct rte_cryptodev_capabilities
>   					.increment = 0
>   				},
>   				.digest_size = {
> -					.min = 64,
> -					.max = 64,
> +					.min = 12,
> +					.max = 48,
>   					.increment = 0
>   				},
>   			}, }
  

Patch

diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
index c045562..e2cfc07 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
@@ -30,9 +30,9 @@  static const struct rte_cryptodev_capabilities
 					.increment = 1
 				},
 				.digest_size = {
-					.min = 16,
+					.min = 12,
 					.max = 16,
-					.increment = 0
+					.increment = 4
 				},
 			}, }
 		}, }
@@ -50,9 +50,9 @@  static const struct rte_cryptodev_capabilities
 						.increment = 0
 					},
 					.digest_size = {
-						.min = 16,
+						.min = 12,
 						.max = 16,
-						.increment = 0
+						.increment = 4
 					},
 				}, }
 			}, }
@@ -70,9 +70,9 @@  static const struct rte_cryptodev_capabilities
 						.increment = 1
 					},
 					.digest_size = {
-						.min = 20,
+						.min = 12,
 						.max = 20,
-						.increment = 0
+						.increment = 4
 					},
 				}, }
 			}, }
@@ -90,9 +90,9 @@  static const struct rte_cryptodev_capabilities
 					.increment = 0
 				},
 				.digest_size = {
-					.min = 20,
+					.min = 12,
 					.max = 20,
-					.increment = 0
+					.increment = 4
 				},
 			}, }
 		}, }
@@ -110,9 +110,9 @@  static const struct rte_cryptodev_capabilities
 					.increment = 0
 				},
 				.digest_size = {
-					.min = 28,
+					.min = 12,
 					.max = 28,
-					.increment = 0
+					.increment = 4
 				},
 			}, }
 		}, }
@@ -130,9 +130,9 @@  static const struct rte_cryptodev_capabilities
 						.increment = 1
 					},
 					.digest_size = {
-						.min = 32,
+						.min = 12,
 						.max = 32,
-						.increment = 0
+						.increment = 4
 					},
 				}, }
 			}, }
@@ -150,9 +150,9 @@  static const struct rte_cryptodev_capabilities
 						.increment = 0
 					},
 					.digest_size = {
-						.min = 32,
+						.min = 12,
 						.max = 32,
-						.increment = 0
+						.increment = 4
 					},
 				}, }
 			}, }
@@ -170,9 +170,9 @@  static const struct rte_cryptodev_capabilities
 					.increment = 1
 				},
 				.digest_size = {
-					.min = 48,
+					.min = 12,
 					.max = 48,
-					.increment = 0
+					.increment = 4
 				},
 			}, }
 		}, }
@@ -190,9 +190,9 @@  static const struct rte_cryptodev_capabilities
 					.increment = 0
 				},
 				.digest_size = {
-					.min = 48,
+					.min = 12,
 					.max = 48,
-					.increment = 0
+					.increment = 4
 				},
 			}, }
 		}, }
@@ -210,9 +210,9 @@  static const struct rte_cryptodev_capabilities
 					.increment = 1
 				},
 				.digest_size = {
-					.min = 64,
-					.max = 64,
-					.increment = 0
+					.min = 12,
+					.max = 48,
+					.increment = 4
 				},
 			}, }
 		}, }
@@ -230,8 +230,8 @@  static const struct rte_cryptodev_capabilities
 					.increment = 0
 				},
 				.digest_size = {
-					.min = 64,
-					.max = 64,
+					.min = 12,
+					.max = 48,
 					.increment = 0
 				},
 			}, }