]> git.baikalelectronics.ru Git - kernel.git/commit
nexthop: support for fdb ecmp nexthops
authorRoopa Prabhu <roopa@cumulusnetworks.com>
Fri, 22 May 2020 05:26:13 +0000 (22:26 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 22 May 2020 21:00:38 +0000 (14:00 -0700)
commit135a256ce034eb3e34ef974bcfda368bbc87cc75
treec70a103c65172ad04f0c7fcbd2a3b3c914cc501b
parent719e2d08a50af0a38eda3e58b9b4333cbc156353
nexthop: support for fdb ecmp nexthops

This patch introduces ecmp nexthops and nexthop groups
for mac fdb entries. In subsequent patches this is used
by the vxlan driver fdb entries. The use case is
E-VPN multihoming [1,2,3] which requires bridged vxlan traffic
to be load balanced to remote switches (vteps) belonging to
the same multi-homed ethernet segment (This is analogous to
a multi-homed LAG but over vxlan).

Changes include new nexthop flag NHA_FDB for nexthops
referenced by fdb entries. These nexthops only have ip.
This patch includes appropriate checks to avoid routes
referencing such nexthops.

example:
$ip nexthop add id 12 via 172.16.1.2 fdb
$ip nexthop add id 13 via 172.16.1.3 fdb
$ip nexthop add id 102 group 12/13 fdb

$bridge fdb add 02:02:00:00:00:13 dev vxlan1000 nhid 101 self

[1] E-VPN https://tools.ietf.org/html/rfc7432
[2] E-VPN VxLAN: https://tools.ietf.org/html/rfc8365
[3] LPC talk with mention of nexthop groups for L2 ecmp
http://vger.kernel.org/lpc_net2018_talks/scaling_bridge_fdb_database_slidesV3.pdf

v4 - fixed uninitialized variable reported by kernel test robot
Reported-by: kernel test robot <rong.a.chen@intel.com>
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ip6_fib.h
include/net/nexthop.h
include/uapi/linux/nexthop.h
net/ipv4/nexthop.c
net/ipv6/route.c