Netdev List
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>,
	LKML <linux-kernel@vger.kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [PATCH] tracing/ipv4/ipv6: Give size to name field in fib*_lookup_table event
Date: Sun, 3 Jul 2022 13:03:20 -0600	[thread overview]
Message-ID: <5f25dd4a-7394-cf97-4fc8-c43f0c449fc7@gmail.com> (raw)
In-Reply-To: <20220703102359.30f12e39@rorschach.local.home>

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.


  reply	other threads:[~2022-07-03 19:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-03 14:23 [PATCH] tracing/ipv4/ipv6: Give size to name field in fib*_lookup_table event Steven Rostedt
2022-07-03 19:03 ` David Ahern [this message]
2022-07-03 23:16   ` Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5f25dd4a-7394-cf97-4fc8-c43f0c449fc7@gmail.com \
    --to=dsahern@gmail.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox