Re: [PATCH] tcp: tcp_drop adds `SNMP` and `reason` parameter for tracing

From: Steven Rostedt
Date: Mon Sep 20 2021 - 14:29:05 EST


On Mon, 20 Sep 2021 10:20:33 -0700
Cong Wang <xiyou.wangcong@xxxxxxxxx> wrote:

> > The strings were requested by the networking maintainers.
> >
> > https://lore.kernel.org/all/CANn89iJO8jzjFWvJ610TPmKDE8WKi8ojTr_HWXLz5g=4pdQHEA@xxxxxxxxxxxxxx/
>
> I think you misunderstand my point. Eric's point is hex address
> vs. string, which I never disagree. With SNMP enum, user-space
> can easily interpret it to string too, so at the end you still get strings
> but not from kernel. This would at least save a handful of strings
> from vmlinux, especially if we expand it beyond TCP.

If an enum is saved in the ring buffer, it is also trivial to have it
show a string in the buffer, as there's a way to map enums to strings
on output as well. Which I discussed in that same thread.

-- Steve