From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 82F5F39D for ; Mon, 14 Aug 2023 01:22:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A34ADC433C7; Mon, 14 Aug 2023 01:22:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691976154; bh=8IRDzHuQtCSxqyOpcrFz5KOiePNi5Mft11GirqWtXQ4=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=nYLxjradP/d4nb0k6SAwiTw/aM261rC4WOmyW7l+CFkoHA9t8/wHUKBv54AEDuCBa xpT25AJsQ7I1cAFuUY/OC6M33+0E+Ty0AgtJbIXXgB9PMq9w26eiWG3cG5MDZDosFB t8RZam5bXvjy4121wXPebsVVV+Jg5AHwNg6eEdlXiARFdmAufkcG05dbEp4Od8VmtQ LnEZKMHEY1zidzxgrAbDcWWztcf3Z/pXUIMfuBez5egk8q0wFirLQw6DIbycxh+d6A cDYSNPlaNYemUBKk6+6XUxzcFdTUCeMK7jVJnwtfhcX/XZKbqh9fXW7HfHOZjZo2XD 3kBura/uK3PjQ== Message-ID: Date: Sun, 13 Aug 2023 19:22:33 -0600 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Subject: Re: [PATCH net-next 2/2] nexthop: Do not increment dump sentinel at the end of the dump Content-Language: en-US To: Ido Schimmel , netdev@vger.kernel.org Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, edumazet@google.com, petrm@nvidia.com, mlxsw@nvidia.com References: <20230813164856.2379822-1-idosch@nvidia.com> <20230813164856.2379822-3-idosch@nvidia.com> From: David Ahern In-Reply-To: <20230813164856.2379822-3-idosch@nvidia.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 8/13/23 10:48 AM, Ido Schimmel wrote: > 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 > Reviewed-by: Petr Machata > --- > net/ipv4/nexthop.c | 1 - > 1 file changed, 1 deletion(-) > Reviewed-by: David Ahern