[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1542f5746c3b03a735f407d789cf28dd71b02500.camel@redhat.com>
Date: Thu, 10 Mar 2022 19:26:57 +0100
From: Paolo Abeni <pabeni@...hat.com>
To: Eric Dumazet <eric.dumazet@...il.com>,
"David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>
Cc: netdev <netdev@...r.kernel.org>,
Eric Dumazet <edumazet@...gle.com>,
jeffreyji <jeffreyji@...gle.com>,
Brian Vazquez <brianvv@...gle.com>
Subject: Re: [PATCH v3 net-next] net: add per-cpu storage and net->core_stats
On Thu, 2022-03-10 at 08:52 -0800, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@...gle.com>
>
> Before adding yet another possibly contended atomic_long_t,
> it is time to add per-cpu storage for existing ones:
> dev->tx_dropped, dev->rx_dropped, and dev->rx_nohandler
>
> Because many devices do not have to increment such counters,
> allocate the per-cpu storage on demand, so that dev_get_stats()
> does not have to spend considerable time folding zero counters.
>
> Note that some drivers have abused these counters which
> were supposed to be only used by core networking stack.
>
> v3: added a READ_ONCE() in netdev_core_stats_alloc() (Paolo)
>
> v2: add a missing include (reported by kernel test robot <lkp@...el.com>)
> Change in netdev_core_stats_alloc() (Jakub)
>
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Cc: jeffreyji <jeffreyji@...gle.com>
> Reviewed-by: Brian Vazquez <brianvv@...gle.com>
> Reviewed-by: Jakub Kicinski <kuba@...nel.org>
> Cc: Paolo Abeni <pabeni@...hat.com>
Thanks for quick turnaround, LGTM!
Acked-by: Paolo Abeni <pabeni@...hat.com>
Powered by blists - more mailing lists