Re: [PATCH] tcp: tcp_drop adds `SNMP` and `reason` parameter for tracing
From: Zhongya Yan <hidden>
Date: 2021-09-23 05:31:41
Also in:
lkml
From: Zhongya Yan <hidden>
Date: 2021-09-23 05:31:41
Also in:
lkml
On Wed, 22 Sep 2021 23:08:15 -0400 Cong Wang [off-list ref] wrote:
I think you fail to explain why only TCP needs it?
Thanks for the suggestion, I will rewrite the description document.
This should be useful for all kinds of drops, not just TCP, therefore you should consider extending net/core/drop_monitor.c instead of just tcp_drop().
Currently, I'll look at the code in `net/core/drop_monitor.c` later because it only extends tcp.
Also, kernel does not have to explain it in strings, those SNMP counters are already available for user-space, so kernel could just use SNMP enums and let user-space interpret them. In many cases, you are just adding strings for those SNMP enums. Thanks.
Since these drops are hardly hot path, why not simply use a string ? An ENUM will not really help grep games. --Eric Dumazet I think `Eric`s point is correct, so strings are used. SNMP is auxiliary, I can remove it if you find it unfriendly