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

Function eth_dev_iterate

dpdk/lib/ethdev/rte_class_eth.c:152–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150}
151
152static void *
153eth_dev_iterate(const void *start,
154 const char *str,
155 const struct rte_dev_iterator *it)
156{
157 struct rte_kvargs *kvargs = NULL;
158 struct rte_eth_dev *edev = NULL;
159 const char * const *valid_keys = NULL;
160
161 if (str != NULL) {
162 if (str[0] == '+') /* no validation of keys */
163 str++;
164 else
165 valid_keys = eth_params_keys;
166 kvargs = rte_kvargs_parse(str, valid_keys);
167 if (kvargs == NULL) {
168 RTE_ETHDEV_LOG(ERR, "cannot parse argument list\n");
169 rte_errno = EINVAL;
170 return NULL;
171 }
172 }
173 edev = eth_find_device(start, eth_dev_match,
174 eth_dev_match_arg(it->device, kvargs));
175 rte_kvargs_free(kvargs);
176 return edev;
177}
178
179static struct rte_class rte_class_eth = {
180 .dev_iterate = eth_dev_iterate,

Callers

nothing calls this directly

Calls 4

rte_kvargs_parseFunction · 0.85
eth_find_deviceFunction · 0.85
eth_dev_match_argClass · 0.85
rte_kvargs_freeFunction · 0.85

Tested by

no test coverage detected