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 04B414404F; Wed, 12 Jun 2024 17:15:51 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D166B42EA7; Wed, 12 Jun 2024 17:05:28 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by mails.dpdk.org (Postfix) with ESMTP id 9BC9C42E83 for ; Wed, 12 Jun 2024 17:05:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718204718; x=1749740718; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=khwEDdkUdsaFjgOT5Vno41xRAhi5BZRkPywwCrcZD6Y=; b=RaUF4tOiujtP+zW+7fR1+yBNReYfOCb8ZDGwZlAjrawQoiawnNk6KIDL FgOQinTsikNHkAmbHyOGqx+nWABxaxUbJSq9oVfyW676djNjRRJC4PPXQ UpEf7ghdiMXhYn8D8+aAR8Df7PSRf+dsAWsolFs5viT1nji98jYSpS3nm IBEmTmtZtH5bP2tQ0HIYdieU+ftGFs8cFZCFsnRb4u/v2bZ3iOwcrNVX0 KkNsNZlFdZ8tKa3Bj6dRK0i6OmsXvxELVS/qUWHhWRBTtjvWFkCA2sYKY b/FztDEJZObbCaTwh962oozqC8WldfWnLZWxetOS19BVJAUVVTOGCizZq w==; X-CSE-ConnectionGUID: H4XguoSdS1mvfRoRKaYCtQ== X-CSE-MsgGUID: bnI274VbTqm2dh5z9WgEPA== X-IronPort-AV: E=McAfee;i="6700,10204,11101"; a="32459627" X-IronPort-AV: E=Sophos;i="6.08,233,1712646000"; d="scan'208";a="32459627" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jun 2024 08:05:17 -0700 X-CSE-ConnectionGUID: 67RyIB0jQM+KwFFzgzf6nA== X-CSE-MsgGUID: S7slYKwaRAW99+4FvX3RwA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,233,1712646000"; d="scan'208";a="39925498" Received: from silpixa00401119.ir.intel.com ([10.55.129.167]) by orviesa009.jf.intel.com with ESMTP; 12 Jun 2024 08:05:16 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: Ian Stokes , bruce.richardson@intel.com, Dave Ertman Subject: [PATCH v2 072/148] net/ice/base: update strict status when assigning BW limits Date: Wed, 12 Jun 2024 16:01:06 +0100 Message-ID: <65c83815576660cf5971cd4c533d9d6a0bcc6e58.1718204528.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: <20240430154014.1026-1-ian.stokes@intel.com> 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: Ian Stokes 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. Call the function "ice_sched_replay_node_prio" in the configuration flow once the node has been determined and the value of strict verified. Signed-off-by: Dave Ertman Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_sched.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c index af8f8cc7a9..d39106173b 100644 --- a/drivers/net/ice/base/ice_sched.c +++ b/drivers/net/ice/base/ice_sched.c @@ -4659,6 +4659,10 @@ 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_M 0xE +#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 +4687,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