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 8B180454EF; Tue, 25 Jun 2024 13:22:11 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 82E6E42F41; Tue, 25 Jun 2024 13:17:59 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by mails.dpdk.org (Postfix) with ESMTP id 4748342C24 for ; Tue, 25 Jun 2024 13:16:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719314213; x=1750850213; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6U31h/xvnsbqiUccOworqjdy9JpIJrTiJL7AGYnlEDU=; b=C2UtOjrW3PptRXD3vyuvWCEEcwrYZfWpbhrFs4ugQm9YI6dZH0AlrCs/ xdq/Sw8pRjvtBXkht0ClYdDlhnqM31DOyIWiHNQLrsoEQwxtFSkc1vciX 6rZY4Z5uCuVADSI/FYlPk6XxNU6YOVnsRMX5r8Y3hS5J8Z3LB5ntlJOXh 72O7jqK2XzxtF6oY7ATfJzH/rmuDZcxlkZT9L7gnEWjaR0tPm9LGrdF5q 5BWyBSGE4yxm4VwQHTl/XRsYoh7GjUEgQIC20nqUowdiiu9OQjpODb9gF UoMaYI3mpNVM5qaGpMzCRuCS0I5jcX4ktSlKg/wlZiz7qcgTbTYszXyqs Q==; X-CSE-ConnectionGUID: ZtehSERfTnCn96gBfCqvLA== X-CSE-MsgGUID: LhEHhkBUQq6oPuR7vmA10w== X-IronPort-AV: E=McAfee;i="6700,10204,11113"; a="16080267" X-IronPort-AV: E=Sophos;i="6.08,263,1712646000"; d="scan'208";a="16080267" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jun 2024 04:16:31 -0700 X-CSE-ConnectionGUID: xjAvlHTARgSRsbg7qy1XjA== X-CSE-MsgGUID: aMaJQyOxRR6ZOtOq9F8/TQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,263,1712646000"; d="scan'208";a="43719236" Received: from unknown (HELO silpixa00401119.ir.intel.com) ([10.55.129.167]) by orviesa009.jf.intel.com with ESMTP; 25 Jun 2024 04:16:31 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: Dave Ertman , bruce.richardson@intel.com, ian.stokes@intel.com Subject: [PATCH v3 056/129] net/ice/base: update strict status when assigning BW limits Date: Tue, 25 Jun 2024 12:13:01 +0100 Message-ID: <10b802897dd14140e67bed2df7f0f9d7df55109d.1719313663.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 From: Dave Ertman In the BW configuration performed by DCF functions, the strict/WFQ and priority field (referred to as Generic in the EAS) is not updated in the FW. This needs to be updated so as to not incorrectly allocate BW credits in the traffic shaping Tx scheduler. Signed-off-by: Dave Ertman Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_sched.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c index af8f8cc7a9..cb6131f69d 100644 --- a/drivers/net/ice/base/ice_sched.c +++ b/drivers/net/ice/base/ice_sched.c @@ -4659,6 +4659,9 @@ ice_sched_save_tc_node_bw(struct ice_port_info *pi, u8 tc, return 0; } +#define ICE_SCHED_GENERIC_STRICT_MODE BIT(4) +#define ICE_SCHED_GENERIC_PRIO_S 1 + /** * ice_sched_set_tc_node_bw_lmt - sets TC node BW limit * @pi: port information structure @@ -4683,6 +4686,17 @@ ice_sched_set_tc_node_bw_lmt(struct ice_port_info *pi, u8 tc, tc_node = ice_sched_get_tc_node(pi, tc); if (!tc_node) goto exit_set_tc_node_bw; + + /* update node's generic field */ + buf = tc_node->info; + data = &buf.data; + data->valid_sections = ICE_AQC_ELEM_VALID_GENERIC; + data->generic = (tc << ICE_SCHED_GENERIC_PRIO_S) | + ICE_SCHED_GENERIC_STRICT_MODE; + status = ice_sched_update_elem(pi->hw, tc_node, &buf); + if (status) + goto exit_set_tc_node_bw; + if (bw == ICE_SCHED_DFLT_BW) status = ice_sched_set_node_bw_dflt_lmt(pi, tc_node, rl_type); else -- 2.43.0