Target release for removal of the legacy API will be defined once most
PMDs have switched to rte_flow.
-* ABI changes are planned for 17.05 in the ``rte_cryptodev_ops`` structure.
- A pointer to a rte_cryptodev_config structure will be added to the
- function prototype ``cryptodev_configure_t``, as a new parameter.
-
* cryptodev: A new parameter ``max_nb_sessions_per_qp`` will be added to
``rte_cryptodev_info.sym``. Some drivers may support limited number of
sessions per queue_pair. With this new parameter application will know
/** Configure device */
static int
-aesni_gcm_pmd_config(__rte_unused struct rte_cryptodev *dev)
+aesni_gcm_pmd_config(__rte_unused struct rte_cryptodev *dev,
+ __rte_unused struct rte_cryptodev_config *config)
{
return 0;
}
/** Configure device */
static int
-aesni_mb_pmd_config(__rte_unused struct rte_cryptodev *dev)
+aesni_mb_pmd_config(__rte_unused struct rte_cryptodev *dev,
+ __rte_unused struct rte_cryptodev_config *config)
{
return 0;
}
/** Configure device */
static int
-armv8_crypto_pmd_config(__rte_unused struct rte_cryptodev *dev)
+armv8_crypto_pmd_config(__rte_unused struct rte_cryptodev *dev,
+ __rte_unused struct rte_cryptodev_config *config)
{
return 0;
}
/** Configure device */
static int
-kasumi_pmd_config(__rte_unused struct rte_cryptodev *dev)
+kasumi_pmd_config(__rte_unused struct rte_cryptodev *dev,
+ __rte_unused struct rte_cryptodev_config *config)
{
return 0;
}
/** Configure device */
static int
-null_crypto_pmd_config(__rte_unused struct rte_cryptodev *dev)
+null_crypto_pmd_config(__rte_unused struct rte_cryptodev *dev,
+ __rte_unused struct rte_cryptodev_config *config)
{
return 0;
}
/** Configure device */
static int
-openssl_pmd_config(__rte_unused struct rte_cryptodev *dev)
+openssl_pmd_config(__rte_unused struct rte_cryptodev *dev,
+ __rte_unused struct rte_cryptodev_config *config)
{
return 0;
}
offsetof(struct rte_cryptodev_sym_session, _private);
}
-int qat_dev_config(__rte_unused struct rte_cryptodev *dev)
+int qat_dev_config(__rte_unused struct rte_cryptodev *dev,
+ __rte_unused struct rte_cryptodev_config *config)
{
PMD_INIT_FUNC_TRACE();
- return -ENOTSUP;
+ return 0;
}
int qat_dev_start(__rte_unused struct rte_cryptodev *dev)
/**< Max number of sessions supported by device */
};
-int qat_dev_config(struct rte_cryptodev *dev);
+int qat_dev_config(struct rte_cryptodev *dev,
+ struct rte_cryptodev_config *config);
int qat_dev_start(struct rte_cryptodev *dev);
void qat_dev_stop(struct rte_cryptodev *dev);
int qat_dev_close(struct rte_cryptodev *dev);
/** Configure device */
static int
-scheduler_pmd_config(struct rte_cryptodev *dev)
+scheduler_pmd_config(struct rte_cryptodev *dev,
+ struct rte_cryptodev_config *config)
{
struct scheduler_ctx *sched_ctx = dev->data->dev_private;
uint32_t i;
struct rte_cryptodev *slave_dev =
rte_cryptodev_pmd_get_dev(slave_dev_id);
- ret = (*slave_dev->dev_ops->dev_configure)(slave_dev);
+ ret = (*slave_dev->dev_ops->dev_configure)(slave_dev,
+ config);
if (ret < 0)
break;
}
/** Configure device */
static int
-snow3g_pmd_config(__rte_unused struct rte_cryptodev *dev)
+snow3g_pmd_config(__rte_unused struct rte_cryptodev *dev,
+ __rte_unused struct rte_cryptodev_config *config)
{
return 0;
}
/** Configure device */
static int
-zuc_pmd_config(__rte_unused struct rte_cryptodev *dev)
+zuc_pmd_config(__rte_unused struct rte_cryptodev *dev,
+ __rte_unused struct rte_cryptodev_config *config)
{
return 0;
}
return -EBUSY;
}
+ RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_configure, -ENOTSUP);
+
/* Setup new number of queue pairs and reconfigure device. */
diag = rte_cryptodev_queue_pairs_config(dev, config->nb_queue_pairs,
config->socket_id);
}
/* Setup Session mempool for device */
- return rte_cryptodev_sym_session_pool_create(dev,
+ diag = rte_cryptodev_sym_session_pool_create(dev,
config->session_mp.nb_objs,
config->session_mp.cache_size,
config->socket_id);
+ if (diag != 0)
+ return diag;
+
+ return (*dev->dev_ops->dev_configure)(dev, config);
}
* Function used to configure device.
*
* @param dev Crypto device pointer
+ * config Crypto device configurations
*
* @return Returns 0 on success
*/
-typedef int (*cryptodev_configure_t)(struct rte_cryptodev *dev);
+typedef int (*cryptodev_configure_t)(struct rte_cryptodev *dev,
+ struct rte_cryptodev_config *config);
/**
* Function used to start a configured device.