[Patch v4 17/17] net/mana: add function to report queue stats
Long Li
longli at microsoft.com
Mon Aug 22 20:35:58 CEST 2022
> Subject: Re: [Patch v4 17/17] net/mana: add function to report queue stats
>
> On 7/9/2022 12:49 AM, longli at linuxonhyperv.com wrote:
> > CAUTION: This message has originated from an External Source. Please use
> proper judgment and caution when opening attachments, clicking links, or
> responding to this email.
> >
> >
> > From: Long Li <longli at microsoft.com>
> >
> > Report packet statistics.
> >
> > Signed-off-by: Long Li <longli at microsoft.com>
>
> <...>
>
> > +static int mana_dev_stats_get(struct rte_eth_dev *dev,
> > + struct rte_eth_stats *stats) {
> > + unsigned int i;
> > +
> > + for (i = 0; i < dev->data->nb_tx_queues; i++) {
> > + struct mana_txq *txq = dev->data->tx_queues[i];
> > +
> > + if (!txq)
> > + continue;
> > +
> > + stats->opackets = txq->stats.packets;
> > + stats->obytes = txq->stats.bytes;
> > + stats->oerrors = txq->stats.errors;
>
>
> Shouldn't these be "+=" ? Same for below Rx block.
Thank you. I will fix those.
More information about the dev
mailing list