From: Ido Schimmel <ido...@idosch.org> Date: Sun, 7 Jul 2019 10:58:17 +0300
> Users have several ways to debug the kernel and understand why a packet > was dropped. For example, using "drop monitor" and "perf". Both > utilities trace kfree_skb(), which is the function called when a packet > is freed as part of a failure. The information provided by these tools > is invaluable when trying to understand the cause of a packet loss. > > In recent years, large portions of the kernel data path were offloaded > to capable devices. Today, it is possible to perform L2 and L3 > forwarding in hardware, as well as tunneling (IP-in-IP and VXLAN). > Different TC classifiers and actions are also offloaded to capable > devices, at both ingress and egress. > > However, when the data path is offloaded it is not possible to achieve > the same level of introspection as tools such "perf" and "drop monitor" > become irrelevant. > > This patchset aims to solve this by allowing users to monitor packets > that the underlying device decided to drop along with relevant metadata > such as the drop reason and ingress port. We are now going to have 5 or so ways to capture packets passing through the system, this is nonsense. AF_PACKET, kfree_skb drop monitor, perf, XDP perf events, and now this devlink thing. This is insanity, too many ways to do the same thing and therefore the worst possible user experience. Pick _ONE_ method to trap packets and forward normal kfree_skb events, XDP perf events, and these taps there too. I mean really, think about it from the average user's perspective. To see all drops/pkts I have to attach a kfree_skb tracepoint, and not just listen on devlink but configure a special tap thing beforehand and then if someone is using XDP I gotta setup another perf event buffer capture thing too. Sorry, this isn't where we are going.