]> git.baikalelectronics.ru Git - kernel.git/commit
nexthop: Fix fdb labeling for groups
authorDavid Ahern <dsahern@kernel.org>
Tue, 9 Jun 2020 02:54:43 +0000 (20:54 -0600)
committerDavid S. Miller <davem@davemloft.net>
Wed, 10 Jun 2020 20:18:40 +0000 (13:18 -0700)
commit2bf960559bace8f2a88d6ab2c1f5a2fa5a467845
treeac8f0d1e56f0cede157282bbc982974e36e0c9e3
parentcf08a987f24a16397a14cef164cea7701889562f
nexthop: Fix fdb labeling for groups

fdb nexthops are marked with a flag. For standalone nexthops, a flag was
added to the nh_info struct. For groups that flag was added to struct
nexthop when it should have been added to the group information. Fix
by removing the flag from the nexthop struct and adding a flag to nh_group
that mirrors nh_info and is really only a caching of the individual types.
Add a helper, nexthop_is_fdb, for use by the vxlan code and fixup the
internal code to use the flag from either nh_info or nh_group.

v2
- propagate fdb_nh in remove_nh_grp_entry

Fixes: 55fa3561b488 ("nexthop: support for fdb ecmp nexthops")
Cc: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vxlan.c
include/net/nexthop.h
net/ipv4/nexthop.c