From patchwork Mon Jul 10 09:48:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Amrani, Ram" X-Patchwork-Id: 9832645 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 031AA60350 for ; Mon, 10 Jul 2017 09:48:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E7A6222638 for ; Mon, 10 Jul 2017 09:48:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DA2C327F2B; Mon, 10 Jul 2017 09:48:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 064C122638 for ; Mon, 10 Jul 2017 09:48:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752711AbdGJJsy (ORCPT ); Mon, 10 Jul 2017 05:48:54 -0400 Received: from mail-sn1nam02on0054.outbound.protection.outlook.com ([104.47.36.54]:27281 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752469AbdGJJsv (ORCPT ); Mon, 10 Jul 2017 05:48:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=1JbhYgCfYT0ZEOR15WRd4EJU1r7kQ1nI87l5SnY6NHA=; b=Z8ZDkKMXgfiXA5e8iMVTNSLz7qttlqYpAz89GZ40Vcnb+w1iSOMXYl9TEwN6Z2sBp/sD/Cwx2kyGvVwD9ugaRiWgwviOWVp7Ipoo3WYuTfvwuIiGXtXiDlA2hGyEdGyVD6NQXVpDCHcqIBudSNL+GUzbOSWQd7/7xT6RoLXRPzE= Received: from MWHPR07CA0025.namprd07.prod.outlook.com (10.169.230.11) by CY1PR07MB1528.namprd07.prod.outlook.com (10.161.168.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1240.13; Mon, 10 Jul 2017 09:48:43 +0000 Received: from BN1BFFO11FD017.protection.gbl (2a01:111:f400:7c10::1:194) by MWHPR07CA0025.outlook.office365.com (2603:10b6:300:1c::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1240.13 via Frontend Transport; Mon, 10 Jul 2017 09:48:42 +0000 Authentication-Results: spf=none (sender IP is 50.232.66.26) smtp.mailfrom=cavium.com; obsidianresearch.com; dkim=none (message not signed) header.d=none;obsidianresearch.com; dmarc=none action=none header.from=cavium.com; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) Received: from CAEXCH02.caveonetworks.com (50.232.66.26) by BN1BFFO11FD017.mail.protection.outlook.com (10.58.144.80) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.1220.9 via Frontend Transport; Mon, 10 Jul 2017 09:48:42 +0000 Received: from lb-tlvb-ramrani.il.qlogic.org (10.185.6.119) by CAEXCH02.caveonetworks.com (10.17.4.29) with Microsoft SMTP Server id 14.2.347.0; Mon, 10 Jul 2017 02:48:39 -0700 From: Ram Amrani To: , , CC: , , , Ram Amrani Subject: [PATCH rdma-core] libqedr: fix bugs introduced in "sparse fixes" Date: Mon, 10 Jul 2017 12:48:32 +0300 Message-ID: <1499680112-7347-1-git-send-email-Ram.Amrani@cavium.com> X-Mailer: git-send-email 2.1.0 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:50.232.66.26; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(39400400002)(39840400002)(39450400003)(39410400002)(2980300002)(428002)(199003)(189002)(9170700003)(2201001)(6666003)(4326008)(38730400002)(305945005)(5003940100001)(50466002)(50226002)(107886003)(8936002)(54906002)(50986999)(77096006)(86362001)(575784001)(478600001)(101416001)(104016004)(36756003)(2906002)(48376002)(8676002)(5660300001)(81166006)(105586002)(356003)(47776003)(106466001)(189998001)(626005)(72206003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR07MB1528; H:CAEXCH02.caveonetworks.com; FPR:; SPF:None; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD017; 1:CtxYsP+bvbi8m+QDIrg9lzIu669HV1kg0nxT8z1eAptQ55SUSEhCbW1wwt/WNxspC7KGXIWPelGVrZs3GnqoS9pDUM/oXX6EnCBCjwxVSYdyTdssMwgHk/2QsAr+ARXfi7RJLTfyxtoJepO2UaVf+JuAgGzucZ8ovs0JUN5cTliK4i49AoGX6oOqG89C65R6dbwrF9a9Z/RAUb5Tn6RGZC5/ZhnbKsO3Qycuqot7C6/7OAOodjxaFvVkHm2HBq4owyLJTyXBLyLeWV/P8/Y2yfxEZEQNwcsZieyFi19MaC3ct4WvTCiHEs0YaaRXBVxxSF5VZTMh019vL5J2cFXrugNwXoNjitOv4r8vpUl8W1NJ2ekWbo4b6PVW3albwticT+Yohr3SQd9Ap2iuWcYuNwoHNs4/x90w8weiLT0rB/wspbREFXznm+fryndw4e88GaQ+BkpYdTq2xIoOd4EC0uCN1rgLTCXC7tCzXW2lK70tRHFq4MEV1v9l8hXPeZPbVK2NTaFOJwTSAS3o4pYInCqjHm5Af1AqsjssTWhekYqAV4YMWzzx+f8lrnWpdDD/SyANDn0CCstEEBSvfsM2FRu8vkZMm1zLvhxMfRslpESU5k2VVfcEs9j9aaUs21Zg9p2Y+XiciUODdAwiBxVsvhMShhKP7fGkiBEHcOQS4R44XYXle1oorMkafuJ2Zcs0+HM0XQssR0DlCtrMakNpmdQjttv3eci9oEv2P6t+/7LMO1t6fKpdSIuUzApFprEzLumByyqgYGz1oMqHaYbhQLsi1/YfkoqCDgnoXRYyl7+ijQY63SIXk46yACH5Ut++UzVoMp496G0tg2krAKfgmQ== X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b8295de4-bb26-4147-fa31-08d4c778d994 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254075)(300000503095)(300135400095)(2017052603031)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:CY1PR07MB1528; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB1528; 3:2fzvOW8xbZKTCkiqq1thD8maYQd2cpikjbp0W5+GPdgq2ZP/u5BcjUv0pvkqkfjCZ+Roaa6BGimt/hIdbucwMaYfIq22cxKzqx3/hb1PzVN7X7gxJpDBcltegI4t9DznKVGa/af4Js1PvruALTHk3My01ycQDaoiutFaAoHWePWKuJDmezeRjicD+Y4fnwidxt7Z/6vZqYRS7NOuQAnzYlN/0bniW5f+eWupJV7LvEQm3ny5NMH77/EnlvmksPEX/OEEmhic1pjX+TVB01RAU+Ehs5J5DPSaZ64G7MPlh9FIF2crEdSdxaiQLOidoYrQ8zFdGYVzeQlHZUb+8NTvPXsyJukkaHohDletPA3MekpesUEHXlXoOcuJfDXVyL6rptF1QsJri30mbBLduGfOMuBVbXn3nHI47Ws1fdTgxggK/GDUaqReqJ9Ax7UoiD5AElwEGnH8MgCHA2zL1inlTkwcDRCvTW71Imu7gczmdJtaNDhTqjGat7wwjjb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r9wBGxP+PsJx8v72Jj+MyCi1KxA== X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB1528; 20:8xtnm4nqXsQ8TFBrtKYVpGNi6d7Y7qU1SdWJggXJgifDlgHi0ZjxS/ELcov0cWCr+Uha5yOjE8IuqPymouL1dmWT9num+XmmXEqRLCAkV83DBCbKw7qaE7QFBjsBMXNxWdxOtGXDZjQM0KpliCxspBt7NuDDviqJCqv75OD+cAMh2331hYDRvd30u5PI1dc9dYMxPYYLCW3P4Rfe/reygb9TRd3cZXH2SbGtoKii7hnE9+YvuAYMs86kLz3VpYNZ7NfAwn8zEVmgLX1xRp2X0IoWoG4Q0vZUFLheOotwqijU36K/nB6xUUNqlNsQL9JnL1iCAc6uN88sKSzjEfYFOyPGH8f+iP/OAJ7IpoPXGWmqmPwYsOsSjdz/FXAZ1Ng3Bq8t3VygS6qoWHZE73nq35nIVYJDy7V7vDKtHDSY0fn4s2TlEMWAHmPRfdUwOk29VFIiO9UJ4jfNu2OXYIuNkjbW9W0rKpqoWk0W0kzPrhRRI5KudRXPFCwE39PgOtrm X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(236129657087228)(167848164394848); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(13018025)(2017060910075)(13016025)(5005006)(8121501046)(3002001)(100000703101)(100105400095)(93006095)(93001095)(10201501046)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123555025)(20161123564025)(20161123558100)(20161123560025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY1PR07MB1528; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY1PR07MB1528; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR07MB1528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Dj?= =?us-ascii?Q?+Y0Kuc0kxgCRAHxgKAE4uxUeQtTAJAFyIJk2euVeYd1O0YBbzx5Xdj7bcpah?= =?us-ascii?Q?nt8OvrwhsWpsa60N/DhuXVEjxchizXgypBbBaYmWqN/GsaSt+Mdi2BB8OdXc?= =?us-ascii?Q?JgMHpSsbXLciUi32vynqU9cd9MUadFp7QPErcmpjpJ05FyTamkzBWN30rnO3?= =?us-ascii?Q?5HY/Qr9r4+SZCa6MGAMtVnyLnOzTwm38QnJ9eNV011LgM3fEKKu5aR3SZwk6?= =?us-ascii?Q?0c6WSPYDawmUy3Tbyf708YPRdfrYgjb1ldXwzJS16J1X+LTtRTGo4tiIxeEE?= =?us-ascii?Q?jbL9EzPoaZC6xWtoorOQocbKVEXfhoKKOzFmRub69diX3mYkVqC2T9eA5MDv?= =?us-ascii?Q?KLziT5wwox7E9aX2MkhFkoXM3njWwYYU+QCL1O0NIlBN3a6+tsU/2rn+ntOA?= =?us-ascii?Q?=3D=3D?= X-Forefront-PRVS: 03648EFF89 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR07MB1528; 23:Zz7wACOc0ti5Gv+swKYyS5GmRV+ks79iSxhMK6T2+?= =?us-ascii?Q?euc3K8WRIdhJKolx06uqS9DpX0HE423ulx6v3rBO/kAIAZIwL7XLSRk/03Fy?= =?us-ascii?Q?Aya+Apv6uqLtCSt2Zuu3+PCocSRUP645JXvR6WcMTi6FPHmqDkHTdOIMK/eK?= =?us-ascii?Q?MNQ9d8arUJ++6/gGOu9cEXce9eKDuG55UeQlyBF3IbYD4sLAt2s2ECs1HstP?= =?us-ascii?Q?FWbPCvC0pu4Xto9Pw6djA6dGyxbydy/iPvb5XSKdFZM3ARJXyonP4GPHhQlC?= =?us-ascii?Q?MRIU92t7LdeOMN/UfbPJLvfT6sajdLs6AV9UKbz2KmXC5sTX4NRyDw8hU4GO?= =?us-ascii?Q?Nxp51F02QHf9ddtIytkFMEl9z86JWEicQlZYLDZNr5YBfl+axsrzZcd602qq?= =?us-ascii?Q?mhU51/YoZOQF0zCKyETjwCT+KUeLIp6OW1kockZL4dVHY6KzlJJhJm4FhcaA?= =?us-ascii?Q?2l5jzZBhYk+fbirlemR6tc2sL7JLaQNcdWaK5fh5fvBE03SKjGNKULosA1x7?= =?us-ascii?Q?jcD3r77AX8E0+9iPRAoUIHnrRH6yvHgTikY3FrtQvevdwMmZKm+zPvkTj9m/?= =?us-ascii?Q?ulHxYhferz3A6g4gkV5dzTXFeAio5h1mihv0n1EplSuhNWXvuINDm6vCaHaA?= =?us-ascii?Q?M/ULAfZZ3REvdDI9r9d7b4n4fSV0oA2YirHOjPUitiuSZZm3sLJoo1s9K7uH?= =?us-ascii?Q?Cyzjmk0OyiHJT74XRss97TjlOdtg3dEPiRnAQb/8be8WWp4h9oLdnAJ7Uu7C?= =?us-ascii?Q?MOmGsRaPMW8XDPi41Hc+DoMKuTNewKts+37i74yVt2SQB9JIkrJm0rvlH/f9?= =?us-ascii?Q?Ry64UbTbszf92XsnhaTROnXCUxznTjk8vAm7hTcB9U4ziUeYY9SO7/REMRPa?= =?us-ascii?Q?wK6JO1lfCrqWPhnmv2gt4V60eseq7g75D24FPI2XoGQkNSwqveuPetIvpGwo?= =?us-ascii?Q?0ENyEcpsTZNEi/IbPfgf+4OFNT2MEunc5P4891w3agF0z75ODcKo7F9cDI1R?= =?us-ascii?Q?PdVy7sl8dCH3sxx/U1wE+xU6tkpgO+qJCQzBq5bLntvbA=3D=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR07MB1528; 6:qd4aBlwS37ajgjBUeI/ijhmFJjeC0LW1mRh0iC/IL+?= =?us-ascii?Q?snRnLyT4kckCGGLzsHek30PrcrSo9ExKhsSxJfIc++RNOLo8QmM5rHdCTZuL?= =?us-ascii?Q?phMouDhybDhG5sxO8+4lXF/LHBAIRzcBp0RXhn8yt2JPM4AXRu+PBgj26pcJ?= =?us-ascii?Q?radUnvgNN4MstHHiTgbTp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evpTqH1gsRE/X/8fP9kuRv6K9PBEShE9DMLWq4PlRUAL0+7JPBC3pdqd+Sm1PkqeXKS0Ul9Mepan0tRA0ivJtQy37MzSo9S2vgQqHzQv3/DQj0+Lxbdcu+nYL0dC/nMBzLQumjBUcsQxJu853ZO+kmvUjQvttaAJqJuJxkFtJfd9oVA137ULBXP1KHAYY8VGi1rAS+FJ4VOEC4L6N0bUrPBJO2r5rm0DxeUxNd43Exk6thGET+6bcqvq+2uABq/cIGi3ysZ22w+oX6tARVd9npSd1xcT36gHf51UEKvMJBtp4imcH1jEokq0FEJxY35Cm27+ggjCreA+orFCMxn2yD8BjzAw7jC6fbWX6WYblwETdIwYMZRfUW0HHNahzwYRPRFKrqVkKVv16AIp3Pb+lc5Ww2fQlMf5v+f7ineL3Nv8s= X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jul 2017 09:48:42.3072 (UTC) X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=711e4ccf-2e9b-4bcf-a551-4094005b6194; Ip=[50.232.66.26]; Helo=[CAEXCH02.caveonetworks.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB1528 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fix byte swapping function (pointer must advance). Fix WQE size to be multiples of 16 bytes, not 8 bytes. Pass a pointer to wqe_size to allow it to be updated. Update the immediate value before the wqe is copied. Fixes: 259ddded0e16 ("libqedr: fix sparse warnings") Signed-off-by: Ram Amrani --- providers/qedr/qelr.h | 1 + providers/qedr/qelr_verbs.c | 59 ++++++++++++++++++++++++--------------------- 2 files changed, 32 insertions(+), 28 deletions(-) diff --git a/providers/qedr/qelr.h b/providers/qedr/qelr.h index b093509..05b1640 100644 --- a/providers/qedr/qelr.h +++ b/providers/qedr/qelr.h @@ -285,6 +285,7 @@ static inline struct qelr_cq *get_qelr_cq(struct ibv_cq *ibcq) (((value) >> (name ## _SHIFT)) & name ## _MASK) #define ROCE_WQE_ELEM_SIZE sizeof(struct rdma_sq_sge) +#define RDMA_WQE_BYTES (16) #define QELR_RESP_IMM (RDMA_CQE_RESPONDER_IMM_FLG_MASK << \ RDMA_CQE_RESPONDER_IMM_FLG_SHIFT) diff --git a/providers/qedr/qelr_verbs.c b/providers/qedr/qelr_verbs.c index fc4afdb..fb52f9d 100644 --- a/providers/qedr/qelr_verbs.c +++ b/providers/qedr/qelr_verbs.c @@ -1035,7 +1035,7 @@ static void qelr_prepare_sq_sges(struct qelr_qp *qp, static uint32_t qelr_prepare_sq_rdma_data(struct qelr_qp *qp, struct qelr_dpm *dpm, int data_size, - uint8_t wqe_size, + uint8_t *p_wqe_size, struct rdma_sq_rdma_wqe_1st *rwqe, struct rdma_sq_rdma_wqe_2nd *rwqe2, struct ibv_send_wr *wr, @@ -1044,7 +1044,10 @@ static uint32_t qelr_prepare_sq_rdma_data(struct qelr_qp *qp, memset(rwqe2, 0, sizeof(*rwqe2)); rwqe2->r_key = htole32(wr->wr.rdma.rkey); TYPEPTR_ADDR_SET(rwqe2, remote_va, wr->wr.rdma.remote_addr); - rwqe->wqe_size = wqe_size; + rwqe->length = htole32(data_size); + + if (is_imm) + rwqe->imm_data = htole32(be32toh(wr->imm_data)); if (wr->send_flags & IBV_SEND_INLINE && (wr->opcode == IBV_WR_RDMA_WRITE_WITH_IMM || @@ -1053,48 +1056,45 @@ static uint32_t qelr_prepare_sq_rdma_data(struct qelr_qp *qp, SET_FIELD2(flags, RDMA_SQ_RDMA_WQE_1ST_INLINE_FLG, 1); qelr_prepare_sq_inline_data(qp, dpm, data_size, - &rwqe->wqe_size, wr, + p_wqe_size, wr, &rwqe->flags, flags); + rwqe->wqe_size = *p_wqe_size; } else { - qelr_prepare_sq_sges(qp, dpm, &rwqe->wqe_size, wr); + qelr_prepare_sq_sges(qp, dpm, p_wqe_size, wr); + rwqe->wqe_size = *p_wqe_size; } - rwqe->length = htole32(data_size); - - if (is_imm) - rwqe->imm_data = htole32(be32toh(wr->imm_data)); - return data_size; } static uint32_t qelr_prepare_sq_send_data(struct qelr_qp *qp, struct qelr_dpm *dpm, int data_size, - uint8_t wqe_size, + uint8_t *p_wqe_size, struct rdma_sq_send_wqe_1st *swqe, struct rdma_sq_send_wqe_2st *swqe2, struct ibv_send_wr *wr, bool is_imm) { memset(swqe2, 0, sizeof(*swqe2)); - swqe->wqe_size = wqe_size; + swqe->length = htole32(data_size); + + if (is_imm) + swqe->inv_key_or_imm_data = htole32(be32toh(wr->imm_data)); if (wr->send_flags & IBV_SEND_INLINE) { uint8_t flags = 0; SET_FIELD2(flags, RDMA_SQ_SEND_WQE_INLINE_FLG, 1); qelr_prepare_sq_inline_data(qp, dpm, data_size, - &swqe->wqe_size, wr, + p_wqe_size, wr, &swqe->flags, flags); + swqe->wqe_size = *p_wqe_size; } else { - qelr_prepare_sq_sges(qp, dpm, &swqe->wqe_size, wr); + qelr_prepare_sq_sges(qp, dpm, p_wqe_size, wr); + swqe->wqe_size = *p_wqe_size; } - swqe->length = htole32(data_size); - - if (is_imm) - swqe->inv_key_or_imm_data = htole32(be32toh(wr->imm_data)); - return data_size; } @@ -1261,14 +1261,14 @@ static int __qelr_post_send(struct qelr_devctx *cxt, struct qelr_qp *qp, wqe->req_type = RDMA_SQ_REQ_TYPE_SEND_WITH_IMM; swqe = (struct rdma_sq_send_wqe_1st *)wqe; - wqe_size = sizeof(struct rdma_sq_send_wqe) / sizeof(uint64_t); + wqe_size = sizeof(struct rdma_sq_send_wqe) / RDMA_WQE_BYTES; swqe2 = (struct rdma_sq_send_wqe_2st *)qelr_chain_produce(&qp->sq.chain); if (dpm.is_edpm) qelr_edpm_set_inv_imm(qp, &dpm, wr->imm_data); wqe_length = qelr_prepare_sq_send_data(qp, &dpm, data_size, - wqe_size, swqe, swqe2, + &wqe_size, swqe, swqe2, wr, 1 /* Imm */); if (dpm.is_edpm) @@ -1285,10 +1285,10 @@ static int __qelr_post_send(struct qelr_devctx *cxt, struct qelr_qp *qp, wqe->req_type = RDMA_SQ_REQ_TYPE_SEND; swqe = (struct rdma_sq_send_wqe_1st *)wqe; - wqe_size = sizeof(struct rdma_sq_send_wqe) / sizeof(uint64_t); + wqe_size = sizeof(struct rdma_sq_send_wqe) / RDMA_WQE_BYTES; swqe2 = (struct rdma_sq_send_wqe_2st *)qelr_chain_produce(&qp->sq.chain); wqe_length = qelr_prepare_sq_send_data(qp, &dpm, data_size, - wqe_size, swqe, swqe2, + &wqe_size, swqe, swqe2, wr, 0); if (dpm.is_edpm) @@ -1305,7 +1305,7 @@ static int __qelr_post_send(struct qelr_devctx *cxt, struct qelr_qp *qp, wqe->req_type = RDMA_SQ_REQ_TYPE_RDMA_WR_WITH_IMM; rwqe = (struct rdma_sq_rdma_wqe_1st *)wqe; - wqe_size = sizeof(struct rdma_sq_rdma_wqe) / sizeof(uint64_t); + wqe_size = sizeof(struct rdma_sq_rdma_wqe) / RDMA_WQE_BYTES; rwqe2 = (struct rdma_sq_rdma_wqe_2nd *)qelr_chain_produce(&qp->sq.chain); if (dpm.is_edpm) { qelr_edpm_set_rdma_ext(qp, &dpm, wr->wr.rdma.remote_addr, @@ -1313,7 +1313,8 @@ static int __qelr_post_send(struct qelr_devctx *cxt, struct qelr_qp *qp, qelr_edpm_set_inv_imm(qp, &dpm, wr->imm_data); } - wqe_length = qelr_prepare_sq_rdma_data(qp, &dpm, data_size, wqe_size, rwqe, rwqe2, wr, 1 /* Imm */); + wqe_length = qelr_prepare_sq_rdma_data(qp, &dpm, data_size, &wqe_size, + rwqe, rwqe2, wr, 1 /* Imm */); if (dpm.is_edpm) qelr_edpm_set_msg_data(qp, &dpm, QELR_IB_OPCODE_RDMA_WRITE_ONLY_WITH_IMMEDIATE, @@ -1328,14 +1329,15 @@ static int __qelr_post_send(struct qelr_devctx *cxt, struct qelr_qp *qp, wqe->req_type = RDMA_SQ_REQ_TYPE_RDMA_WR; rwqe = (struct rdma_sq_rdma_wqe_1st *)wqe; - wqe_size = sizeof(struct rdma_sq_rdma_wqe) / sizeof(uint64_t); + wqe_size = sizeof(struct rdma_sq_rdma_wqe) / RDMA_WQE_BYTES; rwqe2 = (struct rdma_sq_rdma_wqe_2nd *)qelr_chain_produce(&qp->sq.chain); if (dpm.is_edpm) qelr_edpm_set_rdma_ext(qp, &dpm, wr->wr.rdma.remote_addr, wr->wr.rdma.rkey); - wqe_length = qelr_prepare_sq_rdma_data(qp, &dpm, data_size, wqe_size, rwqe, rwqe2, wr, 0); + wqe_length = qelr_prepare_sq_rdma_data(qp, &dpm, data_size, &wqe_size, + rwqe, rwqe2, wr, 0); if (dpm.is_edpm) qelr_edpm_set_msg_data(qp, &dpm, QELR_IB_OPCODE_RDMA_WRITE_ONLY, @@ -1351,9 +1353,10 @@ static int __qelr_post_send(struct qelr_devctx *cxt, struct qelr_qp *qp, wqe->req_type = RDMA_SQ_REQ_TYPE_RDMA_RD; rwqe = (struct rdma_sq_rdma_wqe_1st *)wqe; - wqe_size = sizeof(struct rdma_sq_rdma_wqe) / sizeof(uint64_t); + wqe_size = sizeof(struct rdma_sq_rdma_wqe) / RDMA_WQE_BYTES; rwqe2 = (struct rdma_sq_rdma_wqe_2nd *)qelr_chain_produce(&qp->sq.chain); - wqe_length = qelr_prepare_sq_rdma_data(qp, &dpm, data_size, wqe_size, rwqe, rwqe2, wr, 0); + wqe_length = qelr_prepare_sq_rdma_data(qp, &dpm, data_size, &wqe_size, + rwqe, rwqe2, wr, 0); qp->wqe_wr_id[qp->sq.prod].wqe_size = wqe_size; qp->prev_wqe_size = wqe_size; qp->wqe_wr_id[qp->sq.prod].bytes_len = wqe_length;