lkml.org 
[lkml]   [2022]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] tracing/ipv4/ipv6: Give size to name field in fib*_lookup_table event
From
On 7/3/22 8:23 AM, Steven Rostedt wrote:
> From: "Steven Rostedt (Google)" <rostedt@goodmis.org>
>
> The fib_lookup_table and fib6_lookup_table events declare name as a
> dynamic_array, but also give it a fixed size, which defeats the purpose of
> the dynamic array, especially since the dynamic array also includes meta
> data in the event to specify its size.
>
> Considering that the intent was to only reserve the size needed for the
> name and not a fixed size, convert the size part of the __dynamic_array()
> field to contain the necessary code to determine the size needed to save
> the name.
>
> Alternatively, if the intent was to use a fixed size, then it should be
> converted into __array() of type char, which will remove the meta data in
> the event that stores the size.

I would prefer this option over duplicating the all of the checks to
save 14B.

\
 
 \ /
  Last update: 2022-07-03 21:04    [W:0.042 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site