return nb_dequeued;
}
-static int aesni_gcm_uninit(const char *name);
+static int aesni_gcm_remove(const char *name);
static int
aesni_gcm_create(const char *name,
init_error:
GCM_LOG_ERR("driver %s: create failed", name);
- aesni_gcm_uninit(crypto_dev_name);
+ aesni_gcm_remove(crypto_dev_name);
return -EFAULT;
}
static int
-aesni_gcm_init(const char *name, const char *input_args)
+aesni_gcm_probe(const char *name, const char *input_args)
{
struct rte_crypto_vdev_init_params init_params = {
RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_QUEUE_PAIRS,
}
static int
-aesni_gcm_uninit(const char *name)
+aesni_gcm_remove(const char *name)
{
if (name == NULL)
return -EINVAL;
}
static struct rte_vdev_driver aesni_gcm_pmd_drv = {
- .init = aesni_gcm_init,
- .uninit = aesni_gcm_uninit
+ .probe = aesni_gcm_probe,
+ .remove = aesni_gcm_remove
};
DRIVER_REGISTER_VDEV(CRYPTODEV_NAME_AESNI_GCM_PMD, aesni_gcm_pmd_drv);
}
-static int cryptodev_aesni_mb_uninit(const char *name);
+static int cryptodev_aesni_mb_remove(const char *name);
static int
cryptodev_aesni_mb_create(const char *name,
init_error:
MB_LOG_ERR("driver %s: cryptodev_aesni_create failed", name);
- cryptodev_aesni_mb_uninit(crypto_dev_name);
+ cryptodev_aesni_mb_remove(crypto_dev_name);
return -EFAULT;
}
static int
-cryptodev_aesni_mb_init(const char *name,
+cryptodev_aesni_mb_probe(const char *name,
const char *input_args)
{
struct rte_crypto_vdev_init_params init_params = {
}
static int
-cryptodev_aesni_mb_uninit(const char *name)
+cryptodev_aesni_mb_remove(const char *name)
{
if (name == NULL)
return -EINVAL;
}
static struct rte_vdev_driver cryptodev_aesni_mb_pmd_drv = {
- .init = cryptodev_aesni_mb_init,
- .uninit = cryptodev_aesni_mb_uninit
+ .probe = cryptodev_aesni_mb_probe,
+ .remove = cryptodev_aesni_mb_remove
};
DRIVER_REGISTER_VDEV(CRYPTODEV_NAME_AESNI_MB_PMD, cryptodev_aesni_mb_pmd_drv);
return nb_dequeued;
}
-static int cryptodev_kasumi_uninit(const char *name);
+static int cryptodev_kasumi_remove(const char *name);
static int
cryptodev_kasumi_create(const char *name,
init_error:
KASUMI_LOG_ERR("driver %s: cryptodev_kasumi_create failed", name);
- cryptodev_kasumi_uninit(crypto_dev_name);
+ cryptodev_kasumi_remove(crypto_dev_name);
return -EFAULT;
}
static int
-cryptodev_kasumi_init(const char *name,
+cryptodev_kasumi_probe(const char *name,
const char *input_args)
{
struct rte_crypto_vdev_init_params init_params = {
}
static int
-cryptodev_kasumi_uninit(const char *name)
+cryptodev_kasumi_remove(const char *name)
{
if (name == NULL)
return -EINVAL;
}
static struct rte_vdev_driver cryptodev_kasumi_pmd_drv = {
- .init = cryptodev_kasumi_init,
- .uninit = cryptodev_kasumi_uninit
+ .probe = cryptodev_kasumi_probe,
+ .remove = cryptodev_kasumi_remove
};
DRIVER_REGISTER_VDEV(CRYPTODEV_NAME_KASUMI_PMD, cryptodev_kasumi_pmd_drv);
return nb_dequeued;
}
-static int cryptodev_null_uninit(const char *name);
+static int cryptodev_null_remove(const char *name);
/** Create crypto device */
static int
init_error:
NULL_CRYPTO_LOG_ERR("driver %s: cryptodev_null_create failed", name);
- cryptodev_null_uninit(crypto_dev_name);
+ cryptodev_null_remove(crypto_dev_name);
return -EFAULT;
}
/** Initialise null crypto device */
static int
-cryptodev_null_init(const char *name,
+cryptodev_null_probe(const char *name,
const char *input_args)
{
struct rte_crypto_vdev_init_params init_params = {
/** Uninitialise null crypto device */
static int
-cryptodev_null_uninit(const char *name)
+cryptodev_null_remove(const char *name)
{
if (name == NULL)
return -EINVAL;
}
static struct rte_vdev_driver cryptodev_null_pmd_drv = {
- .init = cryptodev_null_init,
- .uninit = cryptodev_null_uninit
+ .probe = cryptodev_null_probe,
+ .remove = cryptodev_null_remove
};
DRIVER_REGISTER_VDEV(CRYPTODEV_NAME_NULL_PMD, cryptodev_null_pmd_drv);
return nb_dequeued;
}
-static int cryptodev_snow3g_uninit(const char *name);
+static int cryptodev_snow3g_remove(const char *name);
static int
cryptodev_snow3g_create(const char *name,
init_error:
SNOW3G_LOG_ERR("driver %s: cryptodev_snow3g_create failed", name);
- cryptodev_snow3g_uninit(crypto_dev_name);
+ cryptodev_snow3g_remove(crypto_dev_name);
return -EFAULT;
}
static int
-cryptodev_snow3g_init(const char *name,
+cryptodev_snow3g_probe(const char *name,
const char *input_args)
{
struct rte_crypto_vdev_init_params init_params = {
}
static int
-cryptodev_snow3g_uninit(const char *name)
+cryptodev_snow3g_remove(const char *name)
{
if (name == NULL)
return -EINVAL;
}
static struct rte_vdev_driver cryptodev_snow3g_pmd_drv = {
- .init = cryptodev_snow3g_init,
- .uninit = cryptodev_snow3g_uninit
+ .probe = cryptodev_snow3g_probe,
+ .remove = cryptodev_snow3g_remove
};
DRIVER_REGISTER_VDEV(CRYPTODEV_NAME_SNOW3G_PMD, cryptodev_snow3g_pmd_drv);
}
static int
-rte_pmd_af_packet_devinit(const char *name, const char *params)
+rte_pmd_af_packet_probe(const char *name, const char *params)
{
unsigned numa_node;
int ret = 0;
}
static int
-rte_pmd_af_packet_devuninit(const char *name)
+rte_pmd_af_packet_remove(const char *name)
{
struct rte_eth_dev *eth_dev = NULL;
struct pmd_internals *internals;
}
static struct rte_vdev_driver pmd_af_packet_drv = {
- .init = rte_pmd_af_packet_devinit,
- .uninit = rte_pmd_af_packet_devuninit,
+ .probe = rte_pmd_af_packet_probe,
+ .remove = rte_pmd_af_packet_remove,
};
DRIVER_REGISTER_VDEV(net_af_packet, pmd_af_packet_drv);
};
static int
-bond_init(const char *name, const char *params)
+bond_probe(const char *name, const char *params)
{
struct bond_dev_private *internals;
struct rte_kvargs *kvlist;
}
static int
-bond_uninit(const char *name)
+bond_remove(const char *name)
{
int ret;
}
static struct rte_vdev_driver bond_drv = {
- .init = bond_init,
- .uninit = bond_uninit,
+ .probe = bond_probe,
+ .remove = bond_remove,
};
DRIVER_REGISTER_VDEV(net_bonding, bond_drv);
}
static int
-rte_pmd_mpipe_devinit(const char *ifname,
+rte_pmd_mpipe_probe(const char *ifname,
const char *params __rte_unused)
{
gxio_mpipe_context_t *context;
}
static struct rte_vdev_driver pmd_mpipe_xgbe_drv = {
- .init = rte_pmd_mpipe_devinit,
+ .probe = rte_pmd_mpipe_probe,
};
static struct rte_vdev_driver pmd_mpipe_gbe_drv = {
- .init = rte_pmd_mpipe_devinit,
+ .probe = rte_pmd_mpipe_probe,
};
DRIVER_REGISTER_VDEV(net_mpipe_xgbe, pmd_mpipe_xgbe_drv);
}
static int
-rte_pmd_null_devinit(const char *name, const char *params)
+rte_pmd_null_probe(const char *name, const char *params)
{
unsigned numa_node;
unsigned packet_size = default_packet_size;
}
static int
-rte_pmd_null_devuninit(const char *name)
+rte_pmd_null_remove(const char *name)
{
struct rte_eth_dev *eth_dev = NULL;
}
static struct rte_vdev_driver pmd_null_drv = {
- .init = rte_pmd_null_devinit,
- .uninit = rte_pmd_null_devuninit,
+ .probe = rte_pmd_null_probe,
+ .remove = rte_pmd_null_remove,
};
DRIVER_REGISTER_VDEV(net_null, pmd_null_drv);
}
static int
-pmd_pcap_devinit(const char *name, const char *params)
+pmd_pcap_probe(const char *name, const char *params)
{
unsigned int is_rx_pcap = 0, is_tx_pcap = 0;
struct rte_kvargs *kvlist;
}
static int
-pmd_pcap_devuninit(const char *name)
+pmd_pcap_remove(const char *name)
{
struct rte_eth_dev *eth_dev = NULL;
}
static struct rte_vdev_driver pmd_pcap_drv = {
- .init = pmd_pcap_devinit,
- .uninit = pmd_pcap_devuninit,
+ .probe = pmd_pcap_probe,
+ .remove = pmd_pcap_remove,
};
DRIVER_REGISTER_VDEV(net_pcap, pmd_pcap_drv);
}
static int
-rte_pmd_ring_devinit(const char *name, const char *params)
+rte_pmd_ring_probe(const char *name, const char *params)
{
struct rte_kvargs *kvlist = NULL;
int ret = 0;
}
static int
-rte_pmd_ring_devuninit(const char *name)
+rte_pmd_ring_remove(const char *name)
{
struct rte_eth_dev *eth_dev = NULL;
struct pmd_internals *internals = NULL;
}
static struct rte_vdev_driver pmd_ring_drv = {
- .init = rte_pmd_ring_devinit,
- .uninit = rte_pmd_ring_devuninit,
+ .probe = rte_pmd_ring_probe,
+ .remove = rte_pmd_ring_remove,
};
DRIVER_REGISTER_VDEV(net_ring, pmd_ring_drv);
}
static int
-rte_pmd_vhost_devinit(const char *name, const char *params)
+rte_pmd_vhost_probe(const char *name, const char *params)
{
struct rte_kvargs *kvlist = NULL;
int ret = 0;
}
static int
-rte_pmd_vhost_devuninit(const char *name)
+rte_pmd_vhost_remove(const char *name)
{
struct rte_eth_dev *eth_dev = NULL;
struct pmd_internal *internal;
}
static struct rte_vdev_driver pmd_vhost_drv = {
- .init = rte_pmd_vhost_devinit,
- .uninit = rte_pmd_vhost_devuninit,
+ .probe = rte_pmd_vhost_probe,
+ .remove = rte_pmd_vhost_remove,
};
DRIVER_REGISTER_VDEV(net_vhost, pmd_vhost_drv);
* Returns 0 on success.
*/
static int
-virtio_user_pmd_devinit(const char *name, const char *params)
+virtio_user_pmd_probe(const char *name, const char *params)
{
struct rte_kvargs *kvlist = NULL;
struct rte_eth_dev *eth_dev;
/** Called by rte_eth_dev_detach() */
static int
-virtio_user_pmd_devuninit(const char *name)
+virtio_user_pmd_remove(const char *name)
{
struct rte_eth_dev *eth_dev;
struct virtio_hw *hw;
}
static struct rte_vdev_driver virtio_user_driver = {
- .init = virtio_user_pmd_devinit,
- .uninit = virtio_user_pmd_devuninit,
+ .probe = virtio_user_pmd_probe,
+ .remove = virtio_user_pmd_remove,
};
DRIVER_REGISTER_VDEV(net_virtio_user, virtio_user_driver);
/*TODO: Support multiple process model */
static int
-rte_pmd_xenvirt_devinit(const char *name, const char *params)
+rte_pmd_xenvirt_probe(const char *name, const char *params)
{
if (virtio_idx == 0) {
if (xenstore_init() != 0) {
}
static int
-rte_pmd_xenvirt_devuninit(const char *name)
+rte_pmd_xenvirt_remove(const char *name)
{
eth_dev_xenvirt_free(name, rte_socket_id());
}
static struct rte_vdev_driver pmd_xenvirt_drv = {
- .init = rte_pmd_xenvirt_devinit,
- .uninit = rte_pmd_xenvirt_devuninit,
+ .probe = rte_pmd_xenvirt_probe,
+ .remove = rte_pmd_xenvirt_remove,
};
DRIVER_REGISTER_VDEV(net_xenvirt, pmd_xenvirt_drv);
*/
if (!strncmp(driver->driver.name, name,
strlen(driver->driver.name)))
- return driver->init(name, args);
+ return driver->probe(name, args);
}
RTE_LOG(ERR, EAL, "no driver found for %s\n", name);
*/
if (!strncmp(driver->driver.name, name,
strlen(driver->driver.name)))
- return driver->uninit(name);
+ return driver->remove(name);
}
RTE_LOG(ERR, EAL, "no driver found for %s\n", name);
TAILQ_HEAD(vdev_driver_list, rte_vdev_driver);
/**
- * Initialization function called for each virtual device driver once.
+ * Probe function called for each virtual device driver once.
*/
-typedef int (rte_vdev_init_t)(const char *name, const char *args);
+typedef int (rte_vdev_probe_t)(const char *name, const char *args);
/**
- * Uninitilization function called for each virtual device driver once.
+ * Remove function called for each virtual device driver once.
*/
-typedef int (rte_vdev_uninit_t)(const char *name);
+typedef int (rte_vdev_remove_t)(const char *name);
/**
* A virtual device driver abstraction.
*/
struct rte_vdev_driver {
TAILQ_ENTRY(rte_vdev_driver) next; /**< Next in list. */
- struct rte_driver driver; /**< Inherited general driver. */
- rte_vdev_init_t *init; /**< Virtual device init. function. */
- rte_vdev_uninit_t *uninit; /**< Virtual device uninit. function. */
+ struct rte_driver driver; /**< Inherited general driver. */
+ rte_vdev_probe_t *probe; /**< Virtual device probe function. */
+ rte_vdev_remove_t *remove; /**< Virtual device remove function. */
};
/**