From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A4348C2B9F4 for ; Tue, 22 Jun 2021 12:17:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 86A4F611CE for ; Tue, 22 Jun 2021 12:17:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231294AbhFVMTY (ORCPT ); Tue, 22 Jun 2021 08:19:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:38524 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231409AbhFVMTX (ORCPT ); Tue, 22 Jun 2021 08:19:23 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8453C61374; Tue, 22 Jun 2021 12:17:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624364228; bh=jc0n7n1yoQiR1dze48G5a/DXri6P2J2DoBIwplqNRoc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pBDUIU63XL1Pa2whDLSowt6R4tMsp3m8a7nKHJlVduk/wqY66iYcPjhu3lA87P7Zl FPuudN1tIASi6CebQpNyN7nTVtIhRKwAVmJazrLRiqfeTPPPc0c/+MpknOl+evFrj9 4LLBNwG0dXUl66NsOAiM4xYA0fZLPDVFpQrkPynyB9lgxHYEtC80NMiOdk1HyU27Zv sIBx4xXa0kwl1N6QbmGXKS+8KNaFMPAt8eVATESHZpA60j8/rFl8OL8nZ5HuDGMKJZ dt56yVYCK0IVwdwgEqTw0ffTUsLu2wCGNHKEDLYH5YTFrtQCUgvjb1u27n06EQaci0 Q8JBKUJaAyQzg== Date: Tue, 22 Jun 2021 15:17:03 +0300 From: Leon Romanovsky To: Haakon Bugge Cc: Doug Ledford , Jason Gunthorpe , OFED mailing list , Hans Ry Subject: Re: [PATCH for-next] RDMA/cma: Fix incorrect Packet Lifetime calculation Message-ID: References: <1624281537-5573-1-git-send-email-haakon.bugge@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org On Tue, Jun 22, 2021 at 09:32:27AM +0000, Haakon Bugge wrote: > > > > On 22 Jun 2021, at 10:18, Leon Romanovsky wrote: > > > > On Mon, Jun 21, 2021 at 03:18:57PM +0200, Håkon Bugge wrote: > >> An approximation for the PacketLifeTime is half the local ACK timeout. > >> The encoding for both timers are logarithmic. The PacketLifeTime > >> calculation is wrong when local ACK timeout is zero. In that case, > >> PacketLifeTime is set to the incorrect value 255. > >> > >> Fixed by explicitly testing for timeout being zero. > >> > >> Fixes: e1ee1e62bec4 ("RDMA/cma: Use ACK timeout for RoCE packetLifeTime") > >> Signed-off-by: Håkon Bugge > >> > >> --- > >> > >> * Note: This commit must be merged after ("RDMA/cma: Replace > >> RMW with atomic bit-ops") > >> --- > >> drivers/infiniband/core/cma.c | 8 +++++--- > >> 1 file changed, 5 insertions(+), 3 deletions(-) > >> > > > > Thanks, > > Reviewed-by: Leon Romanovsky > > Thanks for the review, Leon! I have to rebase on the tip of for-next, since the ("RDMA/cma: Replace RMW with atomic bit-ops") will not have the get_bit() stuff in cma_resolve_iboe_route() anymore. I assume I can retain your r-b after the rebase? Yes, please. > > > Thxs, Håkon > > > >