From: Jakub Kicinski <kuba@kernel.org>
To: Simon Horman <horms@kernel.org>
Cc: Mark Bloch <mbloch@nvidia.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Sabrina Dubroca <sd@queasysnail.net>,
Kuniyuki Iwashima <kuniyu@amazon.com>,
Leon Romanovsky <leon@kernel.org>,
David Ahern <dsahern@kernel.org>,
netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
Mark Zhang <markzhang@nvidia.com>,
Maher Sanalla <msanalla@nvidia.com>
Subject: Re: [PATCH net] rtnetlink: Allocate vfinfo size for VF GUIDs when supported
Date: Mon, 24 Mar 2025 10:01:03 -0700 [thread overview]
Message-ID: <20250324100103.73324cc0@kernel.org> (raw)
In-Reply-To: <20250320151150.GC889584@horms.kernel.org>
On Thu, 20 Mar 2025 15:11:50 +0000 Simon Horman wrote:
> Perhaps I'm over thinking things here,
> perhaps the following is easier on the eyes?
>
> diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
> index d1e559fce918..60fac848e092 100644
> --- a/net/core/rtnetlink.c
> +++ b/net/core/rtnetlink.c
> @@ -1151,6 +1151,9 @@ static inline int rtnl_vfinfo_size(const struct net_device *dev,
> nla_total_size(sizeof(struct ifla_vf_link_state)) +
> nla_total_size(sizeof(struct ifla_vf_rss_query_en)) +
> nla_total_size(sizeof(struct ifla_vf_trust)));
> + if (dev->netdev_ops->ndo_get_vf_guid)
> + size += num_vfs * 2 *
> + nla_total_size(sizeof(struct ifla_vf_guid));
> if (~ext_filter_mask & RTEXT_FILTER_SKIP_STATS) {
> size += num_vfs *
> (nla_total_size(0) + /* nest IFLA_VF_STATS */
Yes, please
--
pw-bot: cr
next prev parent reply other threads:[~2025-03-24 17:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-17 10:24 [PATCH net] rtnetlink: Allocate vfinfo size for VF GUIDs when supported Mark Bloch
2025-03-20 15:11 ` Simon Horman
2025-03-24 17:01 ` Jakub Kicinski [this message]
2025-03-20 15:22 ` Sabrina Dubroca
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=20250324100103.73324cc0@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuniyu@amazon.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=markzhang@nvidia.com \
--cc=mbloch@nvidia.com \
--cc=msanalla@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sd@queasysnail.net \
/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).