summaryrefslogtreecommitdiffstats
path: root/include/net/ip.h
diff options
context:
space:
mode:
authorDavid Ahern <dsahern@gmail.com>2018-10-04 20:07:51 -0700
committerDavid S. Miller <davem@davemloft.net>2018-10-04 21:54:03 -0700
commit767a2217533fed696af0d06bee7746d34c4e00aa (patch)
tree345d862ce8fe8019b15deb0c591dc7760b3d554c /include/net/ip.h
parentd26d4b194e582c6f2070cc5f7f74a72124ad41ef (diff)
downloadblackbird-obmc-linux-767a2217533fed696af0d06bee7746d34c4e00aa.tar.gz
blackbird-obmc-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.h4
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);
OpenPOWER on IntegriCloud