[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <66259f8d-429d-907e-6793-4229ff36463e@kernel.org>
Date: Sun, 13 Aug 2023 19:20:16 -0600
From: David Ahern <dsahern@...nel.org>
To: Ido Schimmel <idosch@...dia.com>, netdev@...r.kernel.org
Cc: davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
edumazet@...gle.com, petrm@...dia.com, mlxsw@...dia.com
Subject: Re: [PATCH net-next 1/2] nexthop: Simplify nexthop bucket dump
On 8/13/23 10:48 AM, Ido Schimmel wrote:
> Before commit f10d3d9df49d ("nexthop: Make nexthop bucket dump more
> efficient"), rtm_dump_nexthop_bucket_nh() returned a non-zero return
> code for each resilient nexthop group whose buckets it dumped,
> regardless if it encountered an error or not.
>
> This meant that the sentinel ('dd->ctx->nh.idx') used by the function
> that walked the different nexthops could not be used as a sentinel for
> the bucket dump, as otherwise buckets from the same group would be
> dumped over and over again.
>
> This was dealt with by adding another sentinel ('dd->ctx->done_nh_idx')
> that was incremented by rtm_dump_nexthop_bucket_nh() after successfully
> dumping all the buckets from a given group.
>
> After the previously mentioned commit this sentinel is no longer
> necessary since the function no longer returns a non-zero return code
> when successfully dumping all the buckets from a given group.
>
> Remove this sentinel and simplify the code.
>
> Signed-off-by: Ido Schimmel <idosch@...dia.com>
> Reviewed-by: Petr Machata <petrm@...dia.com>
> ---
> net/ipv4/nexthop.c | 5 -----
> 1 file changed, 5 deletions(-)
>
Reviewed-by: David Ahern <dsahern@...nel.org>
Powered by blists - more mailing lists