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 B23924326F for ; Thu, 2 Nov 2023 14:14:33 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AC3D042DE6; Thu, 2 Nov 2023 14:14:33 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 4D07A42DDB for ; Thu, 2 Nov 2023 14:14:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698930869; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tVGJIc75g5CrrVhmQA9Xpzl/o807psep1/syfiGoy3s=; b=EZqafhu8tl4T+LQFnNRr2HIkxybabhu87GJOUm0XxI0MEAj22pfu4AumcvXxqtOz9989QC hNeFNtZM6sx8R5OxSuijQSxNJrJ1eYubO1JKfVN3Ia/++kjVfEkCBt0FpYmsMsUhV79Xtv WlP2DoxzExRaZVeNxGrX4BCIIhuWfy8= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-571-PUpGbfuzMjOeG53H9d30Hw-1; Thu, 02 Nov 2023 09:14:26 -0400 X-MC-Unique: PUpGbfuzMjOeG53H9d30Hw-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3B8712806050; Thu, 2 Nov 2023 13:14:26 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.192.45]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0F3AA492BFA; Thu, 2 Nov 2023 13:14:24 +0000 (UTC) From: Kevin Traynor To: Kaiwen Deng Cc: Wenjun Wu , dpdk stable Subject: patch 'net/ice: fix TM configuration clearing' has been queued to stable release 21.11.6 Date: Thu, 2 Nov 2023 13:12:04 +0000 Message-ID: <20231102131254.315947-58-ktraynor@redhat.com> In-Reply-To: <20231102131254.315947-1-ktraynor@redhat.com> References: <20231102131254.315947-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 21.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/08/23. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/28ddcaf4a6195f728cb5ead6a8e529f82dd525e6 Thanks. Kevin --- >From 28ddcaf4a6195f728cb5ead6a8e529f82dd525e6 Mon Sep 17 00:00:00 2001 From: Kaiwen Deng Date: Wed, 6 Sep 2023 15:49:30 +0800 Subject: [PATCH] net/ice: fix TM configuration clearing [ upstream commit c21a6a3ff6c49965d4373677255058d041dafe96 ] When the device is stopped, the PMD resets the commit flag so that we can update the hierarchy configuration. The commit flag is also used to determine if the hierarchy configuration needs to be cleared. When the PMD exits, it always stops the device first and also resets the commit flag result in the hierarchy configuration is not cleared. This commit changes the PMD to not reset the commit flag when the device is stopped. And we prevent additional commit when device is running by only checking the stop flag. Fixes: f5ec6a3a1987 ("net/ice: fix TM hierarchy commit flag reset") Signed-off-by: Kaiwen Deng Acked-by: Wenjun Wu --- drivers/net/ice/ice_dcf_ethdev.c | 2 -- drivers/net/ice/ice_dcf_sched.c | 14 ++++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c index 20888f1980..8954dc0f8d 100644 --- a/drivers/net/ice/ice_dcf_ethdev.c +++ b/drivers/net/ice/ice_dcf_ethdev.c @@ -612,5 +612,4 @@ ice_dcf_dev_stop(struct rte_eth_dev *dev) struct rte_intr_handle *intr_handle = dev->intr_handle; struct ice_adapter *ad = &dcf_ad->parent; - struct ice_dcf_hw *hw = &dcf_ad->real_hw; if (ad->pf.adapter_stopped == 1) { @@ -630,5 +629,4 @@ ice_dcf_dev_stop(struct rte_eth_dev *dev) dev->data->dev_link.link_status = RTE_ETH_LINK_DOWN; ad->pf.adapter_stopped = 1; - hw->tm_conf.committed = false; return 0; diff --git a/drivers/net/ice/ice_dcf_sched.c b/drivers/net/ice/ice_dcf_sched.c index a231c1e60b..b08bc5f1de 100644 --- a/drivers/net/ice/ice_dcf_sched.c +++ b/drivers/net/ice/ice_dcf_sched.c @@ -238,4 +238,5 @@ ice_dcf_node_add(struct rte_eth_dev *dev, uint32_t node_id, struct ice_dcf_tm_shaper_profile *shaper_profile = NULL; struct ice_dcf_adapter *adapter = dev->data->dev_private; + struct ice_adapter *ad = &adapter->parent; struct ice_dcf_hw *hw = &adapter->real_hw; struct ice_dcf_tm_node *parent_node; @@ -247,8 +248,8 @@ ice_dcf_node_add(struct rte_eth_dev *dev, uint32_t node_id, return -EINVAL; - /* if already committed */ - if (hw->tm_conf.committed) { + /* if port is running */ + if (!ad->pf.adapter_stopped) { error->type = RTE_TM_ERROR_TYPE_UNSPECIFIED; - error->message = "already committed"; + error->message = "port is running"; return -EINVAL; } @@ -401,4 +402,5 @@ ice_dcf_node_delete(struct rte_eth_dev *dev, uint32_t node_id, enum ice_dcf_tm_node_type node_type = ICE_DCF_TM_NODE_TYPE_MAX; struct ice_dcf_adapter *adapter = dev->data->dev_private; + struct ice_adapter *ad = &adapter->parent; struct ice_dcf_hw *hw = &adapter->real_hw; struct ice_dcf_tm_node *tm_node; @@ -407,8 +409,8 @@ ice_dcf_node_delete(struct rte_eth_dev *dev, uint32_t node_id, return -EINVAL; - /* if already committed */ - if (hw->tm_conf.committed) { + /* if port is running */ + if (!ad->pf.adapter_stopped) { error->type = RTE_TM_ERROR_TYPE_UNSPECIFIED; - error->message = "already committed"; + error->message = "port is running"; return -EINVAL; } -- 2.41.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-11-02 13:09:42.237147124 +0000 +++ 0058-net-ice-fix-TM-configuration-clearing.patch 2023-11-02 13:09:40.867163509 +0000 @@ -1 +1 @@ -From c21a6a3ff6c49965d4373677255058d041dafe96 Mon Sep 17 00:00:00 2001 +From 28ddcaf4a6195f728cb5ead6a8e529f82dd525e6 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit c21a6a3ff6c49965d4373677255058d041dafe96 ] + @@ -17 +18,0 @@ -Cc: stable@dpdk.org @@ -27 +28 @@ -index 30ad18d8fc..065ec728c2 100644 +index 20888f1980..8954dc0f8d 100644 @@ -30 +31 @@ -@@ -671,5 +671,4 @@ ice_dcf_dev_stop(struct rte_eth_dev *dev) +@@ -612,5 +612,4 @@ ice_dcf_dev_stop(struct rte_eth_dev *dev) @@ -36 +37 @@ -@@ -698,5 +697,4 @@ ice_dcf_dev_stop(struct rte_eth_dev *dev) +@@ -630,5 +629,4 @@ ice_dcf_dev_stop(struct rte_eth_dev *dev)