On 02/17/2017 08:57 PM, David Miller wrote:
From: Daniel Borkmann <dan...@iogearbox.net>
Date: Fri, 17 Feb 2017 01:56:11 +0100
When allocating rtnl dump messages, struct ifla_port_vsi is never dumped,
so we can save header plus payload in rtnl_port_size(). Infact, attribute
IFLA_PORT_VSI_TYPE and struct ifla_port_vsi are not used anywhere in
the kernel. We only need to keep the nla policy should applications in
user space be filling this out. Same NLA_BINARY issue exists as was fixed
in 364d5716a7ad ("rtnetlink: ifla_vf_policy: fix misuses of NLA_BINARY")
and others, but then again IFLA_PORT_VSI_TYPE is not used anywhere, so
just add a comment that it's unused.
Signed-off-by: Daniel Borkmann <dan...@iogearbox.net>
---
( Found while reviewing NLA_BINARY longer time ago. )
Applied, but whether or not this is emitted it controlled by how a driver
implements ->ndo_get_vf_port().
Therefore, in the future some driver could fill this in.
Agree, in that case, it can be undone; when I checked, this part
was added 7 years ago via 57b610805ce9 ("net: Add netlink support
for virtual port management (was iovnl)") and never had a single
user since then.