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 1463242ED2 for ; Fri, 21 Jul 2023 00:42:50 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0F89B427F5; Fri, 21 Jul 2023 00:42:50 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 26EE940DD8; Fri, 21 Jul 2023 00:42:47 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1004) id 4A612236EBDF; Thu, 20 Jul 2023 15:42:46 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 4A612236EBDF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxonhyperv.com; s=default; t=1689892966; bh=ONgnxe9HePiM75MybruSLxf+XDEhMd6A8e8KwHPh9l4=; h=From:To:Cc:Subject:Date:From; b=N8G9ft22arXDAKC0NINaEVn50AOBxx2EsbDj72eiRj9aEHO6dElUtfPWBR4JwAqjs PSnRlLWa2cdSY28lh/xnLtLhPIzhqbbZBNXQH18ukQT3e48urWxRVsvaWXVo6yD7vh Br9TFgLO7k6ENc0x4v30miak/tH1QiTCBMgniWq8= From: longli@linuxonhyperv.com To: Ferruh Yigit , Andrew Rybchenko Cc: dev@dpdk.org, Ajay Sharma , Long Li , stable@dpdk.org Subject: [PATCH] net/mana: fix stats for txq bytes sent Date: Thu, 20 Jul 2023 15:42:41 -0700 Message-Id: <1689892961-10535-1-git-send-email-longli@linuxonhyperv.com> X-Mailer: git-send-email 1.8.3.1 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 From: Long Li Bytes should be calculated using the packet length, not the mbuf segment data length. Fixes: 517ed6e2d590 ("net/mana: add basic driver with build environment") Cc: stable@dpdk.org Signed-off-by: Long Li --- drivers/net/mana/tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mana/tx.c b/drivers/net/mana/tx.c index 5947efbe8d..11ba2ee1ac 100644 --- a/drivers/net/mana/tx.c +++ b/drivers/net/mana/tx.c @@ -201,7 +201,7 @@ mana_tx_burst(void *dpdk_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) if (!desc->pkt) { DP_LOG(ERR, "mana_txq_desc has a NULL pkt"); } else { - txq->stats.bytes += desc->pkt->data_len; + txq->stats.bytes += desc->pkt->pkt_len; rte_pktmbuf_free(desc->pkt); } -- 2.34.1