From patchwork Mon Feb 1 15:59:59 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Sokolovsky X-Patchwork-Id: 76105 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o11G3wxG011846 for ; Mon, 1 Feb 2010 16:03:58 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754633Ab0BAQD5 (ORCPT ); Mon, 1 Feb 2010 11:03:57 -0500 Received: from mail.mellanox.co.il ([194.90.237.43]:47295 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753157Ab0BAQD4 (ORCPT ); Mon, 1 Feb 2010 11:03:56 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from vlad@mellanox.co.il) with SMTP; 1 Feb 2010 18:03:53 +0200 Received: from localhost ([10.0.18.24]) by mtlexch01.mtl.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 1 Feb 2010 18:00:39 +0200 Date: Mon, 1 Feb 2010 17:59:59 +0200 From: Vladimir Sokolovsky To: Roland Dreier Cc: linux-rdma Subject: [PATCH 1/2] IB/core: Add support for enhanced atomic operations Message-ID: <20100201155959.GA17341@vlad-laptop> Reply-To: Vladimir Sokolovsky MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.17+20080114 (2008-01-14) X-OriginalArrivalTime: 01 Feb 2010 16:00:39.0412 (UTC) FILETIME=[B3008B40:01CAA357] X-TM-AS-Product-Ver: SMEX-8.0.0.1181-6.000.1038-17168.000 X-TM-AS-Result: No--1.903300-8.000000-31 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No 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 (demeter.kernel.org [140.211.167.41]); Mon, 01 Feb 2010 16:03:58 +0000 (UTC) diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 09509ed..e2adeef 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -105,6 +105,7 @@ enum ib_device_cap_flags { IB_DEVICE_UD_TSO = (1<<19), IB_DEVICE_MEM_MGT_EXTENSIONS = (1<<21), IB_DEVICE_BLOCK_MULTICAST_LOOPBACK = (1<<22), + IB_DEVICE_MASKED_ATOMIC = (1<<23), }; enum ib_atomic_cap { @@ -472,7 +473,9 @@ enum ib_wc_opcode { * receive by testing (opcode & IB_WC_RECV). */ IB_WC_RECV = 1 << 7, - IB_WC_RECV_RDMA_WITH_IMM + IB_WC_RECV_RDMA_WITH_IMM, + IB_WC_MASKED_COMP_SWAP, + IB_WC_MASKED_FETCH_ADD }; enum ib_wc_flags { @@ -689,6 +692,8 @@ enum ib_wr_opcode { IB_WR_RDMA_READ_WITH_INV, IB_WR_LOCAL_INV, IB_WR_FAST_REG_MR, + IB_WR_ATOMIC_MASKED_CMP_AND_SWP, + IB_WR_ATOMIC_MASKED_FETCH_AND_ADD, }; enum ib_send_flags { @@ -732,6 +737,8 @@ struct ib_send_wr { u64 compare_add; u64 swap; u32 rkey; + u64 compare_add_mask; + u64 swap_mask; } atomic; struct { struct ib_ah *ah;