21 #include <sys/queue.h>
23 #include <rte_config.h>
24 #include <rte_compat.h>
36 struct rte_dev_event {
42 typedef void (*rte_dev_event_cb_fn)(
const char *device_name,
47 #define RTE_FUNC_PTR_OR_ERR_RET(func, retval) do { \
52 #define RTE_FUNC_PTR_OR_RET(func) do { \
99 #define RTE_DEV_NAME_MAX_LEN 64
144 const char *drvargs);
208 #define RTE_PMD_EXPORT_NAME_ARRAY(n, idx) n##idx[]
210 #define RTE_PMD_EXPORT_NAME(name, idx) \
211 static const char RTE_PMD_EXPORT_NAME_ARRAY(this_pmd_name, idx) \
212 __attribute__((used)) = RTE_STR(name)
214 #define DRV_EXP_TAG(name, tag) __##name##_##tag
216 #define RTE_PMD_REGISTER_PCI_TABLE(name, table) \
217 static const char DRV_EXP_TAG(name, pci_tbl_export)[] __attribute__((used)) = \
220 #define RTE_PMD_REGISTER_PARAM_STRING(name, str) \
221 static const char DRV_EXP_TAG(name, param_string_export)[] \
222 __attribute__((used)) = str
245 #define RTE_PMD_REGISTER_KMOD_DEP(name, str) \
246 static const char DRV_EXP_TAG(name, kmod_dep_export)[] \
247 __attribute__((used)) = str
292 typedef void *(*rte_dev_iterate_t)(
const void *start,
340 #define RTE_DEV_FOREACH(dev, devstr, it) \
341 for (rte_dev_iterator_init(it, devstr), \
342 dev = rte_dev_iterator_next(it); \
344 dev = rte_dev_iterator_next(it))
369 int __rte_experimental
371 rte_dev_event_cb_fn cb_fn,
393 int __rte_experimental
395 rte_dev_event_cb_fn cb_fn,
410 void __rte_experimental
424 int __rte_experimental
437 int __rte_experimental
450 int __rte_experimental
463 int __rte_experimental
struct rte_device * device
int __rte_experimental rte_dev_event_monitor_stop(void)
int __rte_experimental rte_dev_event_callback_register(const char *device_name, rte_dev_event_cb_fn cb_fn, void *cb_arg)
__rte_experimental int rte_dev_iterator_init(struct rte_dev_iterator *it, const char *str)
int __rte_experimental rte_dev_hotplug_handle_enable(void)
int __rte_experimental rte_dev_event_monitor_start(void)
void __rte_experimental rte_dev_event_callback_process(const char *device_name, enum rte_dev_event_type event)
int rte_dev_remove(struct rte_device *dev)
int rte_dev_probe(const char *devargs)
TAILQ_ENTRY(rte_driver) next
__rte_experimental int rte_dev_is_probed(const struct rte_device *dev)
TAILQ_ENTRY(rte_device) next
int __rte_experimental rte_dev_event_callback_unregister(const char *device_name, rte_dev_event_cb_fn cb_fn, void *cb_arg)
int rte_eal_hotplug_add(const char *busname, const char *devname, const char *drvargs)
int __rte_experimental rte_dev_hotplug_handle_disable(void)
__rte_experimental struct rte_device * rte_dev_iterator_next(struct rte_dev_iterator *it)
struct rte_devargs * devargs
int rte_eal_hotplug_remove(const char *busname, const char *devname)
const struct rte_driver * driver
const struct rte_bus * bus
int(* rte_dev_cmp_t)(const struct rte_device *dev, const void *data)