From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by dpdk.org (Postfix) with ESMTP id 2EA13187 for ; Mon, 30 Apr 2018 16:42:57 +0200 (CEST) Received: by mail-wm0-f68.google.com with SMTP id f6so13603841wmc.4 for ; Mon, 30 Apr 2018 07:42:57 -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; bh=tE2UvzOO+RL2GUDsVauPer49LTL24FRUEIFk4hvJ/DM=; b=ImOXM7n1HTU0V70PPIQf0D9NY73rBc79dD2AeaOK5jY3uzyZPPUoR01h5ZhfjqSCli fYkZpnK8T22UivvA3Fkz1qbh4rSaIhNhz29mLpKNuqBDMQ4rHnKugSPY93X7Xosdj56q HQCdrjujDv/1+WNA4v/lQ37MXV9rzj3/RnNgocSSopUk8knC8mUxiHw36x19G9JOxPNX dFX1Le1AIiX6JTT9avRY+1Nux47XuMZBDUKvo4J9tKa726KGbq0WNZYyK7bEXETl2ZjX JGGBfbmgNZYlp8ew7dFnwjoYneEiR9kdZf/vlrCAamo1Uqrm1LPwvIXdGMn1pJ5kwr2A Xw3Q== 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; bh=tE2UvzOO+RL2GUDsVauPer49LTL24FRUEIFk4hvJ/DM=; b=Nv9E7szataTuzuhPbjyBTpe59w9WenIyJbj7KRWi8y3fk+mfdQMPwWYnHtAFMmqfoO kfXTH0eUXnqTMgEQGWqofiXzV5CFgqG5ccBMaLYF6Jdl+s/E+dPhgZqY1lkb5jVP5WEJ AvP/Q9RDeaj5AcQ2a2Q0mrwaTGz7MKQkPAciFQs6znTViiPNNOckrYtimffFcZVeTNhU QDhvYo5o5GBJD4sVIX9CkFD0RNZk42HhM7QJFn9KpbTU4736Wa5n+LgMwLGuvZwHW7j/ /Rvw+0nIy6boSa40uz0A+le1ADEN3ULH+0RWEMKCFHbycGd56z1NO2GTF0cd5k1yUIpT tueg== X-Gm-Message-State: ALQs6tANSBrm2VJJ0OjccaEMCB3CEwEVUnZL47iYHjkjb33TszF42P+d xa3jAOu1Ib4ER0FJDv6h1va6x0DyifQ= X-Google-Smtp-Source: AB8JxZrWzkZ9Gtf5y0Tq7Ma145SHbL1jEMh91I9zh/YFQEL2igGyNhOR/0t+1huSvcfEQCZEamN/7w== X-Received: by 10.28.210.193 with SMTP id j184mr7460873wmg.14.1525099376737; Mon, 30 Apr 2018 07:42:56 -0700 (PDT) Received: from localhost ([2a00:23c5:be9a:5200:ce4c:82c0:d567:ecbb]) by smtp.gmail.com with ESMTPSA id k23-v6sm9308537wrc.59.2018.04.30.07.42.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Apr 2018 07:42:55 -0700 (PDT) From: luca.boccassi@gmail.com To: Hemant Agrawal Cc: dpdk stable Date: Mon, 30 Apr 2018 15:40:35 +0100 Message-Id: <20180430144223.18657-20-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180430144223.18657-1-luca.boccassi@gmail.com> References: <20180430140606.4615-80-luca.boccassi@gmail.com> <20180430144223.18657-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'net/dpaa2: fix xstats' has been queued to stable release 18.02.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2018 14:42:57 -0000 Hi, FYI, your patch has been queued to stable release 18.02.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/02/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From 2739338fff6635592d2b663a93cd9e68d1ec980a Mon Sep 17 00:00:00 2001 From: Hemant Agrawal Date: Mon, 9 Apr 2018 15:52:50 +0530 Subject: [PATCH] net/dpaa2: fix xstats [ upstream commit 876b2c902ea0480f3bd0f4f9361e8e0ad9745ff3 ] Fixes: 1d6329b2fc1f ("net/dpaa2: support extra stats") Signed-off-by: Hemant Agrawal --- drivers/net/dpaa2/dpaa2_ethdev.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index 09a11d65a..182fcf329 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -1169,12 +1169,12 @@ dpaa2_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats, union dpni_statistics value[3] = {}; unsigned int i = 0, num = RTE_DIM(dpaa2_xstats_strings); - if (xstats == NULL) - return 0; - if (n < num) return num; + if (xstats == NULL) + return 0; + /* Get Counters from page_0*/ retcode = dpni_get_statistics(dpni, CMD_PRI_LOW, priv->token, 0, 0, &value[0]); @@ -1207,10 +1207,13 @@ err: static int dpaa2_xstats_get_names(__rte_unused struct rte_eth_dev *dev, struct rte_eth_xstat_name *xstats_names, - __rte_unused unsigned int limit) + unsigned int limit) { unsigned int i, stat_cnt = RTE_DIM(dpaa2_xstats_strings); + if (limit < stat_cnt) + return stat_cnt; + if (xstats_names != NULL) for (i = 0; i < stat_cnt; i++) snprintf(xstats_names[i].name, -- 2.14.2