- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
- * * Neither the name of Intel Corporation nor the names of its
- * contributors may be used to endorse or promote products derived
+ * * Neither the name of Intel Corporation nor the names of its
+ * contributors may be used to endorse or promote products derived
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- rte_snprintf(entry->name, sizeof(entry->name), "%s", split[0]);
- rte_snprintf(entry->value, sizeof(entry->value), "%s", split[1]);
+ snprintf(entry->name, sizeof(entry->name), "%s", split[0]);
+ snprintf(entry->value, sizeof(entry->value), "%s", split[1]);
_strip(entry->name, strnlen(entry->name, sizeof(entry->name)));
_strip(entry->value, strnlen(entry->value, sizeof(entry->value)));
}
_strip(entry->name, strnlen(entry->name, sizeof(entry->name)));
_strip(entry->value, strnlen(entry->value, sizeof(entry->value)));
}
- rte_snprintf(sections[i], CFG_NAME_LEN, "%s", cfg->sections[i]->name);
+ snprintf(sections[i], CFG_NAME_LEN, "%s", cfg->sections[i]->name);
entry = cfg_get_entry(cfg, "port", "number of subports per port");
if (entry)
port_params->n_subports_per_port = (uint32_t)atoi(entry);
entry = cfg_get_entry(cfg, "port", "number of subports per port");
if (entry)
port_params->n_subports_per_port = (uint32_t)atoi(entry);
entry = cfg_get_entry(cfg, "port", "number of pipes per subport");
if (entry)
port_params->n_pipes_per_subport = (uint32_t)atoi(entry);
entry = cfg_get_entry(cfg, "port", "number of pipes per subport");
if (entry)
port_params->n_pipes_per_subport = (uint32_t)atoi(entry);
for(j = 0; j < RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE; j++) {
port_params->qsize[j] = (uint16_t)strtol(entry, &next, 10);
if (next == NULL)
for(j = 0; j < RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE; j++) {
port_params->qsize[j] = (uint16_t)strtol(entry, &next, 10);
if (next == NULL)
- rte_snprintf(str, sizeof(str), "tc %d wred min", j);
+ snprintf(str, sizeof(str), "tc %d wred min", j);
- rte_snprintf(str, sizeof(str), "tc %d wred max", j);
+ snprintf(str, sizeof(str), "tc %d wred max", j);
- rte_snprintf(str, sizeof(str), "tc %d wred inv prob", j);
+ snprintf(str, sizeof(str), "tc %d wred inv prob", j);
- rte_snprintf(str, sizeof(str), "tc %d wred weight", j);
+ snprintf(str, sizeof(str), "tc %d wred weight", j);
- rte_snprintf(pipe_name, sizeof(pipe_name), "pipe profile %d", j);
+ snprintf(pipe_name, sizeof(pipe_name), "pipe profile %d", j);
entry = cfg_get_entry(cfg, pipe_name, "tc 0 rate");
if (entry)
pipe_params[j].tc_rate[0] = (uint32_t)atoi(entry);
entry = cfg_get_entry(cfg, pipe_name, "tc 0 rate");
if (entry)
pipe_params[j].tc_rate[0] = (uint32_t)atoi(entry);
entry = cfg_get_entry(cfg, pipe_name, "tc 1 rate");
if (entry)
pipe_params[j].tc_rate[1] = (uint32_t)atoi(entry);
entry = cfg_get_entry(cfg, pipe_name, "tc 1 rate");
if (entry)
pipe_params[j].tc_rate[1] = (uint32_t)atoi(entry);
entry = cfg_get_entry(cfg, pipe_name, "tc 2 rate");
if (entry)
pipe_params[j].tc_rate[2] = (uint32_t)atoi(entry);
entry = cfg_get_entry(cfg, pipe_name, "tc 2 rate");
if (entry)
pipe_params[j].tc_rate[2] = (uint32_t)atoi(entry);
entry = cfg_get_entry(cfg, pipe_name, "tc 3 rate");
if (entry)
pipe_params[j].tc_rate[3] = (uint32_t)atoi(entry);
#ifdef RTE_SCHED_SUBPORT_TC_OV
entry = cfg_get_entry(cfg, pipe_name, "tc 3 rate");
if (entry)
pipe_params[j].tc_rate[3] = (uint32_t)atoi(entry);
#ifdef RTE_SCHED_SUBPORT_TC_OV
- entry = cfg_get_entry(cfg, pipe_name, "tc 0 oversubscription weight");
- if (entry)
- pipe_params[j].tc_ov_weight[0] = (uint8_t)atoi(entry);
-
- entry = cfg_get_entry(cfg, pipe_name, "tc 1 oversubscription weight");
- if (entry)
- pipe_params[j].tc_ov_weight[1] = (uint8_t)atoi(entry);
-
- entry = cfg_get_entry(cfg, pipe_name, "tc 2 oversubscription weight");
- if (entry)
- pipe_params[j].tc_ov_weight[2] = (uint8_t)atoi(entry);
-
- rte_snprintf(sec_name, sizeof(sec_name), "subport %d", i);
+ snprintf(sec_name, sizeof(sec_name), "subport %d", i);
if (cfg_has_section(cfg, sec_name)) {
entry = cfg_get_entry(cfg, sec_name, "tb rate");
if (cfg_has_section(cfg, sec_name)) {
entry = cfg_get_entry(cfg, sec_name, "tb rate");
entry = cfg_get_entry(cfg, sec_name, "tc 0 rate");
if (entry)
subport_params[i].tc_rate[0] = (uint32_t)atoi(entry);
entry = cfg_get_entry(cfg, sec_name, "tc 0 rate");
if (entry)
subport_params[i].tc_rate[0] = (uint32_t)atoi(entry);
"pipe profile %d", profile);
if (cfg_has_section(cfg, profile_name))
app_pipe_to_profile[i][k] = profile;
"pipe profile %d", profile);
if (cfg_has_section(cfg, profile_name))
app_pipe_to_profile[i][k] = profile;