* [PATCH] net/netlink: how to deal with the problem of exceeding the maximum reach of nlattr's nla_len
@ 2024-03-21 14:14 renmingshuai
2024-03-21 14:30 ` Jakub Kicinski
0 siblings, 1 reply; 2+ messages in thread
From: renmingshuai @ 2024-03-21 14:14 UTC (permalink / raw)
To: davem, edumazet, kuba, pabeni, idosch, netdev
Cc: renmingshuai, yanan, chenzhen126, liaichun
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?
[1] https://lore.kernel.org/netdev/20210123045321.2797360-1-edwin.peer@broadcom.com/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] net/netlink: how to deal with the problem of exceeding the maximum reach of nlattr's nla_len
2024-03-21 14:14 [PATCH] net/netlink: how to deal with the problem of exceeding the maximum reach of nlattr's nla_len renmingshuai
@ 2024-03-21 14:30 ` Jakub Kicinski
0 siblings, 0 replies; 2+ messages in thread
From: Jakub Kicinski @ 2024-03-21 14:30 UTC (permalink / raw)
To: renmingshuai
Cc: davem, edumazet, pabeni, idosch, netdev, yanan, chenzhen126,
liaichun
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-03-21 14:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-21 14:14 [PATCH] net/netlink: how to deal with the problem of exceeding the maximum reach of nlattr's nla_len renmingshuai
2024-03-21 14:30 ` Jakub Kicinski
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).