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

Function rte_kvargs_process

dpdk/lib/kvargs/rte_kvargs.c:173–193  ·  view source on GitHub ↗

* For each matching key, call the given handler function. */

Source from the content-addressed store, hash-verified

171 * For each matching key, call the given handler function.
172 */
173int
174rte_kvargs_process(const struct rte_kvargs *kvlist,
175 const char *key_match,
176 arg_handler_t handler,
177 void *opaque_arg)
178{
179 const struct rte_kvargs_pair *pair;
180 unsigned i;
181
182 if (kvlist == NULL)
183 return 0;
184
185 for (i = 0; i < kvlist->count; i++) {
186 pair = &kvlist->pairs[i];
187 if (key_match == NULL || strcmp(pair->key, key_match) == 0) {
188 if ((*handler)(pair->key, pair->value, opaque_arg) < 0)
189 return -1;
190 }
191 }
192 return 0;
193}
194
195/* free the rte_kvargs structure */
196void

Callers 15

eth_dev_matchFunction · 0.85
parse_max_poolsFunction · 0.85
dpaa2_sec_get_devargsFunction · 0.85
cnxk_cpt_parse_devargsFunction · 0.85
dpaa_sec_get_devargsFunction · 0.85
cnxk_gpio_parse_argFunction · 0.85
ifpga_vdev_parse_devargsFunction · 0.85

Calls 1

strcmpFunction · 0.85

Tested by 1

test_valid_kvargsFunction · 0.68