From patchwork Thu Dec 12 09:38:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 11287745 X-Patchwork-Delegate: jgg@ziepe.ca Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 28AE7138C for ; Thu, 12 Dec 2019 09:40:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0841724658 for ; Thu, 12 Dec 2019 09:40:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576143608; bh=30SzVLqrvzScTMJIRpaN7UgMLpXBcNAOjRTRVlvaPS4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=0NCOEr37sBD+Ic9yKAWMntrcWJ5DuFvvQR4OEsBwF75Xih0P8tiHbPsbWa1PZSnD1 5CO40kpZiz9w3frlKCmBP02xsXaeyEgpH+WRyopLd1rvXzfR5tfxaaTVzqRcSgQ6x+ 7M9xOlNJ9Jg3cG8MhOjPu+nbpfJDQRZCsAuppzGI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728339AbfLLJkH (ORCPT ); Thu, 12 Dec 2019 04:40:07 -0500 Received: from mail.kernel.org ([198.145.29.99]:40464 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728383AbfLLJkH (ORCPT ); Thu, 12 Dec 2019 04:40:07 -0500 Received: from localhost (unknown [193.47.165.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0D5FB2173E; Thu, 12 Dec 2019 09:40:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576143606; bh=30SzVLqrvzScTMJIRpaN7UgMLpXBcNAOjRTRVlvaPS4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SH92CDqs9KeGUqAF71ncJZP1VPgDuPkTwmGopkA2DBKfX5Dfy9rqsbEBNoN8+f40H Esqa9OvTDR9P8gV41tR5YE/ZKgEEnizUKlvt+l8HySuBKq6xEU1AvzrSMcZHWV5Fja gsFdVvmRVVImD08qWMRNkAE3jzOZnNXpUbMKDnrA= From: Leon Romanovsky To: Doug Ledford , Jason Gunthorpe Cc: Leon Romanovsky , RDMA mailing list , Bart Van Assche , Sean Hefty Subject: [PATCH rdma-rc v2 28/48] RDMA/cm: Convert REQ SRQ field Date: Thu, 12 Dec 2019 11:38:10 +0200 Message-Id: <20191212093830.316934-29-leon@kernel.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191212093830.316934-1-leon@kernel.org> References: <20191212093830.316934-1-leon@kernel.org> MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org From: Leon Romanovsky Convert REQ SRQ field to new scheme. Signed-off-by: Leon Romanovsky --- drivers/infiniband/core/cm.c | 4 ++-- drivers/infiniband/core/cm_msgs.h | 11 ----------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c index 1b0cdaea035e..673ff1da05bd 100644 --- a/drivers/infiniband/core/cm.c +++ b/drivers/infiniband/core/cm.c @@ -1297,7 +1297,7 @@ static void cm_format_req(struct cm_req_msg *req_msg, param->responder_resources); IBA_SET(CM_REQ_RETRY_COUNT, req_msg, param->retry_count); IBA_SET(CM_REQ_RNR_RETRY_COUNT, req_msg, param->rnr_retry_count); - cm_req_set_srq(req_msg, param->srq); + IBA_SET(CM_REQ_SRQ, req_msg, param->srq); } req_msg->primary_local_gid = pri_path->sgid; @@ -1704,7 +1704,7 @@ static void cm_format_req_event(struct cm_work *work, IBA_GET(CM_REQ_LOCAL_CM_RESPONSE_TIMEOUT, req_msg); param->retry_count = IBA_GET(CM_REQ_RETRY_COUNT, req_msg); param->rnr_retry_count = IBA_GET(CM_REQ_RNR_RETRY_COUNT, req_msg); - param->srq = cm_req_get_srq(req_msg); + param->srq = IBA_GET(CM_REQ_SRQ, req_msg); param->ppath_sgid_attr = cm_id_priv->av.ah_attr.grh.sgid_attr; work->cm_event.private_data = &req_msg->private_data; work->cm_event.private_data_len = CM_REQ_PRIVATE_DATA_SIZE; diff --git a/drivers/infiniband/core/cm_msgs.h b/drivers/infiniband/core/cm_msgs.h index 54573280652a..23a48211d15e 100644 --- a/drivers/infiniband/core/cm_msgs.h +++ b/drivers/infiniband/core/cm_msgs.h @@ -70,17 +70,6 @@ struct cm_req_msg { } __packed; -static inline u8 cm_req_get_srq(struct cm_req_msg *req_msg) -{ - return (req_msg->offset51 & 0x8) >> 3; -} - -static inline void cm_req_set_srq(struct cm_req_msg *req_msg, u8 srq) -{ - req_msg->offset51 = (u8) ((req_msg->offset51 & 0xF7) | - ((srq & 0x1) << 3)); -} - static inline __be32 cm_req_get_primary_flow_label(struct cm_req_msg *req_msg) { return cpu_to_be32(be32_to_cpu(req_msg->primary_offset88) >> 12);