MCPcopy Create free account
hub / github.com/F-Stack/f-stack / platform_dev_match

Function platform_dev_match

dpdk/drivers/bus/platform/platform_params.c:29–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27};
28
29static int
30platform_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
48void *
49platform_bus_dev_iterate(const void *start, const char *str,

Callers

nothing calls this directly

Calls 2

rte_kvargs_getFunction · 0.85
strcmpFunction · 0.85

Tested by

no test coverage detected