| 27 | }; |
| 28 | |
| 29 | static int |
| 30 | platform_dev_match(const struct rte_device *dev, const void *_kvlist) |
| 31 | { |
| 32 | const char *key = platform_params_keys[RTE_PLATFORM_PARAM_NAME]; |
| 33 | const struct rte_kvargs *kvlist = _kvlist; |
| 34 | const char *name; |
| 35 | |
| 36 | /* no kvlist arg, all devices match */ |
| 37 | if (kvlist == NULL) |
| 38 | return 0; |
| 39 | |
| 40 | /* if key is present in kvlist and does not match, filter device */ |
| 41 | name = rte_kvargs_get(kvlist, key); |
| 42 | if (name != NULL && strcmp(name, dev->name)) |
| 43 | return -1; |
| 44 | |
| 45 | return 0; |
| 46 | } |
| 47 | |
| 48 | void * |
| 49 | platform_bus_dev_iterate(const void *start, const char *str, |
nothing calls this directly
no test coverage detected