From patchwork Wed Nov 17 13:39:43 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Cohen X-Patchwork-Id: 332871 X-Patchwork-Delegate: roland@digitalvampire.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oAHDdVdQ003140 for ; Wed, 17 Nov 2010 13:39:31 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933682Ab0KQNjb (ORCPT ); Wed, 17 Nov 2010 08:39:31 -0500 Received: from mail-ey0-f174.google.com ([209.85.215.174]:34093 "EHLO mail-ey0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932433Ab0KQNja (ORCPT ); Wed, 17 Nov 2010 08:39:30 -0500 Received: by eye27 with SMTP id 27so1125961eye.19 for ; Wed, 17 Nov 2010 05:39:29 -0800 (PST) Received: by 10.204.114.210 with SMTP id f18mr8856234bkq.51.1290001168986; Wed, 17 Nov 2010 05:39:28 -0800 (PST) Received: from localhost ([82.166.227.17]) by mx.google.com with ESMTPS id d12sm1326697bkw.7.2010.11.17.05.39.27 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 17 Nov 2010 05:39:28 -0800 (PST) Date: Wed, 17 Nov 2010 15:39:43 +0200 From: Eli Cohen To: Roland Dreier Cc: RDMA list Subject: [PATCH] mlx4: Fix vlan insertion order Message-ID: <20101117133943.GA10589@mtldesk30> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Wed, 17 Nov 2010 13:39:32 +0000 (UTC) diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c index ec2c9bb..3d0c6d7 100644 --- a/drivers/infiniband/hw/mlx4/qp.c +++ b/drivers/infiniband/hw/mlx4/qp.c @@ -1953,14 +1953,14 @@ int mlx4_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, goto out; } - ctrl->owner_opcode = mlx4_ib_opcode[wr->opcode] | - (ind & qp->sq.wqe_cnt ? cpu_to_be32(1 << 31) : 0) | blh; - if (be16_to_cpu(vlan) < 0x1000) { ctrl->ins_vlan = 1 << 6; ctrl->vlan_tag = vlan; } + ctrl->owner_opcode = mlx4_ib_opcode[wr->opcode] | + (ind & qp->sq.wqe_cnt ? cpu_to_be32(1 << 31) : 0) | blh; + stamp = ind + qp->sq_spare_wqes; ind += DIV_ROUND_UP(size * 16, 1U << qp->sq.wqe_shift);