From: David Marchand Date: Tue, 20 Sep 2016 12:41:16 +0000 (+0530) Subject: cryptodev: remove PMD type X-Git-Url: http://git.droids-corp.org/?p=dpdk.git;a=commitdiff_plain;h=d94ec64e76b2ae008f54bb157f63228312391aa4 cryptodev: remove PMD type This information is not used and just adds noise. Signed-off-by: David Marchand Signed-off-by: Shreyansh Jain Reviewed-by: Jan Viktorin --- diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c index ea75562e9e..144c205453 100644 --- a/lib/librte_cryptodev/rte_cryptodev.c +++ b/lib/librte_cryptodev/rte_cryptodev.c @@ -318,7 +318,7 @@ rte_cryptodev_find_free_device_index(void) } struct rte_cryptodev * -rte_cryptodev_pmd_allocate(const char *name, enum pmd_type type, int socket_id) +rte_cryptodev_pmd_allocate(const char *name, int socket_id) { struct rte_cryptodev *cryptodev; uint8_t dev_id; @@ -357,7 +357,6 @@ rte_cryptodev_pmd_allocate(const char *name, enum pmd_type type, int socket_id) cryptodev->data->dev_started = 0; cryptodev->attached = RTE_CRYPTODEV_ATTACHED; - cryptodev->pmd_type = type; cryptodev_globals.nb_devs++; } @@ -406,7 +405,7 @@ rte_cryptodev_pmd_virtual_dev_init(const char *name, size_t dev_private_size, struct rte_cryptodev *cryptodev; /* allocate device structure */ - cryptodev = rte_cryptodev_pmd_allocate(name, PMD_VDEV, socket_id); + cryptodev = rte_cryptodev_pmd_allocate(name, socket_id); if (cryptodev == NULL) return NULL; @@ -448,8 +447,7 @@ rte_cryptodev_init(struct rte_pci_driver *pci_drv, rte_cryptodev_create_unique_device_name(cryptodev_name, sizeof(cryptodev_name), pci_dev); - cryptodev = rte_cryptodev_pmd_allocate(cryptodev_name, PMD_PDEV, - rte_socket_id()); + cryptodev = rte_cryptodev_pmd_allocate(cryptodev_name, rte_socket_id()); if (cryptodev == NULL) return -ENOMEM; diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h index 7fb5f6e4ee..417e3f9c96 100644 --- a/lib/librte_cryptodev/rte_cryptodev.h +++ b/lib/librte_cryptodev/rte_cryptodev.h @@ -620,8 +620,6 @@ struct rte_cryptodev { enum rte_cryptodev_type dev_type; /**< Crypto device type */ - enum pmd_type pmd_type; - /**< PMD type - PDEV / VDEV */ struct rte_cryptodev_cb_list link_intr_cbs; /**< User application callback for interrupts if present */ diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h index 130290ee4b..9a9174f803 100644 --- a/lib/librte_cryptodev/rte_cryptodev_pmd.h +++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h @@ -456,13 +456,12 @@ struct rte_cryptodev_ops { * to that slot for the driver to use. * * @param name Unique identifier name for each device - * @param type Device type of this Crypto device * @param socket_id Socket to allocate resources on. * @return * - Slot in the rte_dev_devices array for a new device; */ struct rte_cryptodev * -rte_cryptodev_pmd_allocate(const char *name, enum pmd_type type, int socket_id); +rte_cryptodev_pmd_allocate(const char *name, int socket_id); /** * Creates a new virtual crypto device and returns the pointer