From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) by dpdk.org (Postfix) with ESMTP id 67FDF5F0D for ; Tue, 14 May 2019 13:11:39 +0200 (CEST) Received: by mail-lj1-f193.google.com with SMTP id r76so13887147lja.12 for ; Tue, 14 May 2019 04:11:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=jeGisao67BW8Au5Qg21vZYyso4SmubQg1sQtbAq2dfc=; b=D/GYoXT+O35b0DxBWh3kLyQdD/7i6G2r+5rbf256KcWcv6Q/JJpC0oumDKqC8uSA1e Nb2NcBuezlGtYK43G4umjzjQky3xwSMUFDQQpW9NnUmYcTZI4DEbWlEZWrcjG9dUNxCc AgtXqQHzx2WT3IxmP/t+wWQBwF7LumIqRm4X3oe4NghEo1G5c4BiEW4IW1Y0NIX80pbz qtD1K8K8wUVkvbLO5puvdrOsVZZk7rtt9eWxpTPzucy0xvfWnpgsLNSw+8/+BNo9yEQ2 vMwMBeFkN80+MGMi7ssZe2CHE+W+kdASnxQktfoW8eMkqBhm10En5cRgObWbBnrrvLSE 7V+w== 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; bh=jeGisao67BW8Au5Qg21vZYyso4SmubQg1sQtbAq2dfc=; b=tNwPINSToC2svVsvY2cVZzGY/9haYM8UY2eKfs7IHMAn2YxegJSl+ay9LVNsoNMlC0 +obbr8+7WjBboOlIrWQCk7zDkXixTsnI4xFis5BPftAqfuvEXKa4nzwdRUJqKwVrHeZE nitb6lzFBVd46vyxJy0scFSvrXldOkxXb7cZCWcowB4ud/bKkhpigx1qHaAZfDEUo4J8 0DZNqlrlG+AreXmf1NJbxvQmm28qB4hSYO7i1AL0YIsoHj2K94FmWxQy+p2l2JmlLYr1 Tnx64i3Sr7YMFCX8/Yl62tgOtLSZN4kWxqxMDRnH4vsv4V1hWlGlzw/v3BCo7LFNEC62 w/kg== X-Gm-Message-State: APjAAAUGhmoNfwwJIlC+HyNwlmNmVqRzSYEI5yh/4/tKPOtVahRWZOeF J//c2i9WGx2MJa3C+4iLJSa3lpiNXn8= X-Google-Smtp-Source: APXvYqwVOCWmZ5OD1jyCJeKqYnti0rrp5X2GabYmW+s7DZqHuVhBYZUVNr5lQmJGe2nk6P89DPYtJw== X-Received: by 2002:a2e:5b43:: with SMTP id p64mr16362732ljb.126.1557832298813; Tue, 14 May 2019 04:11:38 -0700 (PDT) Received: from rafalkozik.semihalf.local (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id w17sm2858967ljj.31.2019.05.14.04.11.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 14 May 2019 04:11:38 -0700 (PDT) From: Rafal Kozik To: dev@dpdk.org Cc: mw@semihalf.com, mk@semihalf.com, gtzalik@amazon.com, evgenys@amazon.com, matua@amazon.com, igorch@amazon.com, Rafal Kozik , stable@dpdk.org Date: Tue, 14 May 2019 13:11:26 +0200 Message-Id: <1557832286-15487-1-git-send-email-rk@semihalf.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH] net/ena: fix counting of per-queue number of Tx pkts X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 May 2019 11:11:39 -0000 Instead of counting number of used NIC Tx bufs just count number of Tx packets. Fixes: 45b6d86184fc ("net/ena: add per-queue software counters stats") Cc: stable@dpdk.org Signed-off-by: Rafal Kozik Acked-by: Michal Krawczyk --- drivers/net/ena/ena_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index 3eb3816..178c230 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -2391,7 +2391,7 @@ static uint16_t eth_ena_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, tx_info->tx_descs = nb_hw_desc; next_to_use++; - tx_ring->tx_stats.cnt += tx_info->num_of_bufs; + tx_ring->tx_stats.cnt++; tx_ring->tx_stats.bytes += total_length; } tx_ring->tx_stats.available_desc = -- 2.7.4 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id C5BE3A00E6 for ; Tue, 14 May 2019 13:11:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2CECB5F21; Tue, 14 May 2019 13:11:41 +0200 (CEST) Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) by dpdk.org (Postfix) with ESMTP id 67FDF5F0D for ; Tue, 14 May 2019 13:11:39 +0200 (CEST) Received: by mail-lj1-f193.google.com with SMTP id r76so13887147lja.12 for ; Tue, 14 May 2019 04:11:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=jeGisao67BW8Au5Qg21vZYyso4SmubQg1sQtbAq2dfc=; b=D/GYoXT+O35b0DxBWh3kLyQdD/7i6G2r+5rbf256KcWcv6Q/JJpC0oumDKqC8uSA1e Nb2NcBuezlGtYK43G4umjzjQky3xwSMUFDQQpW9NnUmYcTZI4DEbWlEZWrcjG9dUNxCc AgtXqQHzx2WT3IxmP/t+wWQBwF7LumIqRm4X3oe4NghEo1G5c4BiEW4IW1Y0NIX80pbz qtD1K8K8wUVkvbLO5puvdrOsVZZk7rtt9eWxpTPzucy0xvfWnpgsLNSw+8/+BNo9yEQ2 vMwMBeFkN80+MGMi7ssZe2CHE+W+kdASnxQktfoW8eMkqBhm10En5cRgObWbBnrrvLSE 7V+w== 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; bh=jeGisao67BW8Au5Qg21vZYyso4SmubQg1sQtbAq2dfc=; b=tNwPINSToC2svVsvY2cVZzGY/9haYM8UY2eKfs7IHMAn2YxegJSl+ay9LVNsoNMlC0 +obbr8+7WjBboOlIrWQCk7zDkXixTsnI4xFis5BPftAqfuvEXKa4nzwdRUJqKwVrHeZE nitb6lzFBVd46vyxJy0scFSvrXldOkxXb7cZCWcowB4ud/bKkhpigx1qHaAZfDEUo4J8 0DZNqlrlG+AreXmf1NJbxvQmm28qB4hSYO7i1AL0YIsoHj2K94FmWxQy+p2l2JmlLYr1 Tnx64i3Sr7YMFCX8/Yl62tgOtLSZN4kWxqxMDRnH4vsv4V1hWlGlzw/v3BCo7LFNEC62 w/kg== X-Gm-Message-State: APjAAAUGhmoNfwwJIlC+HyNwlmNmVqRzSYEI5yh/4/tKPOtVahRWZOeF J//c2i9WGx2MJa3C+4iLJSa3lpiNXn8= X-Google-Smtp-Source: APXvYqwVOCWmZ5OD1jyCJeKqYnti0rrp5X2GabYmW+s7DZqHuVhBYZUVNr5lQmJGe2nk6P89DPYtJw== X-Received: by 2002:a2e:5b43:: with SMTP id p64mr16362732ljb.126.1557832298813; Tue, 14 May 2019 04:11:38 -0700 (PDT) Received: from rafalkozik.semihalf.local (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id w17sm2858967ljj.31.2019.05.14.04.11.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 14 May 2019 04:11:38 -0700 (PDT) From: Rafal Kozik To: dev@dpdk.org Cc: mw@semihalf.com, mk@semihalf.com, gtzalik@amazon.com, evgenys@amazon.com, matua@amazon.com, igorch@amazon.com, Rafal Kozik , stable@dpdk.org Date: Tue, 14 May 2019 13:11:26 +0200 Message-Id: <1557832286-15487-1-git-send-email-rk@semihalf.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH] net/ena: fix counting of per-queue number of Tx pkts X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Content-Type: text/plain; charset="UTF-8" Message-ID: <20190514111126.95jF3mlRa4U2N6ydWdS-729Ta4sjXwo-saEGWmQX5QA@z> Instead of counting number of used NIC Tx bufs just count number of Tx packets. Fixes: 45b6d86184fc ("net/ena: add per-queue software counters stats") Cc: stable@dpdk.org Signed-off-by: Rafal Kozik Acked-by: Michal Krawczyk --- drivers/net/ena/ena_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index 3eb3816..178c230 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -2391,7 +2391,7 @@ static uint16_t eth_ena_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, tx_info->tx_descs = nb_hw_desc; next_to_use++; - tx_ring->tx_stats.cnt += tx_info->num_of_bufs; + tx_ring->tx_stats.cnt++; tx_ring->tx_stats.bytes += total_length; } tx_ring->tx_stats.available_desc = -- 2.7.4