get_link_af_size_filtered() - a filtering-mask aware alternative
function is added to struct rtnl_af_ops in order to allow for
"rightsizing" the IFLA_AF_SPEC calculation in if_nlmsg_size().
This significantly reduces the message size when at least one netdev has
large number of VLANs.

Signed-off-by: Ronen Arad <ronen.a...@intel.com>
---
 include/net/rtnetlink.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/net/rtnetlink.h b/include/net/rtnetlink.h
index aff6ceb..96df9bb 100644
--- a/include/net/rtnetlink.h
+++ b/include/net/rtnetlink.h
@@ -130,6 +130,8 @@ struct rtnl_af_ops {
                                                    const struct nlattr *attr);
        int                     (*set_link_af)(struct net_device *dev,
                                               const struct nlattr *attr);
+       size_t                  (*get_link_af_size_filtered)(const struct 
net_device *dev,
+                                                            u32 
ext_filter_mask);
 };
 
 void __rtnl_af_unregister(struct rtnl_af_ops *ops);
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to