diff options
author | David Ahern <dsahern@gmail.com> | 2018-10-05 05:07:51 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-10-05 06:54:03 +0200 |
commit | 767a2217533fed696af0d06bee7746d34c4e00aa (patch) | |
tree | 345d862ce8fe8019b15deb0c591dc7760b3d554c /include/net/ip.h | |
parent | net: sched: remove unused helpers (diff) | |
download | linux-767a2217533fed696af0d06bee7746d34c4e00aa.tar.xz linux-767a2217533fed696af0d06bee7746d34c4e00aa.zip |
net: common metrics init helper for FIB entries
Consolidate initialization of ipv4 and ipv6 metrics when fib entries
are created into a single helper, ip_fib_metrics_init, that handles
the call to ip_metrics_convert.
If no metrics are defined for the fib entry, then the metrics is set
to dst_default_metrics.
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/ip.h')
-rw-r--r-- | include/net/ip.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/ip.h b/include/net/ip.h index e44b1a44f67a..8cbe7e8c9e1e 100644 --- a/include/net/ip.h +++ b/include/net/ip.h @@ -420,8 +420,8 @@ static inline unsigned int ip_skb_dst_mtu(struct sock *sk, return min(READ_ONCE(skb_dst(skb)->dev->mtu), IP_MAX_MTU); } -int ip_metrics_convert(struct net *net, struct nlattr *fc_mx, int fc_mx_len, - u32 *metrics); +struct dst_metrics *ip_fib_metrics_init(struct net *net, struct nlattr *fc_mx, + int fc_mx_len); u32 ip_idents_reserve(u32 hash, int segs); void __ip_select_ident(struct net *net, struct iphdr *iph, int segs); |