]> git.baikalelectronics.ru Git - kernel.git/commit
net: Initial nexthop code
authorDavid Ahern <dsahern@gmail.com>
Fri, 24 May 2019 21:43:04 +0000 (14:43 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 29 May 2019 04:37:30 +0000 (21:37 -0700)
commit8872cb69c8f0a136dd32e14a4f58ed6bdd344a09
tree4b8c97ce0f45d4f0a0a85b8c27dee1e363b7f4c9
parent58400978aa7bd9588b36a9a0a4c22b584700a7f3
net: Initial nexthop code

Barebones start point for nexthops. Implementation for RTM commands,
notifications, management of rbtree for holding nexthops by id, and
kernel side data structures for nexthops and nexthop config.

Nexthops are maintained in an rbtree sorted by id. Similar to routes,
nexthops are configured per namespace using netns_nexthop struct added
to struct net.

Nexthop notifications are sent when a nexthop is added or deleted,
but NOT if the delete is due to a device event or network namespace
teardown (which also involves device events). Applications are
expected to use the device down event to flush nexthops and any
routes used by the nexthops.

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