crypto/qat: fix HMAC supported digest sizes
authorPablo de Lara <pablo.de.lara.guarch@intel.com>
Mon, 23 Oct 2017 10:37:09 +0000 (11:37 +0100)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Wed, 25 Oct 2017 16:11:01 +0000 (18:11 +0200)
For HMAC algorithms (MD5-HMAC, SHAx-HMAC), the supported
digest sizes are not a fixed value, but a range between
1 and the maximum digest size for those algorithms.

Fixes: 26c2e4ad5ad4 ("cryptodev: add capabilities discovery")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
drivers/crypto/qat/qat_crypto_capabilities.h

index d8d3fa1..89ba27d 100644 (file)
@@ -48,9 +48,9 @@
                                        .increment = 1                  \
                                },                                      \
                                .digest_size = {                        \
-                                       .min = 20,                      \
+                                       .min = 1,                       \
                                        .max = 20,                      \
-                                       .increment = 0                  \
+                                       .increment = 1                  \
                                },                                      \
                                .iv_size = { 0 }                        \
                        }, }                                            \
@@ -69,9 +69,9 @@
                                        .increment = 1                  \
                                },                                      \
                                .digest_size = {                        \
-                                       .min = 28,                      \
+                                       .min = 1,                       \
                                        .max = 28,                      \
-                                       .increment = 0                  \
+                                       .increment = 1                  \
                                },                                      \
                                .iv_size = { 0 }                        \
                        }, }                                            \
@@ -90,9 +90,9 @@
                                        .increment = 1                  \
                                },                                      \
                                .digest_size = {                        \
-                                       .min = 32,                      \
+                                       .min = 1,                       \
                                        .max = 32,                      \
-                                       .increment = 0                  \
+                                       .increment = 1                  \
                                },                                      \
                                .iv_size = { 0 }                        \
                        }, }                                            \
                                        .increment = 1                  \
                                },                                      \
                                .digest_size = {                        \
-                                       .min = 48,                      \
+                                       .min = 1,                       \
                                        .max = 48,                      \
-                                       .increment = 0                  \
+                                       .increment = 1                  \
                                },                                      \
                                .iv_size = { 0 }                        \
                        }, }                                            \
                                        .increment = 1                  \
                                },                                      \
                                .digest_size = {                        \
-                                       .min = 64,                      \
+                                       .min = 1,                       \
                                        .max = 64,                      \
-                                       .increment = 0                  \
+                                       .increment = 1                  \
                                },                                      \
                                .iv_size = { 0 }                        \
                        }, }                                            \
                                        .increment = 1                  \
                                },                                      \
                                .digest_size = {                        \
-                                       .min = 16,                      \
+                                       .min = 1                      \
                                        .max = 16,                      \
-                                       .increment = 0                  \
+                                       .increment = 1                  \
                                },                                      \
                                .iv_size = { 0 }                        \
                        }, }                                            \