The VDEV code will move to the bus drivers directory.
Rename functions from rte_eal_vdev_ to rte_vdev_
to prepare the move of the driver out of EAL.
The prefix rte_eal_vdrv_ is also renamed to rte_vdev_.
It was used for registration of vdev drivers.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
To use the PMD in an application, user must:
-* Call rte_eal_vdev_init("crypto_aesni_gcm") within the application.
+* Call rte_vdev_init("crypto_aesni_gcm") within the application.
-* Use --vdev="crypto_aesni_gcm" in the EAL options, which will call rte_eal_vdev_init() internally.
+* Use --vdev="crypto_aesni_gcm" in the EAL options, which will call rte_vdev_init() internally.
The following parameters (all optional) can be provided in the previous two calls:
To use the PMD in an application, user must:
-* Call rte_eal_vdev_init("crypto_aesni_mb") within the application.
+* Call rte_vdev_init("crypto_aesni_mb") within the application.
-* Use --vdev="crypto_aesni_mb" in the EAL options, which will call rte_eal_vdev_init() internally.
+* Use --vdev="crypto_aesni_mb" in the EAL options, which will call rte_vdev_init() internally.
The following parameters (all optional) can be provided in the previous two calls:
To use the PMD in an application, user must:
-* Call rte_eal_vdev_init("crypto_kasumi") within the application.
+* Call rte_vdev_init("crypto_kasumi") within the application.
-* Use --vdev="crypto_kasumi" in the EAL options, which will call rte_eal_vdev_init() internally.
+* Use --vdev="crypto_kasumi" in the EAL options, which will call rte_vdev_init() internally.
The following parameters (all optional) can be provided in the previous two calls:
To use the PMD in an application, user must:
-* Call rte_eal_vdev_init("crypto_null") within the application.
+* Call rte_vdev_init("crypto_null") within the application.
-* Use --vdev="crypto_null" in the EAL options, which will call rte_eal_vdev_init() internally.
+* Use --vdev="crypto_null" in the EAL options, which will call rte_vdev_init() internally.
The following parameters (all optional) can be provided in the previous two calls:
To use the PMD in an application, user must:
-* Call rte_eal_vdev_init("crpyto_scheduler") within the application.
+* Call rte_vdev_init("crpyto_scheduler") within the application.
* Use --vdev="crpyto_scheduler" in the EAL options, which will call
- rte_eal_vdev_init() internally.
+ rte_vdev_init() internally.
The following parameters (all optional) can be provided in the previous
To use the PMD in an application, user must:
-* Call rte_eal_vdev_init("crypto_snow3g") within the application.
+* Call rte_vdev_init("crypto_snow3g") within the application.
-* Use --vdev="crypto_snow3g" in the EAL options, which will call rte_eal_vdev_init() internally.
+* Use --vdev="crypto_snow3g" in the EAL options, which will call rte_vdev_init() internally.
The following parameters (all optional) can be provided in the previous two calls:
To use the PMD in an application, user must:
-* Call rte_eal_vdev_init("crypto_zuc") within the application.
+* Call rte_vdev_init("crypto_zuc") within the application.
-* Use --vdev="crypto_zuc" in the EAL options, which will call rte_eal_vdev_init() internally.
+* Use --vdev="crypto_zuc" in the EAL options, which will call rte_vdev_init() internally.
The following parameters (all optional) can be provided in the previous two calls:
from the application code, or from the EAL command line based on
the number of probed/bound SSO PCIe VF device to DPDK by
-* Invoking ``rte_eal_vdev_init("event_octeontx")`` from the application
+* Invoking ``rte_vdev_init("event_octeontx")`` from the application
* Using ``--vdev="event_octeontx"`` in the EAL options, which will call
- rte_eal_vdev_init() internally
+ rte_vdev_init() internally
Example:
The software eventdev is a vdev device, and as such can be created from the
application code, or from the EAL command line:
-* Call ``rte_eal_vdev_init("event_sw0")`` from the application
+* Call ``rte_vdev_init("event_sw0")`` from the application
* Use ``--vdev="event_sw0"`` in the EAL options, which will call
- rte_eal_vdev_init() internally
+ rte_vdev_init() internally
Example:
--vdev 'cryptodev_aesni_mb_pmd0,max_nb_queue_pairs=2,max_nb_sessions=1024,socket_id=0'
-Our using the rte_eal_vdev_init API within the application code.
+Our using the rte_vdev_init API within the application code.
.. code-block:: c
- rte_eal_vdev_init("cryptodev_aesni_mb_pmd",
+ rte_vdev_init("cryptodev_aesni_mb_pmd",
"max_nb_queue_pairs=2,max_nb_sessions=1024,socket_id=0")
All virtual Crypto devices support the following initialization parameters:
if (ret < 0 || ret >= (int)sizeof(devargs))
return -ENOMEM;
- ret = rte_eal_vdev_init(name, devargs);
+ ret = rte_vdev_init(name, devargs);
if (ret)
return -ENOMEM;
int
rte_eth_bond_free(const char *name)
{
- return rte_eal_vdev_uninit(name);
+ return rte_vdev_uninit(name);
}
static int
int
rte_cryptodev_create_vdev(const char *name, const char *args)
{
- return rte_eal_vdev_init(name, args);
+ return rte_vdev_init(name, args);
}
struct rte_cryptodev *
rte_eal_remote_launch;
rte_eal_tailq_lookup;
rte_eal_tailq_register;
- rte_eal_vdev_init;
- rte_eal_vdev_uninit;
rte_eal_wait_lcore;
rte_exit;
rte_free;
rte_delay_us_callback_register;
rte_eal_dev_attach;
rte_eal_dev_detach;
- rte_eal_vdrv_register;
- rte_eal_vdrv_unregister;
} DPDK_16.07;
rte_pci_unmap_device;
rte_pci_unregister;
rte_pci_write_config;
+ rte_vdev_init;
+ rte_vdev_register;
+ rte_vdev_uninit;
+ rte_vdev_unregister;
vfio_get_container_fd;
vfio_get_group_fd;
vfio_get_group_no;
goto err;
} else {
- if (rte_eal_vdev_init(name, devargs))
+ if (rte_vdev_init(name, devargs))
goto err;
}
if (rte_pci_detach(&addr) < 0)
goto err;
} else {
- if (rte_eal_vdev_uninit(name))
+ if (rte_vdev_uninit(name))
goto err;
}
return 0;
/* register a driver */
void
-rte_eal_vdrv_register(struct rte_vdev_driver *driver)
+rte_vdev_register(struct rte_vdev_driver *driver)
{
rte_vdev_bus_register();
/* unregister a driver */
void
-rte_eal_vdrv_unregister(struct rte_vdev_driver *driver)
+rte_vdev_unregister(struct rte_vdev_driver *driver)
{
TAILQ_REMOVE(&vdev_driver_list, driver, next);
}
}
int
-rte_eal_vdev_init(const char *name, const char *args)
+rte_vdev_init(const char *name, const char *args)
{
struct rte_vdev_device *dev;
struct rte_devargs *devargs;
}
int
-rte_eal_vdev_uninit(const char *name)
+rte_vdev_uninit(const char *name)
{
struct rte_vdev_device *dev;
struct rte_devargs *devargs;
* @return
* 0 on success, negative on error
*/
-int rte_eal_vdev_init(const char *name, const char *args);
+int rte_vdev_init(const char *name, const char *args);
/**
* Uninitalize a driver specified by name.
* @return
* 0 on success, negative on error
*/
-int rte_eal_vdev_uninit(const char *name);
+int rte_vdev_uninit(const char *name);
/**
* Attach a device to a registered driver.
* A pointer to a rte_vdev_driver structure describing the driver
* to be registered.
*/
-void rte_eal_vdrv_register(struct rte_vdev_driver *driver);
+void rte_vdev_register(struct rte_vdev_driver *driver);
/**
* Unregister a virtual device driver.
* A pointer to a rte_vdev_driver structure describing the driver
* to be unregistered.
*/
-void rte_eal_vdrv_unregister(struct rte_vdev_driver *driver);
+void rte_vdev_unregister(struct rte_vdev_driver *driver);
#define RTE_PMD_REGISTER_VDEV(nm, vdrv)\
RTE_INIT(vdrvinitfn_ ##vdrv);\
{\
(vdrv).driver.name = RTE_STR(nm);\
(vdrv).driver.alias = vdrvinit_ ## nm ## _alias;\
- rte_eal_vdrv_register(&vdrv);\
+ rte_vdev_register(&vdrv);\
} \
RTE_PMD_EXPORT_NAME(nm, __COUNTER__)
rte_eal_remote_launch;
rte_eal_tailq_lookup;
rte_eal_tailq_register;
- rte_eal_vdev_init;
- rte_eal_vdev_uninit;
rte_eal_wait_lcore;
rte_exit;
rte_free;
rte_delay_us_callback_register;
rte_eal_dev_attach;
rte_eal_dev_detach;
- rte_eal_vdrv_register;
- rte_eal_vdrv_unregister;
} DPDK_16.07;
rte_pci_unmap_device;
rte_pci_unregister;
rte_pci_write_config;
+ rte_vdev_init;
+ rte_vdev_register;
+ rte_vdev_uninit;
+ rte_vdev_unregister;
vfio_get_container_fd;
vfio_get_group_fd;
vfio_get_group_no;
nb_devs = rte_cryptodev_count_devtype(
RTE_CRYPTODEV_AESNI_MB_PMD);
if (nb_devs < 1) {
- ret = rte_eal_vdev_init(
+ ret = rte_vdev_init(
RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD), NULL);
TEST_ASSERT(ret == 0,
nb_devs = rte_cryptodev_count_devtype(
RTE_CRYPTODEV_AESNI_GCM_PMD);
if (nb_devs < 1) {
- TEST_ASSERT_SUCCESS(rte_eal_vdev_init(
+ TEST_ASSERT_SUCCESS(rte_vdev_init(
RTE_STR(CRYPTODEV_NAME_AESNI_GCM_PMD), NULL),
"Failed to create instance of"
" pmd : %s",
#endif
nb_devs = rte_cryptodev_count_devtype(RTE_CRYPTODEV_SNOW3G_PMD);
if (nb_devs < 1) {
- TEST_ASSERT_SUCCESS(rte_eal_vdev_init(
+ TEST_ASSERT_SUCCESS(rte_vdev_init(
RTE_STR(CRYPTODEV_NAME_SNOW3G_PMD), NULL),
"Failed to create instance of"
" pmd : %s",
#endif
nb_devs = rte_cryptodev_count_devtype(RTE_CRYPTODEV_KASUMI_PMD);
if (nb_devs < 1) {
- TEST_ASSERT_SUCCESS(rte_eal_vdev_init(
+ TEST_ASSERT_SUCCESS(rte_vdev_init(
RTE_STR(CRYPTODEV_NAME_KASUMI_PMD), NULL),
"Failed to create instance of"
" pmd : %s",
#endif
nb_devs = rte_cryptodev_count_devtype(RTE_CRYPTODEV_ZUC_PMD);
if (nb_devs < 1) {
- TEST_ASSERT_SUCCESS(rte_eal_vdev_init(
+ TEST_ASSERT_SUCCESS(rte_vdev_init(
RTE_STR(CRYPTODEV_NAME_ZUC_PMD), NULL),
"Failed to create instance of"
" pmd : %s",
nb_devs = rte_cryptodev_count_devtype(
RTE_CRYPTODEV_NULL_PMD);
if (nb_devs < 1) {
- ret = rte_eal_vdev_init(
+ ret = rte_vdev_init(
RTE_STR(CRYPTODEV_NAME_NULL_PMD), NULL);
TEST_ASSERT(ret == 0,
nb_devs = rte_cryptodev_count_devtype(
RTE_CRYPTODEV_OPENSSL_PMD);
if (nb_devs < 1) {
- ret = rte_eal_vdev_init(
+ ret = rte_vdev_init(
RTE_STR(CRYPTODEV_NAME_OPENSSL_PMD),
NULL);
nb_devs = rte_cryptodev_count_devtype(
RTE_CRYPTODEV_ARMV8_PMD);
if (nb_devs < 1) {
- ret = rte_eal_vdev_init(
+ ret = rte_vdev_init(
RTE_STR(CRYPTODEV_NAME_ARMV8_PMD),
NULL);
nb_devs = rte_cryptodev_count_devtype(
RTE_CRYPTODEV_SCHEDULER_PMD);
if (nb_devs < 1) {
- ret = rte_eal_vdev_init(
+ ret = rte_vdev_init(
RTE_STR(CRYPTODEV_NAME_SCHEDULER_PMD),
NULL);
snprintf(vdev_name, sizeof(vdev_name), "%s_%u",
RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD),
i);
- ret = rte_eal_vdev_init(vdev_name, NULL);
+ ret = rte_vdev_init(vdev_name, NULL);
TEST_ASSERT(ret == 0,
"Failed to create instance %u of"
#endif
nb_devs = rte_cryptodev_count_devtype(RTE_CRYPTODEV_AESNI_MB_PMD);
if (nb_devs < 1) {
- ret = rte_eal_vdev_init(
+ ret = rte_vdev_init(
RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD), NULL);
TEST_ASSERT(ret == 0,
#endif
nb_devs = rte_cryptodev_count_devtype(RTE_CRYPTODEV_AESNI_GCM_PMD);
if (nb_devs < 1) {
- ret = rte_eal_vdev_init(
+ ret = rte_vdev_init(
RTE_STR(CRYPTODEV_NAME_AESNI_GCM_PMD), NULL);
TEST_ASSERT(ret == 0,
#endif
nb_devs = rte_cryptodev_count_devtype(RTE_CRYPTODEV_SNOW3G_PMD);
if (nb_devs < 1) {
- ret = rte_eal_vdev_init(
+ ret = rte_vdev_init(
RTE_STR(CRYPTODEV_NAME_SNOW3G_PMD), NULL);
TEST_ASSERT(ret == 0,
nb_devs = rte_cryptodev_count_devtype(
RTE_CRYPTODEV_OPENSSL_PMD);
if (nb_devs < 1) {
- ret = rte_eal_vdev_init(
+ ret = rte_vdev_init(
RTE_STR(CRYPTODEV_NAME_OPENSSL_PMD),
NULL);
nb_devs = rte_cryptodev_count_devtype(
RTE_CRYPTODEV_ARMV8_PMD);
if (nb_devs < 1) {
- ret = rte_eal_vdev_init(
+ ret = rte_vdev_init(
RTE_STR(CRYPTODEV_NAME_ARMV8_PMD),
NULL);
if (!count) {
printf("Failed to find a valid event device,"
" testing with event_skeleton device\n");
- return rte_eal_vdev_init("event_skeleton", NULL);
+ return rte_vdev_init("event_skeleton", NULL);
}
return TEST_SUCCESS;
}
if (evdev < 0) {
printf("%d: Eventdev %s not found - creating.\n",
__LINE__, eventdev_name);
- if (rte_eal_vdev_init(eventdev_name, NULL) < 0) {
+ if (rte_vdev_init(eventdev_name, NULL) < 0) {
printf("Error creating eventdev %s\n", eventdev_name);
return TEST_FAILED;
}
if (evdev < 0) {
printf("%d: Eventdev %s not found - creating.\n",
__LINE__, eventdev_name);
- if (rte_eal_vdev_init(eventdev_name, NULL) < 0) {
+ if (rte_vdev_init(eventdev_name, NULL) < 0) {
printf("Error creating eventdev\n");
return -1;
}
port_id = rte_eth_dev_count();
snprintf(name, sizeof(name), SLAVE_DEV_NAME_FMT, port_id);
- retval = rte_eal_vdev_init(name,
+ retval = rte_vdev_init(name,
"driver=net_null,size=64,copy=0");
TEST_ASSERT_SUCCESS(retval, "Failed to create null device '%s'\n",
name);