Messages in this thread | | | From | Cong Wang <> | Date | Sat, 4 Sep 2021 12:04:04 -0700 | Subject | Re: [PATCH] net: tcp_drop adds `reason` and SNMP parameters for tracing v4 |
| |
On Fri, Sep 3, 2021 at 11:43 PM Zhongya Yan <yan2228598786@gmail.com> wrote: > > I used the suggestion from `Brendan Gregg`. In addition to the > `reason` parameter there is also the `field` parameter pointing > to `SNMP` to distinguish the `tcp_drop` cause. I know what I > submitted is not accurate, so I am submitting the current > patch to get comments and criticism from everyone so that I > can submit better code and solutions.And of course to make me > more familiar and understand the `linux` kernel network code.
Any reason why only limit this to TCP? I am pretty sure we are interested in packet drops across the entire stack.
You can take a look at net/core/drop_monitor.c, it actually has a big advantage over your solution, which is sending entire dropped packets to user-space for inspection.
If you can have a solution for all packet drops, not just TCP, it would make your patch much more useful. Therefore, I'd suggest you to consider extending the drop monitor.
Thanks.
| |