rtnetlink: RTEXT_FILTER_SKIP_STATS support to avoid dumping inet/inet6 stats

Many commonly used functions like getifaddrs() invoke RTM_GETLINK
to dump the interface information, and do not need the
the AF_INET6 statististics that are always returned by default
from rtnl_fill_ifinfo().

Computing the statistics can be an expensive operation that impacts
scaling, so it is desirable to avoid this if the information is
not needed.

This patch adds a the RTEXT_FILTER_SKIP_STATS extended info flag that
can be passed with netlink_request() to avoid statistics computation
for the ifinfo path.

Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Sowmini Varadhan
2015-09-11 16:48:48 -04:00
committed by David S. Miller
parent ad1e7b97b3
commit d5566fd72e
5 changed files with 15 additions and 7 deletions

View File

@@ -122,7 +122,8 @@ struct rtnl_af_ops {
int family;
int (*fill_link_af)(struct sk_buff *skb,
const struct net_device *dev);
const struct net_device *dev,
u32 ext_filter_mask);
size_t (*get_link_af_size)(const struct net_device *dev);
int (*validate_link_af)(const struct net_device *dev,