X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_cryptodev%2Frte_cryptodev.c;h=327d7e8461cbc27809f726901e7228f95b5d802d;hb=a20e0cd897b1c094b44dab8dd98cfd11ca70b374;hp=373c05baeded72992d3a3514d2e058702f92cee4;hpb=b3bbd9e5f265937164ed8c9c61d12f7543a745ea;p=dpdk.git diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c index 373c05baed..327d7e8461 100644 --- a/lib/librte_cryptodev/rte_cryptodev.c +++ b/lib/librte_cryptodev/rte_cryptodev.c @@ -311,8 +311,7 @@ rte_cryptodev_sym_capability_check_cipher( int rte_cryptodev_sym_capability_check_auth( const struct rte_cryptodev_symmetric_capability *capability, - uint16_t key_size, uint16_t digest_size, uint16_t aad_size, - uint16_t iv_size) + uint16_t key_size, uint16_t digest_size, uint16_t iv_size) { if (param_range_check(key_size, capability->auth.key_size)) return -1; @@ -320,9 +319,6 @@ rte_cryptodev_sym_capability_check_auth( if (param_range_check(digest_size, capability->auth.digest_size)) return -1; - if (param_range_check(aad_size, capability->auth.aad_size)) - return -1; - if (param_range_check(iv_size, capability->auth.iv_size)) return -1; @@ -747,8 +743,7 @@ rte_cryptodev_queue_pair_stop(uint8_t dev_id, uint16_t queue_pair_id) } int -rte_cryptodev_configure(uint8_t dev_id, struct rte_cryptodev_config *config, - struct rte_mempool *session_pool) +rte_cryptodev_configure(uint8_t dev_id, struct rte_cryptodev_config *config) { struct rte_cryptodev *dev; int diag; @@ -768,8 +763,6 @@ rte_cryptodev_configure(uint8_t dev_id, struct rte_cryptodev_config *config, RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_configure, -ENOTSUP); - dev->data->session_pool = session_pool; - /* Setup new number of queue pairs and reconfigure device. */ diag = rte_cryptodev_queue_pairs_config(dev, config->nb_queue_pairs, config->socket_id); @@ -881,7 +874,9 @@ rte_cryptodev_close(uint8_t dev_id) int rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id, - const struct rte_cryptodev_qp_conf *qp_conf, int socket_id) + const struct rte_cryptodev_qp_conf *qp_conf, int socket_id, + struct rte_mempool *session_pool) + { struct rte_cryptodev *dev; @@ -905,7 +900,7 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id, RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_pair_setup, -ENOTSUP); return (*dev->dev_ops->queue_pair_setup)(dev, queue_pair_id, qp_conf, - socket_id); + socket_id, session_pool); } @@ -1090,20 +1085,22 @@ rte_cryptodev_sym_session_init(uint8_t dev_id, { struct rte_cryptodev *dev; uint8_t index; + int ret; dev = rte_cryptodev_pmd_get_dev(dev_id); if (sess == NULL || xforms == NULL || dev == NULL) - return -1; + return -EINVAL; index = dev->driver_id; if (sess->sess_private_data[index] == NULL) { - if (dev->dev_ops->session_configure(dev, xforms, sess, mp) < 0) { + ret = dev->dev_ops->session_configure(dev, xforms, sess, mp); + if (ret < 0) { CDEV_LOG_ERR( "dev_id %d failed to configure session details", dev_id); - return -1; + return ret; } }