]> git.ipfire.org Git - thirdparty/linux.git/commit
vxlan: Handle stats using NETDEV_PCPU_STAT_DSTATS.
authorGuillaume Nault <gnault@redhat.com>
Wed, 4 Dec 2024 12:11:27 +0000 (13:11 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 7 Dec 2024 01:56:52 +0000 (17:56 -0800)
commitbe226352e8dc77d3313c096b2d8e7f69bf6980fc
tree0a57e95d209d519885264f6e19dba82195500dda
parent18eabadd73ae60023ab05e376246bd725fb0c113
vxlan: Handle stats using NETDEV_PCPU_STAT_DSTATS.

VXLAN uses the TSTATS infrastructure (dev_sw_netstats_*()) for RX and
TX packet counters. It also uses the device core stats
(dev_core_stats_*()) for RX and TX drops.

Let's consolidate that using the DSTATS infrastructure, which can
handle both packet counters and packet drops. Statistics that don't
fit DSTATS are still updated atomically with DEV_STATS_INC().

While there, convert the "len" variable of vxlan_encap_bypass() to
unsigned int, to respect the types of skb->len and
dev_dstats_[rt]x_add().

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