[dpdk-dev] aesni_gcm: fix incorrect supported key sizes

Message ID 1459957171-46402-1-git-send-email-pablo.de.lara.guarch@intel.com (mailing list archive)
State Accepted, archived
Headers

Commit Message

De Lara Guarch, Pablo April 6, 2016, 3:39 p.m. UTC
  AES-GCM PMD only supports 128-bit keys, but not 192 and 256,
which the capabilities structure was reporting.

Fixes: 27cf2d1b18e1 ("examples/l2fwd-crypto: discover capabilities")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
  

Comments

Thomas Monjalon April 6, 2016, 4:29 p.m. UTC | #1
2016-04-06 16:39, Pablo de Lara:
> AES-GCM PMD only supports 128-bit keys, but not 192 and 256,
> which the capabilities structure was reporting.
> 
> Fixes: 27cf2d1b18e1 ("examples/l2fwd-crypto: discover capabilities")

I think you mean
Fixes: 26c2e4ad5ad4 ("cryptodev: add capabilities discovery")
  
Thomas Monjalon April 6, 2016, 5:05 p.m. UTC | #2
2016-04-06 18:29, Thomas Monjalon:
> 2016-04-06 16:39, Pablo de Lara:
> > AES-GCM PMD only supports 128-bit keys, but not 192 and 256,
> > which the capabilities structure was reporting.
> > 
> > Fixes: 27cf2d1b18e1 ("examples/l2fwd-crypto: discover capabilities")
> 
> I think you mean
> Fixes: 26c2e4ad5ad4 ("cryptodev: add capabilities discovery")

Applied, thanks
  

Patch

diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
index 4dec8dd..e824d4b 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
@@ -48,8 +48,8 @@  static const struct rte_cryptodev_capabilities aesni_gcm_pmd_capabilities[] = {
 				.block_size = 16,
 				.key_size = {
 					.min = 16,
-					.max = 32,
-					.increment = 8
+					.max = 16,
+					.increment = 0
 				},
 				.digest_size = {
 					.min = 8,
@@ -73,8 +73,8 @@  static const struct rte_cryptodev_capabilities aesni_gcm_pmd_capabilities[] = {
 				.block_size = 16,
 				.key_size = {
 					.min = 16,
-					.max = 32,
-					.increment = 8
+					.max = 16,
+					.increment = 0
 				},
 				.iv_size = {
 					.min = 16,