From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1ADCEA0548; Wed, 21 Apr 2021 08:50:19 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 02A564195D; Wed, 21 Apr 2021 08:50:19 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 6AE5A41932; Wed, 21 Apr 2021 08:50:17 +0200 (CEST) IronPort-SDR: FhACBAcIi4Sph5A4FfDJpe9DT6yXmqEapbqDsRimBv0V3YkFV+aGYK8eMzCyeuEbN+c81b4A32 NYGxRzXTk+bg== X-IronPort-AV: E=McAfee;i="6200,9189,9960"; a="259603602" X-IronPort-AV: E=Sophos;i="5.82,238,1613462400"; d="scan'208";a="259603602" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Apr 2021 23:50:16 -0700 IronPort-SDR: KrnkDj45lig3x/3zu1gyXZUsnqWNe9pdWI9ido7G26aveHVXgLX/mA+diEq2bcV/gyMhN3e0zQ SzUC4Dc/SCoQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,238,1613462400"; d="scan'208";a="423447483" Received: from silpixa00400629.ir.intel.com ([10.237.214.112]) by orsmga007.jf.intel.com with ESMTP; 20 Apr 2021 23:50:14 -0700 From: Savinay Dharmappa To: dev@dpdk.org, jasvinder.singh@intel.com, cristian.dumitrescu@intel.com Cc: savinay.dharmappa@intel.com, stable@dpdk.org Date: Wed, 21 Apr 2021 07:50:01 +0100 Message-Id: <20210421065001.96074-1-savinay.dharmappa@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210309161002.31384-1-savinay.dharmappa@intel.com> References: <20210309161002.31384-1-savinay.dharmappa@intel.com> Subject: [dpdk-dev] [PATCH v3] sched : fix traffic class oversubscription parameter X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 Acked-by: Jasvinder Singh --- v3: update the title. --- lib/librte_sched/rte_sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c index 7c56880681..cd87e688e4 100644 --- a/lib/librte_sched/rte_sched.c +++ b/lib/librte_sched/rte_sched.c @@ -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; -- 2.17.1