OSDN Git Service

tcp: add tracepoint for checksum errors
authorJakub Kicinski <kuba@kernel.org>
Fri, 14 May 2021 20:04:25 +0000 (13:04 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 14 May 2021 22:26:03 +0000 (15:26 -0700)
commit709c0314239992162cba26a860f04319a15860c4
tree0a773304deb90df6e99174cff10593912f151830
parent7466b60a3c32a8ad8033b06089e5aae5e8260e86
tcp: add tracepoint for checksum errors

Add a tracepoint for capturing TCP segments with
a bad checksum. This makes it easy to identify
sources of bad frames in the fleet (e.g. machines
with faulty NICs).

It should also help tools like IOvisor's tcpdrop.py
which are used today to get detailed information
about such packets.

We don't have a socket in many cases so we must
open code the address extraction based just on
the skb.

v2: add missing export for ipv6=m

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/trace/events/tcp.h
net/core/net-traces.c
net/ipv4/tcp_input.c
net/ipv4/tcp_ipv4.c
net/ipv6/tcp_ipv6.c