]> git.baikalelectronics.ru Git - kernel.git/commit
rtnl: don't account unused struct ifla_port_vsi in rtnl_port_size
authorDaniel Borkmann <daniel@iogearbox.net>
Fri, 17 Feb 2017 00:56:11 +0000 (01:56 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Feb 2017 19:56:11 +0000 (14:56 -0500)
commit3ed8de6c135c0a924bb7ab380a0c9916003b10c5
tree30471bb6e7f42f3ffe8ce21af74ee3ea80aab88e
parent80473dafc3baeb9e9d77aeeb4cb42545f23a551d
rtnl: don't account unused struct ifla_port_vsi in rtnl_port_size

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 217b0bb9385a ("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 <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/rtnetlink.c