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 42631A0C47 for ; Mon, 26 Jul 2021 15:54:08 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3B718410E6; Mon, 26 Jul 2021 15:54:08 +0200 (CEST) Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) by mails.dpdk.org (Postfix) with ESMTP id D8E9B40DDA for ; Mon, 26 Jul 2021 15:54:07 +0200 (CEST) Received: by mail-wr1-f45.google.com with SMTP id l4so11197282wrs.4 for ; Mon, 26 Jul 2021 06:54:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CpBTU0X3eUgGKhtEBBljNERPHQrPYhT3UHj3SB5Ets4=; b=clLSsu+ulXM3L8aJvir1ixUySPQ25WVNqElv8Jt+adAOif0W3amGRR9D1+sv0KvmTq CTLZWGB9o+THTvFa7sjsisC/KXFYsA3yGFTms/IUI6BeAkK8I5UAh9cgd8y2KctJQcUx EhTTvI/1UPKlkZUYQbsN2BziV7AMPEYO1THs5KjNNrtydwrYeUlNDVWvFSjN2BBgQBEr ILuSwOFJdDNja3+kkU/jP35LtOsTqWMl98OUuocPGpSVYH4gASiKqBI0YgMkz/0VipN0 wsCL3dkvpGECQ2p7Xw1I94zvWEqtciIj8eH11+Fw12rAJdDh08d3mEQAMQHjk/qvpk1v DKsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CpBTU0X3eUgGKhtEBBljNERPHQrPYhT3UHj3SB5Ets4=; b=Sv/owdaX3B2LwG4O3+imPJVe31LTWpvHt7O4QxvCjQ0tyvipNEtEhu4vYouGl8sNZS pSQvoYHSTzV2X+EzYNIQGZo7LA33Jn0xchJRYoczM6lpwL12cn8nl7ybOLV3hinfG5r3 PZ1NX3891PNBB5jpRYfyStlhwCmbb24jbnHKswNRD//ealkZrL76N9mxk3GTN7uplnJ3 FjCm3Yzosj9x2gIblmyNAxzbXCsOknzD0zeVXAwuIfUGRagZ2kficAse5qYIY1tgVRSR 0aFok6EMmGXc/hBLOTHHT43KwPX6+nr8qHNqA8P488dWQowI5d8PtbTY2ChX45lOmupR 60qA== X-Gm-Message-State: AOAM531a9ZtAIkZlZRrpDwFmb4SgrEQ/WBShbm7s7H45lViCH4dB9Udp AakxnY+RdTgSm//3e43zB1I= X-Google-Smtp-Source: ABdhPJye1FH7mEQF630pl65BPnmZ2xIfaCmXykiuGtCHjoY+3+qnHzq7uwJvQNqdlK8v2LM3BsHzkQ== X-Received: by 2002:adf:eb82:: with SMTP id t2mr19360104wrn.337.1627307647679; Mon, 26 Jul 2021 06:54:07 -0700 (PDT) Received: from localhost ([137.220.125.106]) by smtp.gmail.com with ESMTPSA id o17sm9094506wmp.31.2021.07.26.06.54.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jul 2021 06:54:07 -0700 (PDT) From: luca.boccassi@gmail.com To: Satha Rao Cc: Jerin Jacob , dpdk stable Date: Mon, 26 Jul 2021 14:52:35 +0100 Message-Id: <20210726135322.149850-12-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210726135322.149850-1-luca.boccassi@gmail.com> References: <20210712130551.2462159-1-luca.boccassi@gmail.com> <20210726135322.149850-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/octeontx2: fix TM node statistics query' has been queued to stable release 20.11.3 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/f58d25a57902f39e49a7b4c2d37750238804f1a5 Thanks. Luca Boccassi --- >From f58d25a57902f39e49a7b4c2d37750238804f1a5 Mon Sep 17 00:00:00 2001 From: Satha Rao Date: Wed, 7 Jul 2021 12:49:16 -0400 Subject: [PATCH] net/octeontx2: fix TM node statistics query [ upstream commit d9dda782ac08a47ca092a0c499b21635b23e6644 ] Until hierarchy committed TM hardware resources are not allocated for node. This patch check for status of HW resources before reading statistics. Fixes: 1e25d57fae38 ("net/octeontx2: add TM stats and shaper profile") Signed-off-by: Satha Rao Acked-by: Jerin Jacob --- drivers/net/octeontx2/otx2_tm.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/octeontx2/otx2_tm.c b/drivers/net/octeontx2/otx2_tm.c index fdd56697f1..6aff1f9587 100644 --- a/drivers/net/octeontx2/otx2_tm.c +++ b/drivers/net/octeontx2/otx2_tm.c @@ -2769,6 +2769,12 @@ otx2_nix_tm_node_stats_read(struct rte_eth_dev *eth_dev, uint32_t node_id, return -EINVAL; } + if (!(tm_node->flags & NIX_TM_NODE_HWRES)) { + error->type = RTE_TM_ERROR_TYPE_NODE_ID; + error->message = "HW resources not allocated"; + return -EINVAL; + } + /* Stats support only for leaf node or TL1 root */ if (nix_tm_is_leaf(dev, tm_node->lvl)) { reg = (((uint64_t)tm_node->id) << 32); -- 2.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-07-26 13:53:16.537718968 +0100 +++ 0012-net-octeontx2-fix-TM-node-statistics-query.patch 2021-07-26 13:53:15.813291866 +0100 @@ -1 +1 @@ -From d9dda782ac08a47ca092a0c499b21635b23e6644 Mon Sep 17 00:00:00 2001 +From f58d25a57902f39e49a7b4c2d37750238804f1a5 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit d9dda782ac08a47ca092a0c499b21635b23e6644 ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org