[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACKFLim8e_ig8j3BzAtAw8wXiN2ZGs-Qztc07jCM-Bx=Z4i7MQ@mail.gmail.com>
Date: Wed, 6 Mar 2024 10:10:39 -0800
From: Michael Chan <michael.chan@...adcom.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
pabeni@...hat.com, amritha.nambiar@...el.com, danielj@...dia.com,
mst@...hat.com, sdf@...gle.com, vadim.fedorenko@...ux.dev,
przemyslaw.kitszel@...el.com
Subject: Re: [PATCH net-next v2 3/3] eth: bnxt: support per-queue statistics
On Wed, Mar 6, 2024 at 6:56 AM Jakub Kicinski <kuba@...nel.org> wrote:
>
> On Wed, 28 Feb 2024 19:40:01 -0800 Michael Chan wrote:
> > Sorry I missed this earlier. When we are in XDP mode, the first set
> > of TX rings is generally hidden from the user. The standard TX rings
> > don't start from index 0. They start from bp->tx_nr_rings_xdp.
> > Should we adjust for that?
>
> Hi Michael! Sorry for the delay, I was waiting for some related netlink
> bits to get merged to simplify the core parts.
>
> Not sure what the most idiomatic way would be to translate the indexes.
>
> Do you prefer:
>
> bnapi = &bp->tx_ring[bp->tx_ring_map[i]].bnapi;
> sw = bnapi->cp_ring.stats.sw_stats;
The 2 methods are interchangeable but I think it is preferred to use
bp->tx_ring_map[]. It's easier to change the underlying mapping
scheme in the future if we use bp->tx_ring_map[].
>
> or simply:
>
> sw = bp->bnapi[i - bp->tx_nr_rings_xdp]->cp_ring.stats.sw_stats;
>
> or something else?
Download attachment "smime.p7s" of type "application/pkcs7-signature" (4209 bytes)
Powered by blists - more mailing lists