From patchwork Sun Aug 30 15:31:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sagi Grimberg X-Patchwork-Id: 7097821 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9AF239F1CD for ; Sun, 30 Aug 2015 15:31:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9ECFB20567 for ; Sun, 30 Aug 2015 15:31:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 47A302052A for ; Sun, 30 Aug 2015 15:31:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753483AbbH3Pb1 (ORCPT ); Sun, 30 Aug 2015 11:31:27 -0400 Received: from mail-wi0-f171.google.com ([209.85.212.171]:33490 "EHLO mail-wi0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753468AbbH3Pb0 (ORCPT ); Sun, 30 Aug 2015 11:31:26 -0400 Received: by wicpl12 with SMTP id pl12so9819749wic.0 for ; Sun, 30 Aug 2015 08:31:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=s2t51kJPN+LW9pzJJ/qhtpeI6xXfT7B7cb6/+tYTaJU=; b=JystDceNseiVNWcYdepsRCoAsyJmHFWht049IDI3/UQ/m9MKDaYdUCuitDpVtnYqXY uA953fT6cOcCRSLmP4LWmmfz8k6KwVJ+NotB58lfbQlM809B1Ph0C5/eWin9OtyBSsWf dyjp/74v1zKwwlhNI/f+9xSaJBzfGWFrOS2TVajZed+8oDuZi9LtAq2MAG+xVzPOwllK w1mUg47u+b868MlPUKax4+rAmohUm4GNEUFffThuLbxk3GWjaFoj/7UvDatncLz+4aO3 9zwJUQUjenKxYrwtMPbkZBXM+m+ckBtRjXt6SIwV7E9mvMBRYOL6h30frFCJB3To//9O fmMA== X-Gm-Message-State: ALoCoQltcifDsQS0fbtEpb0Ep0Zxc/GuKUWejMsSVk2EWQ9PcKgKi+6fwCgAT5/JUH6SX4iNdMvk X-Received: by 10.180.39.229 with SMTP id s5mr15503404wik.70.1440948684928; Sun, 30 Aug 2015 08:31:24 -0700 (PDT) Received: from [10.223.0.123] ([193.47.165.251]) by smtp.googlemail.com with ESMTPSA id gt10sm13628273wib.20.2015.08.30.08.31.23 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 30 Aug 2015 08:31:24 -0700 (PDT) Subject: Re: shrink struct ib_send_wr V3 To: Christoph Hellwig , Doug Ledford , Sean Hefty , Eli Cohen References: <1440579639-10684-1-git-send-email-hch@lst.de> Cc: linux-rdma@vger.kernel.org From: Sagi Grimberg Message-ID: <55E321D7.7000209@dev.mellanox.co.il> Date: Sun, 30 Aug 2015 18:31:35 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <1440579639-10684-1-git-send-email-hch@lst.de> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 > - patch 2 now explicitly replaces the weird overloading in the mlx5 > driver with an explicit embedding of struct ib_send_wr, similar > to what we do for all other MRs. That's nice, There is one non-trivial spot that was missed in mlx5_ib_post_send though: size += sizeof(struct mlx5_wqe_umr_ctrl_seg) / 16; Care to fold this in? Cheers, Sagi. --- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c index 7ddfb74..35a18d6 100644 --- a/drivers/infiniband/hw/mlx5/qp.c +++ b/drivers/infiniband/hw/mlx5/qp.c @@ -2802,7 +2802,7 @@ int mlx5_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, goto out; } qp->sq.wr_data[idx] = MLX5_IB_WR_UMR; - ctrl->imm = cpu_to_be32(fast_reg_wr(wr)->rkey); + ctrl->imm = cpu_to_be32(umr_wr(wr)->mkey); set_reg_umr_segment(seg, wr); seg += sizeof(struct mlx5_wqe_umr_ctrl_seg);