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 9E2EE45500; Wed, 26 Jun 2024 13:59:03 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B300E433AC; Wed, 26 Jun 2024 13:55:43 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by mails.dpdk.org (Postfix) with ESMTP id 8EB0D42E95 for ; Wed, 26 Jun 2024 13:44:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719402241; x=1750938241; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6U31h/xvnsbqiUccOworqjdy9JpIJrTiJL7AGYnlEDU=; b=EjNcCkk7xMc23pENpkX6x5ArVsGh05c9o/D56Z2M4lJD/4GH6UXzL9QI ZixEOB3VjW/MW4ijuNYnF8VSiyrJbAumeYarj9Q0SfLcbBvIwPnIX2fM1 8NCnWeYCjU05f8bMNoq90Cr5P2U+SuCI88e7hA0N3Yu5BXn7DosUh3JBZ M+GAhJGpdHDFr3ctyKI0p5PNgg0GrI0tg1tUb3SRPzZnKXekn0P22RH+4 zHucEfyznAWrCkxDAbS5ISj0fNdCZ3+jYgdzPICDORdPyGVONenKfUZOM OBv5+u1bXZFr8R1PBZ+aJ/H//3u/vMIIXsolnul+Fjplqn/tYiTncg/pL g==; X-CSE-ConnectionGUID: Fn/3QDFtSbeovdyzpT5uQA== X-CSE-MsgGUID: /yegsXJwRX+AZrWO1IH1/w== X-IronPort-AV: E=McAfee;i="6700,10204,11114"; a="38979391" X-IronPort-AV: E=Sophos;i="6.08,266,1712646000"; d="scan'208";a="38979391" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jun 2024 04:44:01 -0700 X-CSE-ConnectionGUID: 6eteRQOSTx6naySNu0qUpQ== X-CSE-MsgGUID: QOO7INShS5mGt7PLkem6ew== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,266,1712646000"; d="scan'208";a="43873753" Received: from unknown (HELO silpixa00401119.ir.intel.com) ([10.55.129.167]) by orviesa010.jf.intel.com with ESMTP; 26 Jun 2024 04:44:00 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: Dave Ertman , ian.stokes@intel.com, bruce.richardson@intel.com Subject: [PATCH v4 036/103] net/ice/base: update strict status when assigning BW limits Date: Wed, 26 Jun 2024 12:41:24 +0100 Message-ID: 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