| 166 | }; |
| 167 | |
| 168 | static void cmd_dump_one_parsed(void *parsed_result, struct cmdline *cl, |
| 169 | __rte_unused void *data) |
| 170 | { |
| 171 | struct cmd_dump_one_result *res = parsed_result; |
| 172 | |
| 173 | if (!strcmp(res->dump, "dump_ring")) { |
| 174 | struct rte_ring *r; |
| 175 | r = rte_ring_lookup(res->name); |
| 176 | if (r == NULL) { |
| 177 | cmdline_printf(cl, "Cannot find ring\n"); |
| 178 | return; |
| 179 | } |
| 180 | rte_ring_dump(stdout, r); |
| 181 | } |
| 182 | else if (!strcmp(res->dump, "dump_mempool")) { |
| 183 | struct rte_mempool *mp; |
| 184 | mp = rte_mempool_lookup(res->name); |
| 185 | if (mp == NULL) { |
| 186 | cmdline_printf(cl, "Cannot find mempool\n"); |
| 187 | return; |
| 188 | } |
| 189 | rte_mempool_dump(stdout, mp); |
| 190 | } |
| 191 | } |
| 192 | |
| 193 | cmdline_parse_token_string_t cmd_dump_one_dump = |
| 194 | TOKEN_STRING_INITIALIZER(struct cmd_dump_one_result, dump, |
nothing calls this directly
no test coverage detected