- entry = rte_cfgfile_get_entry(cfg, "port", "number of pipes per subport");
- if (entry)
- port_params->n_pipes_per_subport = (uint32_t)atoi(entry);
-
- entry = rte_cfgfile_get_entry(cfg, "port", "queue sizes");
- if (entry) {
- char *next;
-
- for(j = 0; j < RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE; j++) {
- port_params->qsize[j] = (uint16_t)strtol(entry, &next, 10);
- if (next == NULL)
- break;
- entry = next;
- }
- }
-
-#ifdef RTE_SCHED_RED
- for (j = 0; j < RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE; j++) {
- char str[32];
-
- /* Parse WRED min thresholds */
- snprintf(str, sizeof(str), "tc %d wred min", j);
- entry = rte_cfgfile_get_entry(cfg, "red", str);
- if (entry) {
- char *next;
- int k;
- /* for each packet colour (green, yellow, red) */
- for (k = 0; k < e_RTE_METER_COLORS; k++) {
- port_params->red_params[j][k].min_th
- = (uint16_t)strtol(entry, &next, 10);
- if (next == NULL)
- break;
- entry = next;
- }
- }
-
- /* Parse WRED max thresholds */
- snprintf(str, sizeof(str), "tc %d wred max", j);
- entry = rte_cfgfile_get_entry(cfg, "red", str);
- if (entry) {
- char *next;
- int k;
- /* for each packet colour (green, yellow, red) */
- for (k = 0; k < e_RTE_METER_COLORS; k++) {
- port_params->red_params[j][k].max_th
- = (uint16_t)strtol(entry, &next, 10);
- if (next == NULL)
- break;
- entry = next;
- }
- }
-
- /* Parse WRED inverse mark probabilities */
- snprintf(str, sizeof(str), "tc %d wred inv prob", j);
- entry = rte_cfgfile_get_entry(cfg, "red", str);
- if (entry) {
- char *next;
- int k;
- /* for each packet colour (green, yellow, red) */
- for (k = 0; k < e_RTE_METER_COLORS; k++) {
- port_params->red_params[j][k].maxp_inv
- = (uint8_t)strtol(entry, &next, 10);
-
- if (next == NULL)
- break;
- entry = next;
- }
- }
-
- /* Parse WRED EWMA filter weights */
- snprintf(str, sizeof(str), "tc %d wred weight", j);
- entry = rte_cfgfile_get_entry(cfg, "red", str);
- if (entry) {
- char *next;
- int k;
- /* for each packet colour (green, yellow, red) */
- for (k = 0; k < e_RTE_METER_COLORS; k++) {
- port_params->red_params[j][k].wq_log2
- = (uint8_t)strtol(entry, &next, 10);
- if (next == NULL)
- break;
- entry = next;
- }
- }
- }
-#endif /* RTE_SCHED_RED */
-