]> git.baikalelectronics.ru Git - kernel.git/commit
net: Move fib_convert_metrics to metrics file
authorDavid Ahern <dsahern@gmail.com>
Wed, 18 Apr 2018 00:33:07 +0000 (17:33 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Apr 2018 03:41:15 +0000 (23:41 -0400)
commit01a290103c10bbb88f5be115ee9ac99a0bcfba0b
treec07aebe1fb80d8cc52d93efe877e7db7ca5fe13c
parent3b1615c470bb48caa52037eb977cf94ef0602956
net: Move fib_convert_metrics to metrics file

Move logic of fib_convert_metrics into ip_metrics_convert. This allows
the code that converts netlink attributes into metrics struct to be
re-used in a later patch by IPv6.

This is mostly a code move with the following changes to variable names:
  - fi->fib_net becomes net
  - fc_mx and fc_mx_len are passed as inputs pulled from fib_config
  - metrics array is passed as an input from fi->fib_metrics->metrics

Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ip.h
net/ipv4/Makefile
net/ipv4/fib_semantics.c
net/ipv4/metrics.c [new file with mode: 0644]