Re: [PATCH] neighbor: tracing: Have neigh_create event use __string()

From: David Ahern
Date: Tue Jul 05 2022 - 21:44:03 EST


On 7/5/22 4:37 PM, Steven Rostedt wrote:
> From: "Steven Rostedt (Google)" <rostedt@xxxxxxxxxxx>
>
> The dev field of the neigh_create event uses __dynamic_array() with a
> fixed size, which defeats the purpose of __dynamic_array(). Looking at the
> logic, as it already uses __assign_str(), just use the same logic in
> __string to create the size needed. It appears that because "dev" can be
> NULL, it needs the check. But __string() can have the same checks as
> __assign_str() so use them there too.
>
> Cc: David Ahern <dsahern@xxxxxxxxx>
> Cc: David S. Miller <davem@xxxxxxxxxxxxx>
> Cc: netdev@xxxxxxxxxxxxxxx
> Signed-off-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx>
> ---
>
> [ This is simpler logic than the fib* events, so I figured just
> convert to __string() instead of a static __array() ]
>

agreed.

Reviewed-by: David Ahern <dsahern@xxxxxxxxxx>