| 27 | } |
| 28 | |
| 29 | static int |
| 30 | cmp_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 | |
| 48 | static struct rte_device * |
| 49 | get_matching_vdev(const char *match_str) |
nothing calls this directly
no test coverage detected