From: Arkadi Sharshevsky Date: Tue, 24 Oct 2017 08:11:42 +0000 (+0200) Subject: mlxsw: spectrum_dpipe: Fix entries dump of the adjacency table X-Git-Tag: v4.19~2168^2~335 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=69715dd50d28deb52f84932794a2fce0b18c8b56;p=platform%2Fkernel%2Flinux-rpi.git mlxsw: spectrum_dpipe: Fix entries dump of the adjacency table During the dump the per netlink packet entry counter should be zeroed out when new packet is created. Fixes: 190d38a52a73 ("mlxsw: spectrum_dpipe: Add support for adjacency table dump") Signed-off-by: Arkadi Sharshevsky Reported-by: David Ahern Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c index 6ea6435..96fdba7 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c @@ -1093,6 +1093,7 @@ start_again: goto err_ctx_prepare; j = 0; nh_skip = nh_count; + nh_count = 0; mlxsw_sp_nexthop_for_each(nh, mlxsw_sp->router) { if (!mlxsw_sp_nexthop_offload(nh) || mlxsw_sp_nexthop_group_has_ipip(nh))