From patchwork Wed Apr 14 14:23:01 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Sokolovsky X-Patchwork-Id: 92414 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 o3EEN1hp022571 for ; Wed, 14 Apr 2010 14:23:10 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755710Ab0DNOXJ (ORCPT ); Wed, 14 Apr 2010 10:23:09 -0400 Received: from mail.mellanox.co.il ([194.90.237.43]:48887 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755698Ab0DNOXG (ORCPT ); Wed, 14 Apr 2010 10:23:06 -0400 Received: from Internal Mail-Server by MTLPINE1 (envelope-from vlad@mellanox.co.il) with SMTP; 14 Apr 2010 17:23:01 +0300 Received: from localhost ([10.4.1.80]) by mtlexch01.mtl.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 14 Apr 2010 17:23:01 +0300 Date: Wed, 14 Apr 2010 17:23:01 +0300 From: Vladimir Sokolovsky To: rdreier@cisco.com Cc: linux-rdma@vger.kernel.org Subject: [PATCH V4 1/2] IB/core: Add support for enhanced atomic operations Message-ID: <20100414142300.GB16346@vlad-laptop> Reply-To: vlad@dev.mellanox.co.il MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.17+20080114 (2008-01-14) X-OriginalArrivalTime: 14 Apr 2010 14:23:01.0197 (UTC) FILETIME=[FCF9DFD0:01CADBDD] X-TM-AS-Product-Ver: SMEX-8.0.0.1181-6.000.1038-17318.007 X-TM-AS-Result: No--5.263300-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]); Wed, 14 Apr 2010 14:23:10 +0000 (UTC) diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 09509ed..8ef6858 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -136,6 +136,7 @@ struct ib_device_attr { int max_qp_init_rd_atom; int max_ee_init_rd_atom; enum ib_atomic_cap atomic_cap; + enum ib_atomic_cap masked_atomic_cap; int max_ee; int max_rdd; int max_mw; @@ -467,6 +468,8 @@ enum ib_wc_opcode { IB_WC_LSO, IB_WC_LOCAL_INV, IB_WC_FAST_REG_MR, + IB_WC_MASKED_COMP_SWAP, + IB_WC_MASKED_FETCH_ADD, /* * Set value of IB_WC_RECV so consumers can test if a completion is a * receive by testing (opcode & IB_WC_RECV). @@ -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_MASKED_ATOMIC_CMP_AND_SWP, + IB_WR_MASKED_ATOMIC_FETCH_AND_ADD, }; enum ib_send_flags { @@ -731,6 +736,8 @@ struct ib_send_wr { u64 remote_addr; u64 compare_add; u64 swap; + u64 compare_add_mask; + u64 swap_mask; u32 rkey; } atomic; struct {