On 3/10/21 8:02 AM, Petr Machata wrote: > Currently, replace assumes that the new group that is given is a > fully-formed object. But mpath groups really only have one attribute, and > that is the constituent next hop configuration. This may not be universally > true. From the usability perspective, it is desirable to allow the replace > operation to adjust just the constituent next hop configuration and leave > the group attributes as such intact. > > But the object that keeps track of whether an attribute was or was not > given is the nh_config object, not the next hop or next-hop group. To allow > (selective) attribute updates during NH group replacement, propagate `cfg' > to replace_nexthop() and further to replace_nexthop_grp(). > > Signed-off-by: Petr Machata <pe...@nvidia.com> > Reviewed-by: Ido Schimmel <ido...@nvidia.com> > --- > net/ipv4/nexthop.c | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) >
Reviewed-by: David Ahern <dsah...@kernel.org>