David Ahern writes:
> On 2/8/21 1:42 PM, Petr Machata wrote:
>> @@ -212,7 +254,7 @@ static inline bool nexthop_is_multipath(const struct
>> nexthop *nh)
>> struct nh_group *nh_grp;
>>
>> nh_grp = rcu_dereference_rtnl(nh->nh_grp);
>> -return nh_grp->mpath
On Sat, Feb 13, 2021 at 12:38:47PM -0700, David Ahern wrote:
> On 2/8/21 1:42 PM, Petr Machata wrote:
> > diff --git a/net/ipv4/nexthop.c b/net/ipv4/nexthop.c
> > index 5d560d381070..4ce282b0a65f 100644
> > --- a/net/ipv4/nexthop.c
> > +++ b/net/ipv4/nexthop.c> @@ -734,6 +834,22 @@ static struct ne
On 2/8/21 1:42 PM, Petr Machata wrote:
> diff --git a/net/ipv4/nexthop.c b/net/ipv4/nexthop.c
> index 5d560d381070..4ce282b0a65f 100644
> --- a/net/ipv4/nexthop.c
> +++ b/net/ipv4/nexthop.c> @@ -734,6 +834,22 @@ static struct nexthop
*nexthop_select_path_mp(struct nh_group *nhg, int hash)
> r
On 2/8/21 1:42 PM, Petr Machata wrote:
> @@ -212,7 +254,7 @@ static inline bool nexthop_is_multipath(const struct
> nexthop *nh)
> struct nh_group *nh_grp;
>
> nh_grp = rcu_dereference_rtnl(nh->nh_grp);
> - return nh_grp->mpath;
> + return nh_g
At this moment, there is only one type of next-hop group: an mpath group,
which implements the hash-threshold algorithm.
To select a next hop, hash-threshold algorithm first assigns a range of
hashes to each next hop in the group, and then selects the next hop by
comparing the SKB hash with the in