From patchwork Wed Nov 29 03:24:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guoqing Jiang X-Patchwork-Id: 13472170 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="fXv/l5me" Received: from out-175.mta0.migadu.com (out-175.mta0.migadu.com [91.218.175.175]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6098C1AD for ; Tue, 28 Nov 2023 19:25:20 -0800 (PST) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1701228318; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0ZNnDj3gZH8Ja7vN1CAquuuBpN9vbVWfJ2FqrFhLWGc=; b=fXv/l5me5xpZAVGzgVhZ8SLPM62JoKdD2WyjS7OJsBgJzv3F7K6YZYZONQtBy2RhX6F5W8 3eSnJEU3e0NEOsxAQTjK8FEowNub6At4vF2j88C1aOFMTTV5gtlKyOgjA/BzTtDgWEv3dF uxa2cwegwWqqZsPgoE0tqaIidNwkvqc= From: Guoqing Jiang To: bmt@zurich.ibm.com, jgg@ziepe.ca, leon@kernel.org Cc: linux-rdma@vger.kernel.org, guoqing.jiang@linux.dev Subject: [PATCH 4/4] RDMA/siw: Call orq_get_current if possible Date: Wed, 29 Nov 2023 11:24:18 +0800 Message-Id: <20231129032418.26705-5-guoqing.jiang@linux.dev> In-Reply-To: <20231129032418.26705-1-guoqing.jiang@linux.dev> References: <20231129032418.26705-1-guoqing.jiang@linux.dev> Precedence: bulk X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT We can call it in siw_orq_empty. Signed-off-by: Guoqing Jiang Acked-by: Bernard Metzler --- drivers/infiniband/sw/siw/siw.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/sw/siw/siw.h b/drivers/infiniband/sw/siw/siw.h index 2edba2a864bb..75253f2b3e3d 100644 --- a/drivers/infiniband/sw/siw/siw.h +++ b/drivers/infiniband/sw/siw/siw.h @@ -657,7 +657,7 @@ static inline struct siw_sqe *orq_get_free(struct siw_qp *qp) static inline int siw_orq_empty(struct siw_qp *qp) { - return qp->orq[qp->orq_get % qp->attrs.orq_size].flags == 0 ? 1 : 0; + return orq_get_current(qp)->flags == 0 ? 1 : 0; } static inline struct siw_sqe *irq_alloc_free(struct siw_qp *qp)