| 8469 | }; |
| 8470 | |
| 8471 | static void cmd_dump_one_parsed(void *parsed_result, struct cmdline *cl, |
| 8472 | __rte_unused void *data) |
| 8473 | { |
| 8474 | struct cmd_dump_one_result *res = parsed_result; |
| 8475 | |
| 8476 | if (!strcmp(res->dump, "dump_ring")) { |
| 8477 | struct rte_ring *r; |
| 8478 | r = rte_ring_lookup(res->name); |
| 8479 | if (r == NULL) { |
| 8480 | cmdline_printf(cl, "Cannot find ring\n"); |
| 8481 | return; |
| 8482 | } |
| 8483 | rte_ring_dump(stdout, r); |
| 8484 | } else if (!strcmp(res->dump, "dump_mempool")) { |
| 8485 | struct rte_mempool *mp; |
| 8486 | mp = rte_mempool_lookup(res->name); |
| 8487 | if (mp == NULL) { |
| 8488 | cmdline_printf(cl, "Cannot find mempool\n"); |
| 8489 | return; |
| 8490 | } |
| 8491 | rte_mempool_dump(stdout, mp); |
| 8492 | } |
| 8493 | } |
| 8494 | |
| 8495 | static cmdline_parse_token_string_t cmd_dump_one_dump = |
| 8496 | TOKEN_STRING_INITIALIZER(struct cmd_dump_one_result, dump, |
nothing calls this directly
no test coverage detected