]> www.infradead.org Git - users/jedix/linux-maple.git/commit
vrf: Make pcpu_dstats update functions available to other modules.
authorGuillaume Nault <gnault@redhat.com>
Wed, 4 Dec 2024 12:11:21 +0000 (13:11 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 7 Dec 2024 01:56:52 +0000 (17:56 -0800)
commit18eabadd73ae60023ab05e376246bd725fb0c113
tree36539121e06fe9543711bbd6f4171ced6c4f9828
parent9ec780b26985f5eea807a899bec2d20e463c990e
vrf: Make pcpu_dstats update functions available to other modules.

Currently vrf is the only module that uses NETDEV_PCPU_STAT_DSTATS.
In order to make this kind of statistics available to other modules,
we need to define the update functions in netdevice.h.

Therefore, let's define dev_dstats_*() functions for RX and TX packet
updates (packets, bytes and drops). Use these new functions in vrf.c
instead of vrf_rx_stats() and the other manual counter updates.

While there, update the type of the "len" variables to "unsigned int",
so that there're aligned with both skb->len and the new dstats update
functions.

Signed-off-by: Guillaume Nault <gnault@redhat.com>
Link: https://patch.msgid.link/d7a552ee382c79f4854e7fcc224cf176cd21150d.1733313925.git.gnault@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/vrf.c
include/linux/netdevice.h