DPDK 22.11.7
rte_devargs.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright 2014 6WIND S.A.
3 */
4
5#ifndef _RTE_DEVARGS_H_
6#define _RTE_DEVARGS_H_
7
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23#include <stdio.h>
24#include <rte_compat.h>
25#include <rte_dev.h>
26
27struct rte_bus;
28
35#define RTE_DEVARGS_KEY_BUS "bus"
36
43#define RTE_DEVARGS_KEY_CLASS "class"
44
51#define RTE_DEVARGS_KEY_DRIVER "driver"
52
57 RTE_DEVTYPE_ALLOWED,
58 RTE_DEVTYPE_BLOCKED,
59 RTE_DEVTYPE_VIRTUAL,
60};
61
80 char name[RTE_DEV_NAME_MAX_LEN];
82 union {
83 const char *args;
84 const char *drv_str;
85 };
86 struct rte_bus *bus;
87 struct rte_class *cls;
88 const char *bus_str;
89 const char *cls_str;
90 char *data;
91};
92
125int
126rte_devargs_parse(struct rte_devargs *da, const char *dev);
127
161int
163 const char *format, ...)
165
172__rte_experimental
173void
175
188int
190
204int rte_devargs_add(enum rte_devtype devtype, const char *devargs_str);
205
219int rte_devargs_remove(struct rte_devargs *devargs);
220
230unsigned int
232
239void rte_devargs_dump(FILE *f);
240
257struct rte_devargs *
258rte_devargs_next(const char *busname, const struct rte_devargs *start);
259
263#define RTE_EAL_DEVARGS_FOREACH(busname, da) \
264 for (da = rte_devargs_next(busname, NULL); \
265 da != NULL; \
266 da = rte_devargs_next(busname, da)) \
267
268#ifdef __cplusplus
269}
270#endif
271
272#endif /* _RTE_DEVARGS_H_ */
#define __rte_format_printf(format_index, first_arg)
Definition: rte_common.h:148
#define RTE_STD_C11
Definition: rte_common.h:39
rte_dev_policy
Definition: rte_dev.h:61
void rte_devargs_dump(FILE *f)
int rte_devargs_add(enum rte_devtype devtype, const char *devargs_str)
int rte_devargs_insert(struct rte_devargs **da)
int rte_devargs_parse(struct rte_devargs *da, const char *dev)
struct rte_devargs * rte_devargs_next(const char *busname, const struct rte_devargs *start)
rte_devtype
Definition: rte_devargs.h:56
int __rte_experimental void rte_devargs_reset(struct rte_devargs *da)
int rte_devargs_parsef(struct rte_devargs *da, const char *format,...) __rte_format_printf(2
int rte_devargs_remove(struct rte_devargs *devargs)
unsigned int rte_devargs_type_count(enum rte_devtype devtype)
enum rte_dev_policy policy
Definition: rte_devargs.h:78
const char * bus_str
Definition: rte_devargs.h:88
struct rte_class * cls
Definition: rte_devargs.h:87
RTE_TAILQ_ENTRY(rte_devargs) next
struct rte_bus * bus
Definition: rte_devargs.h:86
const char * args
Definition: rte_devargs.h:83
char * data
Definition: rte_devargs.h:90
const char * cls_str
Definition: rte_devargs.h:89
char name[RTE_DEV_NAME_MAX_LEN]
Definition: rte_devargs.h:80
enum rte_devtype type
Definition: rte_devargs.h:76
const char * drv_str
Definition: rte_devargs.h:84