mbox series

[net-next,v2,0/1] support more VFs in RTM_GETLINK

Message ID 20210126174024.185001-1-edwin.peer@broadcom.com (mailing list archive)
Headers show
Series support more VFs in RTM_GETLINK | expand

Message

Edwin Peer Jan. 26, 2021, 5:40 p.m. UTC
RTM_GETLINK for greater than about 220 VFs truncates IFLA_VFINFO_LIST
due to the maximum reach of nlattr's nla_len being exceeded. There is
not a lot of enthusiasm for extensive fixes to the deprecated netlink
ABI for VF config, but there appears to be even less appetite for the
kinds of work arounds that would be necessitated in order to truly
keep it frozen [1].

Any kind of fix for this at the RTM_GETLINK VF API layer is also a no
go [2]. For now, lets fix the bits that are uncontroversial so that a
naked 'ip link show' (without stats) works.

v2: Drop the pieces that require further discussion.

[1] https://lore.kernel.org/netdev/20210115225950.18762-1-edwin.peer@broadcom.com/
[2] https://marc.info/?l=linux-netdev&m=161163943811663 (missing on lore)

Edwin Peer (1):
  rtnetlink: extend RTEXT_FILTER_SKIP_STATS to IFLA_VF_INFO

 net/core/rtnetlink.c | 96 +++++++++++++++++++++++---------------------
 1 file changed, 51 insertions(+), 45 deletions(-)

Comments

Jakub Kicinski Jan. 26, 2021, 8:36 p.m. UTC | #1
On Tue, 26 Jan 2021 09:40:24 -0800 Edwin Peer wrote:
> This filter already exists for excluding IPv6 SNMP stats. Extend its
> definition to also exclude IFLA_VF_INFO stats in RTM_GETLINK.
> 
> This patch constitutes a partial fix for a netlink attribute nesting
> overflow bug in IFLA_VFINFO_LIST. By excluding the stats when the
> requester doesn't need them, the truncation of the VF list is avoided.
> 
> While it was technically only the stats added in commit c5a9f6f0ab40
> ("net/core: Add drop counters to VF statistics") breaking the camel's
> back, the appreciable size of the stats data should never have been
> included without due consideration for the maximum number of VFs
> supported by PCI.
> 
> Fixes: 3b766cd83232 ("net/core: Add reading VF statistics through the PF netdevice")
> Fixes: c5a9f6f0ab40 ("net/core: Add drop counters to VF statistics")
> Signed-off-by: Edwin Peer <edwin.peer@broadcom.com>

You don't seem to have addressed or as little as responded to all 
the feedback on v1.
Edwin Peer Jan. 26, 2021, 10:42 p.m. UTC | #2
On Tue, Jan 26, 2021 at 12:36 PM Jakub Kicinski <kuba@kernel.org> wrote:

> > Fixes: 3b766cd83232 ("net/core: Add reading VF statistics through the PF netdevice")
> > Fixes: c5a9f6f0ab40 ("net/core: Add drop counters to VF statistics")
> > Signed-off-by: Edwin Peer <edwin.peer@broadcom.com>
>
> You don't seem to have addressed or as little as responded to all
> the feedback on v1.

I did respond in both active threads and didn't realize further
response was necessary. Posting the updated series was conceding that
the dropped parts are a dead end.

Regards,
Edwin Peer