aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
diff options
context:
space:
mode:
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>2017-03-02 16:15:51 +0100
committerChristian Ehrhardt <christian.ehrhardt@canonical.com>2017-03-03 14:43:36 +0100
commit0c3ed7dcda2b9a08702cd5e30d8e48f412ad62fd (patch)
treedc06f6a9d25a767536c9c5e281ccd11aa3143f1c /drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
parentd4326699b9ff4788aed0c889a5c26a840e75a352 (diff)
Imported Upstream version 16.11.1
Change-Id: Ib15a339c8050bb0594ce8333133e923771d2fc57 Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Diffstat (limited to 'drivers/crypto/aesni_gcm/aesni_gcm_pmd.c')
-rw-r--r--drivers/crypto/aesni_gcm/aesni_gcm_pmd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index dba5e158..af3d60f0 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -40,6 +40,7 @@
#include <rte_vdev.h>
#include <rte_malloc.h>
#include <rte_cpuflags.h>
+#include <rte_byteorder.h>
#include "aesni_gcm_pmd_private.h"
@@ -241,7 +242,8 @@ process_gcm_crypto_op(struct aesni_gcm_qp *qp, struct rte_crypto_sym_op *op,
* to set BE LSB to 1, driver expects that 16B is allocated
*/
if (op->cipher.iv.length == 12) {
- op->cipher.iv.data[15] = 1;
+ uint32_t *iv_padd = (uint32_t *)&op->cipher.iv.data[12];
+ *iv_padd = rte_bswap32(1);
}
if (op->auth.aad.length != 12 && op->auth.aad.length != 8 &&