[PATCH v2 5/9] net/e1000: remove queue stats mapping
Bruce Richardson
bruce.richardson at intel.com
Thu Aug 13 14:26:27 CEST 2026
On Fri, Jul 24, 2026 at 09:31:21AM +0200, David Marchand wrote:
> On Thu, 23 Jul 2026 at 22:30, Stephen Hemminger
> <stephen at networkplumber.org> wrote:
> > @@ -2070,19 +2060,11 @@ eth_igc_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *rte_stats,
> > /* Get per-queue statuses */
> > if (qstats) {
> > for (i = 0; i < IGC_QUEUE_PAIRS_NUM; i++) {
> > - /* GET TX queue statuses */
> > - int map_id = igc->txq_stats_map[i];
> > - if (map_id >= 0) {
> > - qstats->q_opackets[map_id] += queue_stats->pqgptc[i];
> > - qstats->q_obytes[map_id] += queue_stats->pqgotc[i];
> > - }
> > - /* Get RX queue statuses */
> > - map_id = igc->rxq_stats_map[i];
> > - if (map_id >= 0) {
> > - qstats->q_ipackets[map_id] += queue_stats->pqgprc[i];
> > - qstats->q_ibytes[map_id] += queue_stats->pqgorc[i];
> > - qstats->q_errors[map_id] += queue_stats->rqdpc[i];
> > - }
> > + qstats->q_opackets[i] += queue_stats->pqgptc[i];
> > + qstats->q_obytes[i] += queue_stats->pqgotc[i];
> > + qstats->q_ipackets[i] += queue_stats->pqgprc[i];
> > + qstats->q_ibytes[i] += queue_stats->pqgorc[i];
> > + qstats->q_errors[i] += queue_stats->rqdpc[i];
> > }
> > }
> >
>
> I suppose this is harmless.. but strange to read all queues regardless
> of what has been configured.
>
I'd tend to agree. Even though IGC_QUEUE_PAIRS_NUM is set to just 4, I'd
still check for each of the stats if it's less than configured rxq's or
txq's.
Otherwise:
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
More information about the dev
mailing list