lkml.org 
[lkml]   [2021]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] tcp: tcp_drop adds `SNMP` and `reason` parameter for tracing
On Wed, 22 Sep 2021 23:08:15 -0400

Cong Wang <xiyou.wangcong@gmail.com> 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

\
 
 \ /
  Last update: 2021-09-23 07:32    [W:0.029 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site