[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200715164438.7cedb552@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Wed, 15 Jul 2020 16:44:38 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Igor Russkikh <irusskikh@...vell.com>
Cc: <netdev@...r.kernel.org>, "David S . Miller" <davem@...emloft.net>,
Mark Starovoytov <mstarovoitov@...vell.com>,
Dmitry Bogdanov <dbogdanov@...vell.com>
Subject: Re: [PATCH v2 net-next 02/10] net: atlantic: additional per-queue
stats
On Wed, 15 Jul 2020 18:48:34 +0300 Igor Russkikh wrote:
> +int aq_nic_fill_stats_data(struct aq_ring_stats_rx_s *stats_rx,
> + struct aq_ring_stats_tx_s *stats_tx,
> + u64 *data,
> + unsigned int *p_count)
> +{
> + unsigned int count = 0U;
> + /* This data should mimic aq_ethtool_queue_stat_names structure
> + */
> + data[count] += stats_rx->packets;
> + data[++count] += stats_tx->packets;
> + data[++count] += stats_tx->queue_restarts;
> + data[++count] += stats_rx->jumbo_packets;
> + data[++count] += stats_rx->lro_packets;
> + data[++count] += stats_rx->errors;
> + data[++count] += stats_rx->alloc_fails;
> + data[++count] += stats_rx->skb_alloc_fails;
> + data[++count] += stats_rx->polls;
> +
> + if (p_count)
> + *p_count = ++count;
> +
> + return 0;
> +}
I don't see this function being taken care of in the following patch
introducing the u64_stats_update_* use.
For review it'd be easier to get the existing problems fixed first.
Also since this function always returns 0 please make it void.
Powered by blists - more mailing lists