diff options
author | Sowmini Varadhan <sowmini.varadhan@oracle.com> | 2015-09-11 22:48:48 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-09-16 00:25:02 +0200 |
commit | d5566fd72ec1924958fcfd48b65c022c8f7eae64 (patch) | |
tree | fb7c5e29238657e89d33320091d8b8ae3d5f78e9 /net/ipv4/devinet.c | |
parent | cdc: Fix build warning. (diff) | |
download | linux-d5566fd72ec1924958fcfd48b65c022c8f7eae64.tar.xz linux-d5566fd72ec1924958fcfd48b65c022c8f7eae64.zip |
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>
Diffstat (limited to 'net/ipv4/devinet.c')
-rw-r--r-- | net/ipv4/devinet.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index 2d9cb1748f81..735008472844 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c @@ -1654,7 +1654,8 @@ static size_t inet_get_link_af_size(const struct net_device *dev) return nla_total_size(IPV4_DEVCONF_MAX * 4); /* IFLA_INET_CONF */ } -static int inet_fill_link_af(struct sk_buff *skb, const struct net_device *dev) +static int inet_fill_link_af(struct sk_buff *skb, const struct net_device *dev, + u32 ext_filter_mask) { struct in_device *in_dev = rcu_dereference_rtnl(dev->ip_ptr); struct nlattr *nla; |