git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
eal/bsd: fix missing interrupt stub functions
[dpdk.git]
/
drivers
/
crypto
/
armv8
/
rte_armv8_pmd_ops.c
diff --git
a/drivers/crypto/armv8/rte_armv8_pmd_ops.c
b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
index
e14b68c
..
63776b2
100644
(file)
--- a/
drivers/crypto/armv8/rte_armv8_pmd_ops.c
+++ b/
drivers/crypto/armv8/rte_armv8_pmd_ops.c
@@
-1,7
+1,7
@@
/*
* BSD LICENSE
*
/*
* BSD LICENSE
*
- * Copyright (C) Cavium
networks Ltd
. 2017.
+ * Copyright (C) Cavium
, Inc
. 2017.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@
-13,7
+13,7
@@
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
- * * Neither the name of Cavium
networks
nor the names of its
+ * * Neither the name of Cavium
, Inc
nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
@@
-50,16
+50,15
@@
static const struct rte_cryptodev_capabilities
.algo = RTE_CRYPTO_AUTH_SHA1_HMAC,
.block_size = 64,
.key_size = {
.algo = RTE_CRYPTO_AUTH_SHA1_HMAC,
.block_size = 64,
.key_size = {
- .min = 1
6
,
- .max =
128
,
- .increment =
0
+ .min = 1,
+ .max =
64
,
+ .increment =
1
},
.digest_size = {
.min = 20,
.max = 20,
.increment = 0
},
},
.digest_size = {
.min = 20,
.max = 20,
.increment = 0
},
- .aad_size = { 0 },
.iv_size = { 0 }
}, }
}, }
.iv_size = { 0 }
}, }
}, }
@@
-72,16
+71,15
@@
static const struct rte_cryptodev_capabilities
.algo = RTE_CRYPTO_AUTH_SHA256_HMAC,
.block_size = 64,
.key_size = {
.algo = RTE_CRYPTO_AUTH_SHA256_HMAC,
.block_size = 64,
.key_size = {
- .min = 1
6
,
- .max =
128
,
- .increment =
0
+ .min = 1,
+ .max =
64
,
+ .increment =
1
},
.digest_size = {
.min = 32,
.max = 32,
.increment = 0
},
},
.digest_size = {
.min = 32,
.max = 32,
.increment = 0
},
- .aad_size = { 0 },
.iv_size = { 0 }
}, }
}, }
.iv_size = { 0 }
}, }
}, }
@@
-211,7
+209,7
@@
armv8_crypto_pmd_qp_set_unique_name(struct rte_cryptodev *dev,
n = snprintf(qp->name, sizeof(qp->name), "armv8_crypto_pmd_%u_qp_%u",
dev->data->dev_id, qp->id);
n = snprintf(qp->name, sizeof(qp->name), "armv8_crypto_pmd_%u_qp_%u",
dev->data->dev_id, qp->id);
- if (n > sizeof(qp->name))
+ if (n >
=
sizeof(qp->name))
return -1;
return 0;
return -1;
return 0;
@@
-249,7
+247,7
@@
armv8_crypto_pmd_qp_create_processed_ops_ring(struct armv8_crypto_qp *qp,
static int
armv8_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
const struct rte_cryptodev_qp_conf *qp_conf,
static int
armv8_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
const struct rte_cryptodev_qp_conf *qp_conf,
-
int socket_id
)
+
int socket_id, struct rte_mempool *session_pool
)
{
struct armv8_crypto_qp *qp = NULL;
{
struct armv8_crypto_qp *qp = NULL;
@@
-274,7
+272,7
@@
armv8_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
if (qp->processed_ops == NULL)
goto qp_setup_cleanup;
if (qp->processed_ops == NULL)
goto qp_setup_cleanup;
- qp->sess_mp =
dev->data->
session_pool;
+ qp->sess_mp = session_pool;
memset(&qp->stats, 0, sizeof(qp->stats));
memset(&qp->stats, 0, sizeof(qp->stats));
@@
-325,24
+323,26
@@
armv8_crypto_pmd_session_configure(struct rte_cryptodev *dev,
struct rte_mempool *mempool)
{
void *sess_private_data;
struct rte_mempool *mempool)
{
void *sess_private_data;
+ int ret;
if (unlikely(sess == NULL)) {
ARMV8_CRYPTO_LOG_ERR("invalid session struct");
if (unlikely(sess == NULL)) {
ARMV8_CRYPTO_LOG_ERR("invalid session struct");
- return -
1
;
+ return -
EINVAL
;
}
if (rte_mempool_get(mempool, &sess_private_data)) {
CDEV_LOG_ERR(
"Couldn't get object from session mempool");
}
if (rte_mempool_get(mempool, &sess_private_data)) {
CDEV_LOG_ERR(
"Couldn't get object from session mempool");
- return -
1
;
+ return -
ENOMEM
;
}
}
- if (armv8_crypto_set_session_parameters(sess_private_data, xform) != 0) {
+ ret = armv8_crypto_set_session_parameters(sess_private_data, xform);
+ if (ret != 0) {
ARMV8_CRYPTO_LOG_ERR("failed configure session parameters");
/* Return session to mempool */
rte_mempool_put(mempool, sess_private_data);
ARMV8_CRYPTO_LOG_ERR("failed configure session parameters");
/* Return session to mempool */
rte_mempool_put(mempool, sess_private_data);
- return
-1
;
+ return
ret
;
}
set_session_private_data(sess, dev->driver_id,
}
set_session_private_data(sess, dev->driver_id,