netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Eric Dumazet <edumazet@google.com>
Cc: "David S . Miller" <davem@davemloft.net>,
	Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, eric.dumazet@gmail.com
Subject: Re: [PATCH net-next] net: do not inline rtnl_calcit()
Date: Tue, 9 Jul 2024 18:23:06 -0700	[thread overview]
Message-ID: <20240709182306.4d57315a@kernel.org> (raw)
In-Reply-To: <20240709230815.2717872-1-edumazet@google.com>

On Tue,  9 Jul 2024 23:08:15 +0000 Eric Dumazet wrote:
> -static u32 rtnl_calcit(struct sk_buff *skb, struct nlmsghdr *nlh)
> +static noinline_for_stack u32 rtnl_calcit(struct sk_buff *skb,
> +					  struct nlmsghdr *nlh)

We only look at a single attribute - IFLA_EXT_MASK. We can change the
tb size to IFLA_EXT_MASK + 1 and pass IFLA_EXT_MASK as max_attr to
parse. Parsing the other attrs is pointless, anyway.

Or possibly just walk the attrs with nla_for_each_attr_type() without
parsing at all.

  reply	other threads:[~2024-07-10  1:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-09 23:08 [PATCH net-next] net: do not inline rtnl_calcit() Eric Dumazet
2024-07-10  1:23 ` Jakub Kicinski [this message]
2024-07-10 15:08   ` Eric Dumazet

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=20240709182306.4d57315a@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).