geneve: Handle stats using NETDEV_PCPU_STAT_DSTATS.
authorGuillaume Nault <gnault@redhat.com>
Wed, 4 Dec 2024 12:11:30 +0000 (13:11 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 7 Dec 2024 01:56:52 +0000 (17:56 -0800)
commit6fa6de30224619f836f4cb1209b5af3f5319806e
tree16dccb15cd39c078ce49247cbc96a9a123684e2d
parentbe226352e8dc77d3313c096b2d8e7f69bf6980fc
geneve: Handle stats using NETDEV_PCPU_STAT_DSTATS.

Geneve uses the TSTATS infrastructure (dev_sw_netstats_*()) for RX
packet counters. All other counters are handled using atomic increments
with DEV_STATS_INC().

Let's convert packet stats handling to DSTATS, which has a per-cpu
counter for packet drops too, to avoid the cost of atomic increments
in these cases. Statistics that don't fit DSTATS are still updated
atomically with DEV_STATS_INC().

Signed-off-by: Guillaume Nault <gnault@redhat.com>
Link: https://patch.msgid.link/7af5c09f3c26f0f231fbe383822ca5d1ce0278fa.1733313925.git.gnault@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/geneve.c