From patchwork Tue Jan 28 12:52:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Cohen X-Patchwork-Id: 3546731 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B307B9F382 for ; Tue, 28 Jan 2014 12:53:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CD153200ED for ; Tue, 28 Jan 2014 12:53:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B4F5F20138 for ; Tue, 28 Jan 2014 12:53:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754513AbaA1MxH (ORCPT ); Tue, 28 Jan 2014 07:53:07 -0500 Received: from mail-wg0-f45.google.com ([74.125.82.45]:35872 "EHLO mail-wg0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751569AbaA1MxG (ORCPT ); Tue, 28 Jan 2014 07:53:06 -0500 Received: by mail-wg0-f45.google.com with SMTP id n12so698251wgh.24 for ; Tue, 28 Jan 2014 04:53:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=XQdrzCiPT1xXfzj5TgTbCLJ7GkU10bk4hpFGYVN+45c=; b=fhErBhZN4nHUl8dBogZL/yR+780WnTHICZALIGdklnxFhM3QtRExcU0jMsHMw8RD8h 5LpX4PIfsc23/hK/4b3GZ2RA4Q+dSWSROBA9sbs9iqBtsAmvDGT3zU3E0hSBUc+LmpWK EYh1In3cJv/gI32wRYQQRbbgmgfinHE/ACW0Bz8/CgpFiLdcgxS7QHQ4NdyLdYnhRph5 Isycz7JzophqugSAF3wwqw7vF0Ru1X1xaURFUP+gtPIqtexi/1Le8OkmBPtLoxy+gtVd ualr78X+pqJJ7zHUnCwsjSI17sO5zXVocSRZaGMkuV2cbseLz1uBAxWFTyCHAgDKXYsO SASA== X-Gm-Message-State: ALoCoQnzxvyYl0JC4wrGchiGHaiAUP0aunr+E39d1GlPwbeWc+5U/po6xhi8sJEqMk8ctHvk7Zhu X-Received: by 10.181.13.40 with SMTP id ev8mr1981849wid.16.1390913582817; Tue, 28 Jan 2014 04:53:02 -0800 (PST) Received: from localhost (out.voltaire.com. [193.47.165.251]) by mx.google.com with ESMTPSA id dm2sm34451332wib.8.2014.01.28.04.53.01 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 28 Jan 2014 04:53:02 -0800 (PST) From: Eli Cohen To: roland@kernel.org Cc: linux-rdma@vger.kernel.org, Eli Cohen Subject: [PATCH] IB/mlx5: Fix RC transport send queue overhead computation Date: Tue, 28 Jan 2014 14:52:47 +0200 Message-Id: <1390913567-4562-1-git-send-email-eli@mellanox.com> X-Mailer: git-send-email 1.8.5.2 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fix the RC QPs send queue overhead computation to take into account two additional segments in the WQE which are needed for registration operations. Signed-off-by: Eli Cohen --- drivers/infiniband/hw/mlx5/qp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c index ae37fb9..492dc33 100644 --- a/drivers/infiniband/hw/mlx5/qp.c +++ b/drivers/infiniband/hw/mlx5/qp.c @@ -216,7 +216,9 @@ static int sq_overhead(enum ib_qp_type qp_type) case IB_QPT_UC: size += sizeof(struct mlx5_wqe_ctrl_seg) + - sizeof(struct mlx5_wqe_raddr_seg); + sizeof(struct mlx5_wqe_raddr_seg) + + sizeof(struct mlx5_wqe_umr_ctrl_seg) + + sizeof(struct mlx5_mkey_seg); break; case IB_QPT_UD: