| 1023 | } |
| 1024 | |
| 1025 | int32_t |
| 1026 | rte_service_dump(FILE *f, uint32_t id) |
| 1027 | { |
| 1028 | uint32_t i; |
| 1029 | int print_one = (id != UINT32_MAX); |
| 1030 | |
| 1031 | /* print only the specified service */ |
| 1032 | if (print_one) { |
| 1033 | struct rte_service_spec_impl *s; |
| 1034 | SERVICE_VALID_GET_OR_ERR_RET(id, s, -EINVAL); |
| 1035 | fprintf(f, "Service %s Summary\n", s->spec.name); |
| 1036 | service_dump_one(f, id); |
| 1037 | return 0; |
| 1038 | } |
| 1039 | |
| 1040 | /* print all services, as UINT32_MAX was passed as id */ |
| 1041 | fprintf(f, "Services Summary\n"); |
| 1042 | for (i = 0; i < RTE_SERVICE_NUM_MAX; i++) { |
| 1043 | if (!service_registered(i)) |
| 1044 | continue; |
| 1045 | service_dump_one(f, i); |
| 1046 | } |
| 1047 | |
| 1048 | fprintf(f, "Service Cores Summary\n"); |
| 1049 | for (i = 0; i < RTE_MAX_LCORE; i++) { |
| 1050 | if (lcore_config[i].core_role != ROLE_SERVICE) |
| 1051 | continue; |
| 1052 | |
| 1053 | service_dump_calls_per_lcore(f, i); |
| 1054 | } |
| 1055 | |
| 1056 | return 0; |
| 1057 | } |