lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240306065602.791c298f@kernel.org>
Date: Wed, 6 Mar 2024 06:56:02 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Michael Chan <michael.chan@...adcom.com>
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, 28 Feb 2024 19:40:01 -0800 Michael Chan wrote:
> > +static void bnxt_get_queue_stats_tx(struct net_device *dev, int i,
> > +                                   struct netdev_queue_stats_tx *stats)
> > +{
> > +       struct bnxt *bp = netdev_priv(dev);
> > +       u64 *sw;
> > +
> > +       sw = bp->bnapi[i]->cp_ring.stats.sw_stats;  
> 
> 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;

or simply:

	sw = bp->bnapi[i - bp->tx_nr_rings_xdp]->cp_ring.stats.sw_stats;

or something else?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ