Messages in this thread | | | Date | Sun, 3 Jul 2022 13:03:20 -0600 | Subject | Re: [PATCH] tracing/ipv4/ipv6: Give size to name field in fib*_lookup_table event | From | David Ahern <> |
| |
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.
| |