| 607 | } |
| 608 | |
| 609 | static int |
| 610 | cdx_dev_match(const struct rte_device *dev, |
| 611 | const void *_kvlist) |
| 612 | { |
| 613 | const struct rte_kvargs *kvlist = _kvlist; |
| 614 | const char *key = cdx_params_keys[RTE_CDX_PARAM_NAME]; |
| 615 | const char *name; |
| 616 | |
| 617 | /* no kvlist arg, all devices match */ |
| 618 | if (kvlist == NULL) |
| 619 | return 0; |
| 620 | |
| 621 | /* if key is present in kvlist and does not match, filter device */ |
| 622 | name = rte_kvargs_get(kvlist, key); |
| 623 | if (name != NULL && strcmp(name, dev->name)) |
| 624 | return -1; |
| 625 | |
| 626 | return 0; |
| 627 | } |
| 628 | |
| 629 | static void * |
| 630 | cdx_dev_iterate(const void *start, |
nothing calls this directly
no test coverage detected