[RTE_TM_ERROR_TYPE_NODE_PARAMS_N_SHARED_SHAPERS]
= "num shared shapers field (node params)",
[RTE_TM_ERROR_TYPE_NODE_PARAMS_WFQ_WEIGHT_MODE]
- = "wfq weght mode field (node params)",
+ = "wfq weight mode field (node params)",
[RTE_TM_ERROR_TYPE_NODE_PARAMS_N_SP_PRIORITIES]
= "num strict priorities field (node params)",
[RTE_TM_ERROR_TYPE_NODE_PARAMS_CMAN]
if (error->cause)
snprintf(buf, sizeof(buf), "cause: %p, ", error->cause);
- printf("%s: %s%s (error %d)\n", errstr, error->cause ? buf : "",
+ fprintf(stderr, "%s: %s%s (error %d)\n",
+ errstr, error->cause ? buf : "",
error->message ? error->message : "(no stated reason)",
error->type);
}
/* Check: num of shared shaper */
if (n_shared_shapers >= MAX_NUM_SHARED_SHAPERS) {
- printf(" Number of shared shapers exceed the max (error)\n");
+ fprintf(stderr,
+ " Number of shared shapers exceed the max (error)\n");
return -1;
}
cmdline_parse_inst_t cmd_show_port_tm_level_cap = {
.f = cmd_show_port_tm_level_cap_parsed,
.data = NULL,
- .help_str = "Show Port TM Hierarhical level Capabilities",
+ .help_str = "Show port TM hierarchical level capabilities",
.tokens = {
(void *)&cmd_show_port_tm_level_cap_show,
(void *)&cmd_show_port_tm_level_cap_port,
memset(&error, 0, sizeof(struct rte_tm_error));
/* Port status */
if (!port_is_started(port_id)) {
- printf(" Port %u not started (error)\n", port_id);
+ fprintf(stderr, " Port %u not started (error)\n", port_id);
return;
}
/* Command type: add */
if ((strcmp(res->cmd_type, "add") == 0) &&
(port_is_started(port_id))) {
- printf(" Port %u not stopped (error)\n", port_id);
+ fprintf(stderr, " Port %u not stopped (error)\n", port_id);
return;
}
/* Command type: set (update) */
if ((strcmp(res->cmd_type, "set") == 0) &&
(!port_is_started(port_id))) {
- printf(" Port %u not started (error)\n", port_id);
+ fprintf(stderr, " Port %u not started (error)\n", port_id);
return;
}
memset(&error, 0, sizeof(struct rte_tm_error));
/* Port status */
if (!port_is_started(port_id)) {
- printf(" Port %u not started (error)\n", port_id);
+ fprintf(stderr, " Port %u not started (error)\n", port_id);
return;
}
shared_shaper_id = (uint32_t *)malloc(MAX_NUM_SHARED_SHAPERS *
sizeof(uint32_t));
if (shared_shaper_id == NULL) {
- printf(" Memory not allocated for shared shapers (error)\n");
+ fprintf(stderr,
+ " Memory not allocated for shared shapers (error)\n");
return;
}
/* Parse multi shared shaper id string */
ret = parse_multi_ss_id_str(s_str, &n_shared_shapers, shared_shaper_id);
if (ret) {
- printf(" Shared shapers params string parse error\n");
+ fprintf(stderr, " Shared shapers params string parse error\n");
free(shared_shaper_id);
return;
}
shared_shaper_id = (uint32_t *)malloc(MAX_NUM_SHARED_SHAPERS *
sizeof(uint32_t));
if (shared_shaper_id == NULL) {
- printf(" Memory not allocated for shared shapers (error)\n");
+ fprintf(stderr,
+ " Memory not allocated for shared shapers (error)\n");
return;
}
/* Parse multi shared shaper id string */
ret = parse_multi_ss_id_str(s_str, &n_shared_shapers, shared_shaper_id);
if (ret) {
- printf(" Shared shapers params string parse error\n");
+ fprintf(stderr, " Shared shapers params string parse error\n");
free(shared_shaper_id);
return;
}
shared_shaper_id = (uint32_t *)malloc(MAX_NUM_SHARED_SHAPERS *
sizeof(uint32_t));
if (shared_shaper_id == NULL) {
- printf(" Memory not allocated for shared shapers (error)\n");
+ fprintf(stderr,
+ " Memory not allocated for shared shapers (error)\n");
return;
}
/* Parse multi shared shaper id string */
ret = parse_multi_ss_id_str(s_str, &n_shared_shapers, shared_shaper_id);
if (ret) {
- printf(" Shared shapers params string parse error\n");
+ fprintf(stderr, " Shared shapers params string parse error\n");
free(shared_shaper_id);
return;
}
memset(&error, 0, sizeof(struct rte_tm_error));
/* Port status */
if (port_is_started(port_id)) {
- printf(" Port %u not stopped (error)\n", port_id);
+ fprintf(stderr, " Port %u not stopped (error)\n", port_id);
return;
}
memset(&error, 0, sizeof(struct rte_tm_error));
/* Port status */
if (!port_is_started(port_id)) {
- printf(" Port %u not started (error)\n", port_id);
+ fprintf(stderr, " Port %u not started (error)\n", port_id);
return;
}