]> git.itanic.dy.fi Git - linux-stable/commit
nexthop: Do not increment dump sentinel at the end of the dump
authorIdo Schimmel <idosch@nvidia.com>
Sun, 13 Aug 2023 16:48:56 +0000 (19:48 +0300)
committerJakub Kicinski <kuba@kernel.org>
Wed, 16 Aug 2023 01:54:53 +0000 (18:54 -0700)
commitdb1428f66a8c97793e6596e7c62047211dd6db79
tree2527f1eee6b271107a29670991051727d018b1e7
parent23ab9324fd260277f83a07c51fdc625442e98265
nexthop: Do not increment dump sentinel at the end of the dump

The nexthop and nexthop bucket dump callbacks previously returned a
positive return code even when the dump was complete, prompting the core
netlink code to invoke the callback again, until returning zero.

Zero was only returned by these callbacks when no information was filled
in the provided skb, which was achieved by incrementing the dump
sentinel at the end of the dump beyond the ID of the last nexthop.

This is no longer necessary as when the dump is complete these callbacks
return zero.

Remove the unnecessary increment.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/20230813164856.2379822-3-idosch@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/nexthop.c