- All devices register themselfs by calling a kind of DRIVER_REGISTER_XXX.
The PMD_REGISTER_DRIVER is not used anymore.
- PMD_VDEV type is also not being used - can be removed from all VDEVs.
Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: David Marchand <david.marchand@6wind.com>
15 files changed:
}
static struct rte_vdev_driver aesni_gcm_pmd_drv = {
}
static struct rte_vdev_driver aesni_gcm_pmd_drv = {
- .driver = {
- .type = PMD_VDEV,
- },
.init = aesni_gcm_init,
.uninit = aesni_gcm_uninit
};
.init = aesni_gcm_init,
.uninit = aesni_gcm_uninit
};
}
static struct rte_vdev_driver cryptodev_aesni_mb_pmd_drv = {
}
static struct rte_vdev_driver cryptodev_aesni_mb_pmd_drv = {
- .driver = {
- .type = PMD_VDEV,
- },
.init = cryptodev_aesni_mb_init,
.uninit = cryptodev_aesni_mb_uninit
};
.init = cryptodev_aesni_mb_init,
.uninit = cryptodev_aesni_mb_uninit
};
}
static struct rte_vdev_driver cryptodev_kasumi_pmd_drv = {
}
static struct rte_vdev_driver cryptodev_kasumi_pmd_drv = {
- .driver = {
- .type = PMD_VDEV,
- },
.init = cryptodev_kasumi_init,
.uninit = cryptodev_kasumi_uninit
};
.init = cryptodev_kasumi_init,
.uninit = cryptodev_kasumi_uninit
};
}
static struct rte_vdev_driver cryptodev_null_pmd_drv = {
}
static struct rte_vdev_driver cryptodev_null_pmd_drv = {
- .driver = {
- .type = PMD_VDEV,
- },
.init = cryptodev_null_init,
.uninit = cryptodev_null_uninit
};
.init = cryptodev_null_init,
.uninit = cryptodev_null_uninit
};
}
static struct rte_vdev_driver cryptodev_snow3g_pmd_drv = {
}
static struct rte_vdev_driver cryptodev_snow3g_pmd_drv = {
- .driver = {
- .type = PMD_VDEV,
- },
.init = cryptodev_snow3g_init,
.uninit = cryptodev_snow3g_uninit
};
.init = cryptodev_snow3g_init,
.uninit = cryptodev_snow3g_uninit
};
}
static struct rte_vdev_driver pmd_af_packet_drv = {
}
static struct rte_vdev_driver pmd_af_packet_drv = {
- .driver = {
- .type = PMD_VDEV,
- },
.init = rte_pmd_af_packet_devinit,
.uninit = rte_pmd_af_packet_devuninit,
};
.init = rte_pmd_af_packet_devinit,
.uninit = rte_pmd_af_packet_devuninit,
};
}
static struct rte_vdev_driver bond_drv = {
}
static struct rte_vdev_driver bond_drv = {
- .driver = {
- .type = PMD_VDEV,
- },
.init = bond_init,
.uninit = bond_uninit,
};
.init = bond_init,
.uninit = bond_uninit,
};
}
static struct rte_vdev_driver pmd_mpipe_xgbe_drv = {
}
static struct rte_vdev_driver pmd_mpipe_xgbe_drv = {
- .driver = {
- .type = PMD_VDEV,
- },
.init = rte_pmd_mpipe_devinit,
};
static struct rte_vdev_driver pmd_mpipe_gbe_drv = {
.init = rte_pmd_mpipe_devinit,
};
static struct rte_vdev_driver pmd_mpipe_gbe_drv = {
- .driver = {
- .type = PMD_VDEV,
- },
.init = rte_pmd_mpipe_devinit,
};
.init = rte_pmd_mpipe_devinit,
};
}
static struct rte_vdev_driver pmd_null_drv = {
}
static struct rte_vdev_driver pmd_null_drv = {
- .driver = {
- .type = PMD_VDEV,
- },
.init = rte_pmd_null_devinit,
.uninit = rte_pmd_null_devuninit,
};
.init = rte_pmd_null_devinit,
.uninit = rte_pmd_null_devuninit,
};
}
static struct rte_vdev_driver pmd_pcap_drv = {
}
static struct rte_vdev_driver pmd_pcap_drv = {
- .driver = {
- .type = PMD_VDEV,
- },
.init = rte_pmd_pcap_devinit,
.uninit = rte_pmd_pcap_devuninit,
};
.init = rte_pmd_pcap_devinit,
.uninit = rte_pmd_pcap_devuninit,
};
}
static struct rte_vdev_driver pmd_ring_drv = {
}
static struct rte_vdev_driver pmd_ring_drv = {
- .driver = {
- .type = PMD_VDEV,
- },
.init = rte_pmd_ring_devinit,
.uninit = rte_pmd_ring_devuninit,
};
.init = rte_pmd_ring_devinit,
.uninit = rte_pmd_ring_devuninit,
};
}
static struct rte_vdev_driver pmd_vhost_drv = {
}
static struct rte_vdev_driver pmd_vhost_drv = {
- .driver = {
- .type = PMD_VDEV,
- },
.init = rte_pmd_vhost_devinit,
.uninit = rte_pmd_vhost_devuninit,
};
.init = rte_pmd_vhost_devinit,
.uninit = rte_pmd_vhost_devuninit,
};
}
static struct rte_vdev_driver virtio_user_driver = {
}
static struct rte_vdev_driver virtio_user_driver = {
- .driver = {
- .type = PMD_VDEV,
- },
.init = virtio_user_pmd_devinit,
.uninit = virtio_user_pmd_devuninit,
};
.init = virtio_user_pmd_devinit,
.uninit = virtio_user_pmd_devuninit,
};
}
static struct rte_vdev_driver pmd_xenvirt_drv = {
}
static struct rte_vdev_driver pmd_xenvirt_drv = {
- .driver = {
- .type = PMD_VDEV,
- },
.init = rte_pmd_xenvirt_devinit,
.uninit = rte_pmd_xenvirt_devuninit,
};
.init = rte_pmd_xenvirt_devinit,
.uninit = rte_pmd_xenvirt_devuninit,
};
/** Double linked list of device drivers. */
TAILQ_HEAD(rte_driver_list, rte_driver);
/** Double linked list of device drivers. */
TAILQ_HEAD(rte_driver_list, rte_driver);
-/**
- * Driver type enumeration
- */
-enum pmd_type {
- PMD_VDEV = 0,
- PMD_PDEV = 1,
-};
-
/**
* A structure describing a device driver.
*/
struct rte_driver {
TAILQ_ENTRY(rte_driver) next; /**< Next in list. */
/**
* A structure describing a device driver.
*/
struct rte_driver {
TAILQ_ENTRY(rte_driver) next; /**< Next in list. */
- enum pmd_type type; /**< PMD Driver type */
const char *name; /**< Driver name. */
};
const char *name; /**< Driver name. */
};
static const char DRIVER_EXPORT_NAME_ARRAY(this_pmd_name, idx) \
__attribute__((used)) = RTE_STR(name)
static const char DRIVER_EXPORT_NAME_ARRAY(this_pmd_name, idx) \
__attribute__((used)) = RTE_STR(name)
-#define PMD_REGISTER_DRIVER(drv, nm)\
-RTE_INIT(probefn_ ##drv);\
-static void probefn_ ##drv(void)\
-{\
- (drv).name = RTE_STR(nm);\
- rte_eal_driver_register(&drv);\
-} \
-DRIVER_EXPORT_NAME(nm, __COUNTER__)
-
#define DRV_EXP_TAG(name, tag) __##name##_##tag
#define DRIVER_REGISTER_PCI_TABLE(name, table) \
#define DRV_EXP_TAG(name, tag) __##name##_##tag
#define DRIVER_REGISTER_PCI_TABLE(name, table) \