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

Function cdx_dev_match

dpdk/drivers/bus/cdx/cdx.c:609–627  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

607}
608
609static int
610cdx_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
629static void *
630cdx_dev_iterate(const void *start,

Callers

nothing calls this directly

Calls 2

rte_kvargs_getFunction · 0.85
strcmpFunction · 0.85

Tested by

no test coverage detected