[Patch v4 17/17] net/mana: add function to report queue stats

Ferruh Yigit ferruh.yigit at xilinx.com
Mon Aug 22 17:08:26 CEST 2022


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.



More information about the dev mailing list