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

Function mlx5_kvargs_process

dpdk/drivers/common/mlx5/mlx5_common.c:127–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125}
126
127int
128mlx5_kvargs_process(struct mlx5_kvargs_ctrl *mkvlist, const char *const keys[],
129 arg_handler_t handler, void *opaque_arg)
130{
131 const struct rte_kvargs_pair *pair;
132 uint32_t i, j;
133
134 MLX5_ASSERT(mkvlist && mkvlist->kvlist);
135 /* Process parameters. */
136 for (i = 0; i < mkvlist->kvlist->count; i++) {
137 pair = &mkvlist->kvlist->pairs[i];
138 for (j = 0; keys[j] != NULL; ++j) {
139 if (strcmp(pair->key, keys[j]) != 0)
140 continue;
141 if ((*handler)(pair->key, pair->value, opaque_arg) < 0)
142 return -1;
143 mkvlist->is_used[i] = true;
144 break;
145 }
146 }
147 return 0;
148}
149
150/**
151 * Prepare a mlx5 kvargs control.

Callers 7

mlx5_port_args_configFunction · 0.85
mlx5_port_args_set_usedFunction · 0.85
mlx5_common_config_getFunction · 0.85
mlx5_vdpa_config_getFunction · 0.85

Calls 1

strcmpFunction · 0.85

Tested by

no test coverage detected