rtnetlink: RTEXT_FILTER_SKIP_STATS support to avoid dumping inet/inet6 stats
authorSowmini Varadhan <sowmini.varadhan@oracle.com>
Fri, 11 Sep 2015 20:48:48 +0000 (16:48 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 15 Sep 2015 22:25:02 +0000 (15:25 -0700)
commitd5566fd72ec1924958fcfd48b65c022c8f7eae64
treefb7c5e29238657e89d33320091d8b8ae3d5f78e9
parentad1e7b97b3adb91d46f3adb70a7867a50fc274cf
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>
include/net/rtnetlink.h
include/uapi/linux/rtnetlink.h
net/core/rtnetlink.c
net/ipv4/devinet.c
net/ipv6/addrconf.c