xref: /spdk/lib/env_dpdk/22.11/dev_driver.h (revision 877573897ad52be4fa8989f7617bd655b87e05c4)
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright (c) 2022 Red Hat, Inc.
3  */
4 
5 #ifndef DEV_DRIVER_H
6 #define DEV_DRIVER_H
7 
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11 
12 #include <rte_common.h>
13 #include "rte_dev.h"
14 
15 /**
16  * A structure describing a device driver.
17  */
18 struct rte_driver {
19 	RTE_TAILQ_ENTRY(rte_driver) next; /**< Next in list. */
20 	const char *name;                   /**< Driver name. */
21 	const char *alias;              /**< Driver alias. */
22 };
23 
24 /**
25  * A structure describing a generic device.
26  */
27 struct rte_device {
28 	RTE_TAILQ_ENTRY(rte_device) next; /**< Next device */
29 	const char *name;             /**< Device name */
30 	const char *bus_info;         /**< Device bus specific information */
31 	const struct rte_driver *driver; /**< Driver assigned after probing */
32 	const struct rte_bus *bus;    /**< Bus handle assigned on scan */
33 	int numa_node;                /**< NUMA node connection */
34 	struct rte_devargs *devargs;  /**< Arguments for latest probing */
35 };
36 
37 #ifdef __cplusplus
38 }
39 #endif
40 
41 #endif /* DEV_DRIVER_H */
42