cryptodev: change argument of driver registration
authorFiona Trahe <fiona.trahe@intel.com>
Fri, 9 Mar 2018 17:44:38 +0000 (17:44 +0000)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Mon, 23 Apr 2018 15:57:55 +0000 (16:57 +0100)
Pass an rte_driver to the RTE_PMD_REGISTER_CRYPTO_DRIVER macro
rather than an unspecified container which holds an rte_driver.
All the macro actually needs is the rte_driver, not the
container holding it.
This paves the way for a later patch in which a driver
will be registered which does not naturally derive from a
container and so avoids having to create an arbitrary container
to pass in the rte_driver.

This patch changes the cryptodev lib macro and all the
PMDs which use it.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Reviewed-by: Akhil Goyal <akhil.goyal@nxp.com>
14 files changed:
drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
drivers/crypto/armv8/rte_armv8_pmd.c
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
drivers/crypto/dpaa_sec/dpaa_sec.c
drivers/crypto/kasumi/rte_kasumi_pmd.c
drivers/crypto/mrvl/rte_mrvl_pmd.c
drivers/crypto/null/null_crypto_pmd.c
drivers/crypto/openssl/rte_openssl_pmd.c
drivers/crypto/qat/rte_qat_cryptodev.c
drivers/crypto/scheduler/scheduler_pmd.c
drivers/crypto/snow3g/rte_snow3g_pmd.c
drivers/crypto/zuc/rte_zuc_pmd.c
lib/librte_cryptodev/rte_cryptodev_pmd.h

index 83e5448..c907551 100644 (file)
@@ -570,5 +570,5 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_GCM_PMD,
        "max_nb_queue_pairs=<int> "
        "max_nb_sessions=<int> "
        "socket_id=<int>");
-RTE_PMD_REGISTER_CRYPTO_DRIVER(aesni_gcm_crypto_drv, aesni_gcm_pmd_drv,
+RTE_PMD_REGISTER_CRYPTO_DRIVER(aesni_gcm_crypto_drv, aesni_gcm_pmd_drv.driver,
                cryptodev_driver_id);
index 636c6c3..cb97175 100644 (file)
@@ -931,5 +931,5 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_MB_PMD,
        "max_nb_sessions=<int> "
        "socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(aesni_mb_crypto_drv,
-               cryptodev_aesni_mb_pmd_drv,
+               cryptodev_aesni_mb_pmd_drv.driver,
                cryptodev_driver_id);
index 59fffcf..1fe82cc 100644 (file)
@@ -850,5 +850,5 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_ARMV8_PMD,
        "max_nb_queue_pairs=<int> "
        "max_nb_sessions=<int> "
        "socket_id=<int>");
-RTE_PMD_REGISTER_CRYPTO_DRIVER(armv8_crypto_drv, armv8_crypto_pmd_drv,
+RTE_PMD_REGISTER_CRYPTO_DRIVER(armv8_crypto_drv, armv8_crypto_pmd_drv.driver,
                cryptodev_driver_id);
index 3700d70..7542e84 100644 (file)
@@ -2919,8 +2919,8 @@ static struct rte_dpaa2_driver rte_dpaa2_sec_driver = {
 static struct cryptodev_driver dpaa2_sec_crypto_drv;
 
 RTE_PMD_REGISTER_DPAA2(CRYPTODEV_NAME_DPAA2_SEC_PMD, rte_dpaa2_sec_driver);
-RTE_PMD_REGISTER_CRYPTO_DRIVER(dpaa2_sec_crypto_drv, rte_dpaa2_sec_driver,
-               cryptodev_driver_id);
+RTE_PMD_REGISTER_CRYPTO_DRIVER(dpaa2_sec_crypto_drv,
+               rte_dpaa2_sec_driver.driver, cryptodev_driver_id);
 
 RTE_INIT(dpaa2_sec_init_log);
 static void
index b685220..60c29be 100644 (file)
@@ -2427,5 +2427,5 @@ static struct rte_dpaa_driver rte_dpaa_sec_driver = {
 static struct cryptodev_driver dpaa_sec_crypto_drv;
 
 RTE_PMD_REGISTER_DPAA(CRYPTODEV_NAME_DPAA_SEC_PMD, rte_dpaa_sec_driver);
-RTE_PMD_REGISTER_CRYPTO_DRIVER(dpaa_sec_crypto_drv, rte_dpaa_sec_driver,
+RTE_PMD_REGISTER_CRYPTO_DRIVER(dpaa_sec_crypto_drv, rte_dpaa_sec_driver.driver,
                cryptodev_driver_id);
index 356621d..08ee900 100644 (file)
@@ -619,5 +619,5 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_KASUMI_PMD,
        "max_nb_queue_pairs=<int> "
        "max_nb_sessions=<int> "
        "socket_id=<int>");
-RTE_PMD_REGISTER_CRYPTO_DRIVER(kasumi_crypto_drv, cryptodev_kasumi_pmd_drv,
-               cryptodev_driver_id);
+RTE_PMD_REGISTER_CRYPTO_DRIVER(kasumi_crypto_drv,
+               cryptodev_kasumi_pmd_drv.driver, cryptodev_driver_id);
index a93236f..1b6029a 100644 (file)
@@ -825,5 +825,5 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_MRVL_PMD,
        "max_nb_queue_pairs=<int> "
        "max_nb_sessions=<int> "
        "socket_id=<int>");
-RTE_PMD_REGISTER_CRYPTO_DRIVER(mrvl_crypto_drv, cryptodev_mrvl_pmd_drv,
+RTE_PMD_REGISTER_CRYPTO_DRIVER(mrvl_crypto_drv, cryptodev_mrvl_pmd_drv.driver,
                cryptodev_driver_id);
index dc8e577..052b654 100644 (file)
@@ -247,5 +247,5 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_NULL_PMD,
        "max_nb_queue_pairs=<int> "
        "max_nb_sessions=<int> "
        "socket_id=<int>");
-RTE_PMD_REGISTER_CRYPTO_DRIVER(null_crypto_drv, cryptodev_null_pmd_drv,
+RTE_PMD_REGISTER_CRYPTO_DRIVER(null_crypto_drv, cryptodev_null_pmd_drv.driver,
                cryptodev_driver_id);
index 0d9bedc..f584d0d 100644 (file)
@@ -1733,5 +1733,5 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_OPENSSL_PMD,
        "max_nb_queue_pairs=<int> "
        "max_nb_sessions=<int> "
        "socket_id=<int>");
-RTE_PMD_REGISTER_CRYPTO_DRIVER(openssl_crypto_drv, cryptodev_openssl_pmd_drv,
-               cryptodev_driver_id);
+RTE_PMD_REGISTER_CRYPTO_DRIVER(openssl_crypto_drv,
+               cryptodev_openssl_pmd_drv.driver, cryptodev_driver_id);
index bf83740..03a9c81 100644 (file)
@@ -176,5 +176,5 @@ static struct cryptodev_driver qat_crypto_drv;
 
 RTE_PMD_REGISTER_PCI(CRYPTODEV_NAME_QAT_SYM_PMD, rte_qat_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(CRYPTODEV_NAME_QAT_SYM_PMD, pci_id_qat_map);
-RTE_PMD_REGISTER_CRYPTO_DRIVER(qat_crypto_drv, rte_qat_pmd,
+RTE_PMD_REGISTER_CRYPTO_DRIVER(qat_crypto_drv, rte_qat_pmd.driver,
                cryptodev_qat_driver_id);
index 51a85fa..ba03b9e 100644 (file)
@@ -468,5 +468,5 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_SCHEDULER_PMD,
        "socket_id=<int> "
        "slave=<name>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(scheduler_crypto_drv,
-               cryptodev_scheduler_pmd_drv,
+               cryptodev_scheduler_pmd_drv.driver,
                cryptodev_driver_id);
index 27af69f..5edc0fa 100644 (file)
@@ -619,5 +619,5 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_SNOW3G_PMD,
        "max_nb_queue_pairs=<int> "
        "max_nb_sessions=<int> "
        "socket_id=<int>");
-RTE_PMD_REGISTER_CRYPTO_DRIVER(snow3g_crypto_drv, cryptodev_snow3g_pmd_drv,
-               cryptodev_driver_id);
+RTE_PMD_REGISTER_CRYPTO_DRIVER(snow3g_crypto_drv,
+               cryptodev_snow3g_pmd_drv.driver, cryptodev_driver_id);
index ad65b80..167c3c6 100644 (file)
@@ -524,5 +524,5 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_ZUC_PMD,
        "max_nb_queue_pairs=<int> "
        "max_nb_sessions=<int> "
        "socket_id=<int>");
-RTE_PMD_REGISTER_CRYPTO_DRIVER(zuc_crypto_drv, cryptodev_zuc_pmd_drv,
+RTE_PMD_REGISTER_CRYPTO_DRIVER(zuc_crypto_drv, cryptodev_zuc_pmd_drv.driver,
                cryptodev_driver_id);
index 089848e..69d7769 100644 (file)
@@ -519,7 +519,7 @@ uint8_t rte_cryptodev_allocate_driver(struct cryptodev_driver *crypto_drv,
 RTE_INIT(init_ ##driver_id);\
 static void init_ ##driver_id(void)\
 {\
-       driver_id = rte_cryptodev_allocate_driver(&crypto_drv, &(drv).driver);\
+       driver_id = rte_cryptodev_allocate_driver(&crypto_drv, &(drv));\
 }
 
 static inline void *