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 86D2DA0C44; Mon, 12 Apr 2021 10:23:04 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 06FE94068E; Mon, 12 Apr 2021 10:23:04 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mails.dpdk.org (Postfix) with ESMTP id 43BA04014E; Mon, 12 Apr 2021 10:23:02 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8BC5D31B; Mon, 12 Apr 2021 01:23:01 -0700 (PDT) Received: from net-x86-dell-8268.shanghai.arm.com (net-x86-dell-8268.shanghai.arm.com [10.169.210.125]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 6B07E3F73B; Mon, 12 Apr 2021 01:22:59 -0700 (PDT) From: Tianyu Li To: Jakub Grajciar , Ferruh Yigit Cc: dev@dpdk.org, nd@arm.com, Tianyu Li , stable@dpdk.org Date: Mon, 12 Apr 2021 16:22:31 +0800 Message-Id: <20210412082231.1866235-1-tianyu.li@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] net/memif: fix missing Tx-bps stats for zero-copy X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" Fix the missing Tx-bps counter for memif zero-copy mode Before Rx-pps: 6891450 Rx-bps: 3528438928 Tx-pps: 6891482 Tx-bps: 0 After Throughput (since last show) Rx-pps: 11157056 Rx-bps: 5712413016 Tx-pps: 11157056 Tx-bps: 5712413016 Fixes: 43b815d88188 ("net/memif: support zero-copy slave") Cc: stable@dpdk.org Signed-off-by: Tianyu Li --- drivers/net/memif/rte_eth_memif.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c index 77c95bcb7..dd2825968 100644 --- a/drivers/net/memif/rte_eth_memif.c +++ b/drivers/net/memif/rte_eth_memif.c @@ -706,6 +706,7 @@ memif_tx_one_zc(struct pmd_process_private *proc_private, struct memif_queue *mq /* populate descriptor */ d0 = &ring->desc[slot & mask]; d0->length = rte_pktmbuf_data_len(mbuf); + mq->n_bytes += rte_pktmbuf_data_len(mbuf); /* FIXME: get region index */ d0->region = 1; d0->offset = rte_pktmbuf_mtod(mbuf, uint8_t *) - -- 2.25.1