History

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.

Sowmini Varadhan committed 11 years ago

Commit d5566fd1 parent ad1e7b95 files · +15 −7Browse files

Showing the changes to include/uapi (1 of 5 files). Show all

Unified · Split

include/uapi/linux/rtnetlink.h+1−0
@@ -667,6 +667,7 @@ struct tcamsg { · 666 unmodified lines
667667 #define RTEXT_FILTER_VF (1 << 0)
668668 #define RTEXT_FILTER_BRVLAN (1 << 1)
669669 #define RTEXT_FILTER_BRVLAN_COMPRESSED (1 << 2)
670+#define RTEXT_FILTER_SKIP_STATS (1 << 3)
670671
671672 /* End of information exported to user level */
672673

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t