diff options
author | Jakub Kicinski <kuba@kernel.org> | 2024-05-29 09:25:27 -0700 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2024-06-04 10:39:31 +0200 |
commit | 4fdb6b6063f07d959a1c52a2ee580afc4da34e2d (patch) | |
tree | 872687d13b2f82fc57bd96f9af261758b568a6ee /net/ipv4/tcp_ipv4.c | |
parent | 8c1d92a740c002f36a919a55689d0ef83b61fd1c (diff) | |
download | linux-4fdb6b6063f07d959a1c52a2ee580afc4da34e2d.tar.gz linux-4fdb6b6063f07d959a1c52a2ee580afc4da34e2d.tar.bz2 linux-4fdb6b6063f07d959a1c52a2ee580afc4da34e2d.zip |
net: count drops due to missing qdisc as dev->tx_drops
Catching and debugging missing qdiscs is pretty tricky. When qdisc
is deleted we replace it with a noop qdisc, which silently drops
all the packets. Since the noop qdisc has a single static instance
we can't count drops at the qdisc level. Count them as dev->tx_drops.
ip netns add red
ip link add type veth peer netns red
ip link set dev veth0 up
ip -netns red link set dev veth0 up
ip a a dev veth0 10.0.0.1/24
ip -netns red a a dev veth0 10.0.0.2/24
ping -c 2 10.0.0.2
# 2 packets transmitted, 2 received, 0% packet loss, time 1031ms
ip -s link show dev veth0
# TX: bytes packets errors dropped carrier collsns
# 1314 17 0 0 0 0
tc qdisc replace dev veth0 root handle 1234: mq
tc qdisc replace dev veth0 parent 1234:1 pfifo
tc qdisc del dev veth0 parent 1234:1
ping -c 2 10.0.0.2
# 2 packets transmitted, 0 received, 100% packet loss, time 1034ms
ip -s link show dev veth0
# TX: bytes packets errors dropped carrier collsns
# 1314 17 0 3 0 0
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Link: https://lore.kernel.org/r/20240529162527.3688979-1-kuba@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
0 files changed, 0 insertions, 0 deletions