]> www.infradead.org Git - users/jedix/linux-maple.git/commit
l2tp: Handle eth stats using NETDEV_PCPU_STAT_DSTATS.
authorJames Chapman <jchapman@katalix.com>
Mon, 9 Dec 2024 11:46:07 +0000 (11:46 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Dec 2024 13:57:26 +0000 (13:57 +0000)
commitc0b8980e6041afa363361e41fcafd7862721c3ee
tree76542094c43a810a4cf43c6f174317578c95861b
parent54d3970548bd9de40f921c95f8c31e1b1b2382cb
l2tp: Handle eth stats using NETDEV_PCPU_STAT_DSTATS.

l2tp_eth uses the TSTATS infrastructure (dev_sw_netstats_*()) for RX
and TX packet counters and DEV_STATS_INC for dropped counters.

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().

This change is inspired by the introduction of DSTATS helpers and
their use in other udp tunnel drivers:
Link: https://lore.kernel.org/all/cover.1733313925.git.gnault@redhat.com/
Signed-off-by: James Chapman <jchapman@katalix.com>
Reviewed-by: Guillaume Nault <gnault@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/l2tp/l2tp_eth.c