diff options
| author | Florian Westphal <[email protected]> | 2017-08-09 20:41:47 +0200 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2017-08-09 16:57:38 -0700 |
| commit | e1fa6d216dd134c7fca6dc5f0a10553c36503901 (patch) | |
| tree | 2390605851edaa46f8ce370e2bd8dbcd05fca5cb /tools/perf/scripts/python | |
| parent | 078295fb9af507abce4976c6e9ff56a67da4e9a0 (diff) | |
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 <[email protected]>
Reviewed-by: Hannes Frederic Sowa <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions