From 78dafb4bb544a4288be174345c321b48e4c676fb Mon Sep 17 00:00:00 2001 From: Tianyu Li Date: Mon, 12 Apr 2021 16:22:31 +0800 Subject: [PATCH] net/memif: fix Tx bps statistics for zero-copy 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 Reviewed-by: Jakub Grajciar --- 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 37a49fa13d..da7195783f 100644 --- a/drivers/net/memif/rte_eth_memif.c +++ b/drivers/net/memif/rte_eth_memif.c @@ -706,6 +706,7 @@ next_in_chain: /* 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.20.1