Skip to content

Commit

Permalink
net/memif: fix Tx bps statistics for zero-copy
Browse files Browse the repository at this point in the history
[ upstream commit 78dafb4 ]

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: 43b815d ("net/memif: support zero-copy slave")

Signed-off-by: Tianyu Li <tianyu.li@arm.com>
Reviewed-by: Jakub Grajciar <jgrajcia@cisco.com>
  • Loading branch information
TianyuLi0 authored and steevenlee committed Jun 8, 2021
1 parent b1ec8ac commit 0b1753a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/memif/rte_eth_memif.c
Expand Up @@ -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 *) -
Expand Down

0 comments on commit 0b1753a

Please sign in to comment.