Signed-off-by: Ravi Kumar <ravi1.ku...@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(-)
diff --git a/drivers/crypto/ccp/ccp_dev.h b/drivers/crypto/ccp/ccp_dev.h index 28eb68e..832407a 100644 --- a/drivers/crypto/ccp/ccp_dev.h +++ b/drivers/crypto/ccp/ccp_dev.h @@ -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> diff --git a/drivers/crypto/ccp/ccp_pci.h b/drivers/crypto/ccp/ccp_pci.h index a0edf75..292234d 100644 --- a/drivers/crypto/ccp/ccp_pci.h +++ b/drivers/crypto/ccp/ccp_pci.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" diff --git a/drivers/crypto/ccp/rte_ccp_pmd.c b/drivers/crypto/ccp/rte_ccp_pmd.c index d46c07c..f1369be 100644 --- a/drivers/crypto/ccp/rte_ccp_pmd.c +++ b/drivers/crypto/ccp/rte_ccp_pmd.c @@ -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); -- 2.7.4