sched: fix traffic class oversubscription parameter
authorSavinay Dharmappa <savinay.dharmappa@intel.com>
Wed, 21 Apr 2021 06:50:01 +0000 (07:50 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 21 Apr 2021 14:57:18 +0000 (16:57 +0200)
This patch fixes the traffic class oversubscription watermark
value by initialising it with computed value of maximum watermark.

Fixes: ac6fcb841b0f ("sched: update subport rate dynamically")
Cc: stable@dpdk.org
Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
lib/sched/rte_sched.c

index 7c56880..cd87e68 100644 (file)
@@ -1249,7 +1249,6 @@ rte_sched_subport_config(struct rte_sched_port *port,
 #ifdef RTE_SCHED_SUBPORT_TC_OV
                /* TC oversubscription */
                s->tc_ov_wm_min = port->mtu;
-               s->tc_ov_wm = s->tc_ov_wm_max;
                s->tc_ov_period_id = 0;
                s->tc_ov = 0;
                s->tc_ov_n = 0;
@@ -1277,6 +1276,7 @@ rte_sched_subport_config(struct rte_sched_port *port,
 #ifdef RTE_SCHED_SUBPORT_TC_OV
                s->tc_ov_wm_max = rte_sched_time_ms_to_bytes(profile->tc_period,
                                                        s->pipe_tc_be_rate_max);
+               s->tc_ov_wm = s->tc_ov_wm_max;
 #endif
                s->profile = subport_profile_id;