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

Function auxiliary_dev_match

dpdk/drivers/bus/auxiliary/auxiliary_params.c:23–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21};
22
23static int
24auxiliary_dev_match(const struct rte_device *dev,
25 const void *_kvlist)
26{
27 const struct rte_kvargs *kvlist = _kvlist;
28 const char *key = auxiliary_params_keys[RTE_AUXILIARY_PARAM_NAME];
29 const char *name;
30
31 /* no kvlist arg, all devices match */
32 if (kvlist == NULL)
33 return 0;
34
35 /* if key is present in kvlist and does not match, filter device */
36 name = rte_kvargs_get(kvlist, key);
37 if (name != NULL && strcmp(name, dev->name))
38 return -1;
39
40 return 0;
41}
42
43void *
44auxiliary_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