[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211008163851.3963b94e@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Fri, 8 Oct 2021 16:38:51 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
Jamal Hadi Salim <jhs@...atatu.com>,
Cong Wang <xiyou.wangcong@...il.com>,
Jiri Pirko <jiri@...nulli.us>,
Thomas Gleixner <tglx@...utronix.de>,
"Ahmed S. Darwish" <a.darwish@...utronix.de>
Subject: Re: [PATCH net-next 3/4] gen_stats: Add instead Set the value in
__gnet_stats_copy_queue().
On Thu, 7 Oct 2021 19:49:59 +0200 Sebastian Andrzej Siewior wrote:
> --- a/net/core/gen_stats.c
> +++ b/net/core/gen_stats.c
> @@ -312,14 +312,14 @@ void __gnet_stats_copy_queue(struct gnet_stats_queue *qstats,
> if (cpu) {
> __gnet_stats_copy_queue_cpu(qstats, cpu);
> } else {
> - qstats->qlen = q->qlen;
> - qstats->backlog = q->backlog;
> - qstats->drops = q->drops;
> - qstats->requeues = q->requeues;
> - qstats->overlimits = q->overlimits;
> + qstats->qlen += q->qlen;
> + qstats->backlog += q->backlog;
> + qstats->drops += q->drops;
> + qstats->requeues += q->requeues;
> + qstats->overlimits += q->overlimits;
> }
>
> - qstats->qlen = qlen;
> + qstats->qlen += qlen;
Looks like qlen is going to be added twice for the non-per-cpu case?
Powered by blists - more mailing lists