aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_api.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2017-08-09 20:41:47 +0200
committerDavid S. Miller <davem@davemloft.net>2017-08-09 16:57:38 -0700
commite1fa6d216dd134c7fca6dc5f0a10553c36503901 (patch)
tree2390605851edaa46f8ce370e2bd8dbcd05fca5cb /net/sched/sch_api.c
parentMerge branch 'bpf-new-branches' (diff)
downloadlinux-dev-e1fa6d216dd134c7fca6dc5f0a10553c36503901.tar.xz
linux-dev-e1fa6d216dd134c7fca6dc5f0a10553c36503901.zip
rtnetlink: call rtnl_calcit directly
There is only a single place in the kernel that regisers the "calcit" callback (to determine min allocation for dumps). This is in rtnetlink.c for PF_UNSPEC RTM_GETLINK. The function that checks for calcit presence at run time will first check the requested family (which will always fail for !PF_UNSPEC as no callsite registers this), then falls back to checking PF_UNSPEC. Therefore we can just check if type is RTM_GETLINK and then do a direct call. Because of fallback to PF_UNSPEC all RTM_GETLINK types used this regardless of family. This has the advantage that we don't need to allocate space for the function pointer for all the other families. A followup patch will drop the calcit function pointer from the rtnl_link callback structure. Signed-off-by: Florian Westphal <fw@strlen.de> Reviewed-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions