Thread (3 messages) flat view 3 messages, 2 authors, 2017-02-17

Re: [PATCH net-next] rtnl: don't account unused struct ifla_port_vsi in rtnl_port_size

From: David Miller <davem@davemloft.net>
Date: 2017-02-17 19:57:54

From: Daniel Borkmann <daniel@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 <daniel@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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help