From patchwork Sat Feb 20 07:47:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 8365831 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 E0ACE9FC88 for ; Sat, 20 Feb 2016 07:48:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F2FB620513 for ; Sat, 20 Feb 2016 07:48:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1010B2051A for ; Sat, 20 Feb 2016 07:48:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758119AbcBTHsp (ORCPT ); Sat, 20 Feb 2016 02:48:45 -0500 Received: from mail-wm0-f47.google.com ([74.125.82.47]:37496 "EHLO mail-wm0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758121AbcBTHsh (ORCPT ); Sat, 20 Feb 2016 02:48:37 -0500 Received: by mail-wm0-f47.google.com with SMTP id g62so99396189wme.0 for ; Fri, 19 Feb 2016 23:48:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leon-nu.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=A07Xe8mRlswI/r977ervdd8qC7pzrLcTE/WM6flH9jA=; b=c1XhlgmC+1AP68TkFSAZkME7/fyxZx5xt7Xu64UVCaI0UAooeygg5Y/70yvSgN9vrc bcCJ+tu28wUvM0EiZqSybeHA/31RuiS0BTeXTmkq0mw6qvgBskreorTCUvQr0OWxDEKi qQ1925P6HyPdh95ZfPFF8abnh4LIdaeSN9gEEagQGB5Ex9nltP3uyaBv4xBDWr4AXQ9B 0iLQzaQjRS/Pj5fNrNNP9TLIv02mNP1QV3nKw9pRx9vME+TCgej4E4/tRXAQ8uRyTtDa ujHH81tozs26F5/tj4sWzwwaJ+ECuH1sm8jWhUB8C3PsB0+JUjvDIyAcxRsJP0CCibzB UoIQ== 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:in-reply-to :references; bh=A07Xe8mRlswI/r977ervdd8qC7pzrLcTE/WM6flH9jA=; b=Sl8x3h2Sh9fCK8wzTHWLb9igijZe10b/Bmpd0aTfj/2QH+/8nWdFDCcOSXdshwhFXP BL+CnV0iCjntFpiJu8k9qqJVrSU9aPOSEk7cB/i0OA6B3yfGGSX0pmpmrc6oz1VT+OH7 aywZ4Sev8/EVpxb7uQot0yfOIdxvbL3oe2GcD1th4Meg9VgGll9ARwpgcRXXjasfXPxK 4hhsE69Q2xlFmU/q7S/dxCKR5T74DF9qfjidRfawJVjyg6aduNS0d+VFAcFvYXsCYvo6 Ks8Ntnj7wA1ucnRIHJo9D/wOeayWaUt7rubXORf3t0K1rLXvneUZFn2E0u9qz2v8UTyS Kemg== X-Gm-Message-State: AG10YORqZWXfwwzQ1donBXbEAA0B6NK4y2GLQxdDy6F4mkciAdaA3bd2RpE6kEtWXtvRGg== X-Received: by 10.194.184.139 with SMTP id eu11mr19990468wjc.169.1455954516794; Fri, 19 Feb 2016 23:48:36 -0800 (PST) Received: from localhost ([213.57.247.249]) by smtp.gmail.com with ESMTPSA id xx3sm14500205wjc.32.2016.02.19.23.48.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Feb 2016 23:48:35 -0800 (PST) From: Leon Romanovsky To: dledford@redhat.com, saeedm@mellanox.com Cc: linux-rdma@vger.kernel.org, Leon Romanovsky Subject: [PATCH rdma-next 6/8] IB/core: Add offload arithmetic operations support Date: Sat, 20 Feb 2016 09:47:43 +0200 Message-Id: <1455954465-15141-7-git-send-email-leon@leon.nu> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1455954465-15141-1-git-send-email-leon@leon.nu> References: <1455954465-15141-1-git-send-email-leon@leon.nu> 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.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,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 From: Leon Romanovsky The offload arithmetic operations support allows to the user to benefit from the parallel calculation of several input vectors of equal length. The newly added flag indicates this ability. Signed-off-by: Leon Romanovsky Reviewed-by: Matan Barak Acked-by: Max Gurtovoy --- drivers/infiniband/core/uverbs_cmd.c | 3 +++ include/rdma/ib_verbs.h | 8 +++++++- include/uapi/rdma/ib_user_verbs.h | 5 +++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c index 6887252..3a3f573 100644 --- a/drivers/infiniband/core/uverbs_cmd.c +++ b/drivers/infiniband/core/uverbs_cmd.c @@ -3638,6 +3638,9 @@ int ib_uverbs_ex_query_device(struct ib_uverbs_file *file, resp.hca_core_clock = attr.hca_core_clock; resp.response_length += sizeof(resp.hca_core_clock); + resp.device_cap_flags2 = upper_32_bits(attr.device_cap_flags); + resp.response_length += sizeof(resp.device_cap_flags2); + end: err = ib_copy_to_udata(ucore, &resp, resp.response_length); return err; diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 2ff1fd1..51aabf8 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -208,10 +208,16 @@ enum ib_device_cap_flags { * of I/O operations with single completion queue managed * by hardware. */ - IB_DEVICE_CROSS_CHANNEL = (1 << 27), + IB_DEVICE_CROSS_CHANNEL = (1 << 27), IB_DEVICE_MANAGED_FLOW_STEERING = (1 << 29), IB_DEVICE_SIGNATURE_HANDOVER = (1 << 30), IB_DEVICE_ON_DEMAND_PAGING = (1 << 31), + /* + * The offload arithmetic operations support allows to + * the user to benefit from the parallel calculation of + * several input vectors of equal length. + */ + IB_DEVICE_VECTOR_CALC = (1ULL << 32), }; enum ib_signature_prot_cap { diff --git a/include/uapi/rdma/ib_user_verbs.h b/include/uapi/rdma/ib_user_verbs.h index 8126c14..e024c82 100644 --- a/include/uapi/rdma/ib_user_verbs.h +++ b/include/uapi/rdma/ib_user_verbs.h @@ -226,6 +226,11 @@ struct ib_uverbs_ex_query_device_resp { struct ib_uverbs_odp_caps odp_caps; __u64 timestamp_mask; __u64 hca_core_clock; /* in KHZ */ + /* + * Original capability field is limited + * by __u32 variable. Need to increase this field + */ + __u64 device_cap_flags2; }; struct ib_uverbs_query_port {