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 852852B86 for ; Tue, 1 May 2018 12:47:13 +0200 (CEST) Received: by mail-wm0-f68.google.com with SMTP id a8so17226681wmg.5 for ; Tue, 01 May 2018 03:47:13 -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=tLdDpR/93yDFU0YeYHoBwQ4TiGgsE6Aoh5gNtd1Nrl0=; b=NlDR9j/Lr3AYZE8+nVAITVBGNDOsVu/Rl5CF2MwrkwfLnboCs99Sk/7mcLDolLI+ZC v3OHYvj6aqTN1IFI2fzKw2v8uCVVjmo6TINNWvpDjp70iC5htCZCX2Vv3RI7aDkFXgXC 2n0RRvpQDZz+obsQ3acZg1r1d0WZMRr+IQDS8TccbYEo6dNF7MuAzZOOZARi7aR8z+Aj lhZHzc7mTPAUby8MGdhvmUR+gZcVrMubP9cyQJZqrsBWvMW+hN3RsF3mjg25oUQI/R9P qyPe4YfK1PxKqTtX5YmqRwDF5qb97oQ8MQyguhrEdTdqmzVY+yChBmCyDMjLLKwqNepT lVPQ== 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=tLdDpR/93yDFU0YeYHoBwQ4TiGgsE6Aoh5gNtd1Nrl0=; b=boTEWl3An9w/f+taCX5u/a01y7ewnnACqGEqaF1eQgJv40QDdQqkA6CxNdlXAiU1yz cBFsWlQMGAD1888hpmcATVQW/m0tWoMFDnvIG4ndCQ6XaPiK+RMOsUzrwGmYA3jaiIXv KaB893TB5l7qO5hKuSi2DDRGf/r73OWQ4Azt7CbfRrlpYNd9RrYKfVCC7U7ejzHLf9s4 X8Ym6dg6q+ckGoquoFtR3c7I3ZJ/dtWAT6ewTnU4zTpbVYXJFZOd3yA/bvkZpoI4zDvH evzQeTXzeia5NNkuJX44qpso9njK0fOUR00XAv7ZT682fUb+/GibmDwA6+z33va62n+k cVEA== X-Gm-Message-State: ALQs6tA7XT+p94Iry8UNG6tw0K3l0LaP4Z45Sb4pWpbS5MrIJAbikEaY j3jgc846QN9AKe/5rrtgxfA= X-Google-Smtp-Source: AB8JxZr2QCV9vQ5BjrH8iJFF04muBXWUcRxqzFOklyEJ97qtx1k4cEXrHkwhhv3xFYDStB2itVgCKQ== X-Received: by 10.28.69.132 with SMTP id l4mr9359734wmi.142.1525171633220; Tue, 01 May 2018 03:47:13 -0700 (PDT) Received: from localhost (slip139-92-244-193.lon.uk.prserv.net. [139.92.244.193]) by smtp.gmail.com with ESMTPSA id b105-v6sm11828333wrd.64.2018.05.01.03.47.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 May 2018 03:47:12 -0700 (PDT) From: luca.boccassi@gmail.com To: Matej Vido Cc: dpdk stable Date: Tue, 1 May 2018 11:44:48 +0100 Message-Id: <20180501104509.17238-25-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180501104509.17238-1-luca.boccassi@gmail.com> References: <20180501104509.17238-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'net/szedata2: fix total stats' has been queued to LTS release 16.11.7 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: Tue, 01 May 2018 10:47:13 -0000 Hi, FYI, your patch has been queued to LTS release 16.11.7 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/03/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From 8855984b69dc92ca169e72484ec8ae4d6aea141d Mon Sep 17 00:00:00 2001 From: Matej Vido Date: Wed, 4 Apr 2018 15:42:18 +0200 Subject: [PATCH] net/szedata2: fix total stats [ upstream commit 745f6a1e7e37d80920d38be4fffbb442a09ab7cf ] Counters from all queues have to be summed up for total stats even though the number of queue stats counters is not sufficient. Fixes: 83556fd2c0fc ("szedata2: change to physical device type") Signed-off-by: Matej Vido --- drivers/net/szedata2/rte_eth_szedata2.c | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/drivers/net/szedata2/rte_eth_szedata2.c b/drivers/net/szedata2/rte_eth_szedata2.c index 9cf408ed2..3070f1590 100644 --- a/drivers/net/szedata2/rte_eth_szedata2.c +++ b/drivers/net/szedata2/rte_eth_szedata2.c @@ -1051,22 +1051,29 @@ eth_stats_get(struct rte_eth_dev *dev, uint64_t tx_err_total = 0; uint64_t rx_total_bytes = 0; uint64_t tx_total_bytes = 0; - const struct pmd_internals *internals = dev->data->dev_private; - for (i = 0; i < RTE_ETHDEV_QUEUE_STAT_CNTRS && i < nb_rx; i++) { - stats->q_ipackets[i] = internals->rx_queue[i].rx_pkts; - stats->q_ibytes[i] = internals->rx_queue[i].rx_bytes; - rx_total += stats->q_ipackets[i]; - rx_total_bytes += stats->q_ibytes[i]; + for (i = 0; i < nb_rx; i++) { + struct szedata2_rx_queue *rxq = dev->data->rx_queues[i]; + + if (i < RTE_ETHDEV_QUEUE_STAT_CNTRS) { + stats->q_ipackets[i] = rxq->rx_pkts; + stats->q_ibytes[i] = rxq->rx_bytes; + } + rx_total += rxq->rx_pkts; + rx_total_bytes += rxq->rx_bytes; } - for (i = 0; i < RTE_ETHDEV_QUEUE_STAT_CNTRS && i < nb_tx; i++) { - stats->q_opackets[i] = internals->tx_queue[i].tx_pkts; - stats->q_obytes[i] = internals->tx_queue[i].tx_bytes; - stats->q_errors[i] = internals->tx_queue[i].err_pkts; - tx_total += stats->q_opackets[i]; - tx_total_bytes += stats->q_obytes[i]; - tx_err_total += stats->q_errors[i]; + for (i = 0; i < nb_tx; i++) { + struct szedata2_tx_queue *txq = dev->data->tx_queues[i]; + + if (i < RTE_ETHDEV_QUEUE_STAT_CNTRS) { + stats->q_opackets[i] = txq->tx_pkts; + stats->q_obytes[i] = txq->tx_bytes; + stats->q_errors[i] = txq->err_pkts; + } + tx_total += txq->tx_pkts; + tx_total_bytes += txq->tx_bytes; + tx_err_total += txq->err_pkts; } stats->ipackets = rx_total; -- 2.14.2