On Wed, 18 Sep 2024 14:09:36 +0800 "WanRenyong" <wa...@yunsilicon.com> wrote:
> @@ -166,6 +169,7 @@ xsc_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, > uint16_t pkts_n) > /* Fill wqe */ > wqe->va = rte_cpu_to_le_64(rte_pktmbuf_iova(rep)); > rte_pktmbuf_data_len(seg) = len; > + rxq->stats.rx_bytes += rte_pktmbuf_pkt_len(pkt); > > *(pkts++) = pkt; > pkt = NULL; > @@ -200,6 +204,7 @@ xsc_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, > uint16_t pkts_n) > rxq->nb_rx_hold = 0; > } > > + rxq->stats.rx_pkts += nb_pkts; > return nb_pkts; > } You can a small performance boost by keeping a total_bytes counter in rx_burst function and only add it to rx_bytes after the loop.