[dpdk-dev,11/11] crypto/ccp: update CCP PMD code-base
Checks
Commit Message
Signed-off-by: Ravi Kumar <Ravi1.kumar@amd.com>
---
drivers/crypto/ccp/ccp_dev.h | 1 +
drivers/crypto/ccp/ccp_pci.h | 2 +-
drivers/crypto/ccp/rte_ccp_pmd.c | 31 ++++++++++++++++++-------------
3 files changed, 20 insertions(+), 14 deletions(-)
Comments
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ravi Kumar
> Sent: Thursday, November 30, 2017 1:13 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH 11/11] crypto/ccp: update CCP PMD code-base
>
> Signed-off-by: Ravi Kumar <Ravi1.kumar@amd.com>
It looks like this is an incremental patch for the latest changes made in cryptodev.
This patch should be integrated mostly (if not all), in patch 2, otherwise, that patch won't compile
(the patchset must be able to be compiled for every single patch, so for instance, patch 2 must be able
to be compiled, having only patch 1 applied (so you don't break git bisect).
@@ -36,6 +36,7 @@
#include <stdint.h>
#include <string.h>
+#include <rte_bus_pci.h>
#include <rte_atomic.h>
#include <rte_byteorder.h>
#include <rte_io.h>
@@ -33,7 +33,7 @@
#include <stdint.h>
-#include <rte_pci.h>
+#include <rte_bus_pci.h>
#define SYSFS_PCI_DEVICES "/sys/bus/pci/devices"
#define PROC_MODULES "/proc/modules"
@@ -28,12 +28,14 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <rte_bus_pci.h>
+#include <rte_bus_vdev.h>
#include <rte_common.h>
#include <rte_config.h>
#include <rte_cryptodev.h>
#include <rte_cryptodev_pmd.h>
-#include <rte_cryptodev_vdev.h>
-#include <rte_vdev.h>
+#include <rte_pci.h>
+#include <rte_dev.h>
#include <rte_malloc.h>
#include <ccp_crypto.h>
@@ -176,7 +178,7 @@ cryptodev_ccp_remove(struct rte_vdev_device *dev)
static int
cryptodev_ccp_create(const char *name,
struct rte_vdev_device *vdev,
- struct rte_crypto_vdev_init_params *init_params)
+ struct rte_cryptodev_pmd_init_params *init_params)
{
struct rte_cryptodev *dev;
struct ccp_private *internals;
@@ -186,10 +188,9 @@ cryptodev_ccp_create(const char *name,
snprintf(init_params->name, sizeof(init_params->name),
"%s", name);
- dev = rte_cryptodev_vdev_pmd_init(init_params->name,
- sizeof(struct ccp_private),
- init_params->socket_id,
- vdev);
+ dev = rte_cryptodev_pmd_create(init_params->name,
+ &vdev->device,
+ init_params);
if (dev == NULL) {
CCP_LOG_ERR("failed to create cryptodev vdev");
goto init_error;
@@ -236,11 +237,12 @@ cryptodev_ccp_probe(struct rte_vdev_device *vdev)
{
int rc = 0;
const char *name;
- struct rte_crypto_vdev_init_params init_params = {
- CCP_PMD_MAX_QUEUE_PAIRS,
- RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_SESSIONS,
+ struct rte_cryptodev_pmd_init_params init_params = {
+ "",
+ sizeof(struct ccp_private),
rte_socket_id(),
- {0}
+ CCP_PMD_MAX_QUEUE_PAIRS,
+ RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
};
const char *input_args;
@@ -253,7 +255,7 @@ cryptodev_ccp_probe(struct rte_vdev_device *vdev)
return -EINVAL;
input_args = rte_vdev_device_args(vdev);
- rte_cryptodev_vdev_parse_init_params(&init_params, input_args);
+ rte_cryptodev_pmd_parse_input_args(&init_params, input_args);
init_params.max_nb_queue_pairs = CCP_PMD_MAX_QUEUE_PAIRS;
RTE_LOG(INFO, PMD, "Initialising %s on NUMA node %d\n", name,
@@ -275,7 +277,10 @@ static struct rte_vdev_driver cryptodev_ccp_pmd_drv = {
.remove = cryptodev_ccp_remove
};
+static struct cryptodev_driver ccp_crypto_drv;
+
RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_CCP_PMD, cryptodev_ccp_pmd_drv);
RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_CCP_PMD,
"max_nb_queue_pairs=<int> max_nb_sessions=<int> socket_id=<int>");
-RTE_PMD_REGISTER_CRYPTO_DRIVER(cryptodev_ccp_pmd_drv, ccp_cryptodev_driver_id);
+RTE_PMD_REGISTER_CRYPTO_DRIVER(ccp_crypto_drv, cryptodev_ccp_pmd_drv,
+ ccp_cryptodev_driver_id);