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

Function cmp_dev_match

dpdk/app/test/test_vdev.c:29–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29static int
30cmp_dev_match(const struct rte_device *dev, const void *_kvlist)
31{
32 const struct rte_kvargs *kvlist = _kvlist;
33 const char *key = TEST_VDEV_KEY_NAME;
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, rte_dev_name(dev)) != 0)
43 return -1;
44
45 return 0;
46}
47
48static struct rte_device *
49get_matching_vdev(const char *match_str)

Callers

nothing calls this directly

Calls 3

rte_kvargs_getFunction · 0.85
strcmpFunction · 0.85
rte_dev_nameFunction · 0.85

Tested by

no test coverage detected