diff options
author | Daniel Borkmann <daniel@iogearbox.net> | 2023-11-14 01:42:15 +0100 |
---|---|---|
committer | Martin KaFai Lau <martin.lau@kernel.org> | 2023-11-20 10:15:16 -0800 |
commit | ae1658272c6491a31ac968e39882fc569f312ac3 (patch) | |
tree | 79446cca704b3edd06f141fb0b49ad681ef85125 /drivers/net/veth.c | |
parent | 34d21de99cea9cb17967874313e5b0262527833c (diff) |
netkit: Add tstats per-CPU traffic counters
Add dev->tstats traffic accounting to netkit. The latter contains per-CPU
RX and TX counters.
The dev's TX counters are bumped upon pass/unspec as well as redirect
verdicts, in other words, on everything except for drops.
The dev's RX counters are bumped upon successful __netif_rx(), as well
as from skb_do_redirect() (not part of this commit here).
Using dev->lstats with having just a single packets/bytes counter and
inferring one another's RX counters from the peer dev's lstats is not
possible given skb_do_redirect() can also bump the device's stats.
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
Link: https://lore.kernel.org/r/20231114004220.6495-4-daniel@iogearbox.net
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Diffstat (limited to 'drivers/net/veth.c')
0 files changed, 0 insertions, 0 deletions