Subject: Re: [PATCH] net/netlink: how to deal with the problem of exceeding the maximum reach of nlattr's nla_len

From: Jakub Kicinski <[email-masked]>
Date: Thu, 21 Mar 2024 07:30:45 -0700

On Thu, 21 Mar 2024 22:14:00 +0800 renmingshuai wrote:
> RTM_GETLINK for greater than about 220 VFs truncates IFLA_VFINFO_LIST
> due to the maximum reach of nlattr's nla_len being exceeded. As a result,
> the value of nla_len overflows in nla_nest_end(). According to [1],
> changing the type of nla_len is not possible, but how can we deal with this
> overflow problem? The nla_len is constantly set to the
> maximum value when it overflows? Or some better ways?

It's a known limitation of the legacy SRIOV VF API.
Use switchdev mode instead, please.