From patchwork Tue Feb 23 08:25:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 8388941 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 533319F1D4 for ; Tue, 23 Feb 2016 08:29:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 68D9D20612 for ; Tue, 23 Feb 2016 08:29:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7416A20392 for ; Tue, 23 Feb 2016 08:29:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932797AbcBWI3y (ORCPT ); Tue, 23 Feb 2016 03:29:54 -0500 Received: from mail-wm0-f51.google.com ([74.125.82.51]:36379 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932568AbcBWI3y (ORCPT ); Tue, 23 Feb 2016 03:29:54 -0500 Received: by mail-wm0-f51.google.com with SMTP id g62so209752196wme.1 for ; Tue, 23 Feb 2016 00:29:53 -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=iEHmBxVYbvOx/Gu7o/8W86oIJGhRTtofEDUTiJ3zxvB8LbJRwbqecREXV1CDLwZXS2 qaiYVuhC8kdpfIyEmqGseP4zqW1+7J6yuaaXa9MrU8xHDvcAxiTJujIrj+CN+CISr6IU /YsS01MCPl9WpXiyDUiiHrfjN9oe+hd+LlwgGt9606ohELzzOmWWbPGBlGdwWGP/nrMu o9U8qBWvlweYVMu+pSDK2OV81+dqsPuFh6M3uU7wIV0cYX1KJpgr4AxDzwG07JdbiatN usXCAMSc0ICToFEZ7IT1Y4KKC/K76VogmQCYZHKGYD5X+3WwcjRqeFJabaknR3MOFEHZ WH5Q== 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=PT9J2g7yjXvrYBa7M73BRKqS2tkvP4v1C8ddJ4vboFyeAN2WkQUh6dkATVcVTrcx31 Gg6K8CwuwEI/WmX3VwILi9CWUawayUyf9HxL+qlsQhjfYVOs1lKr1K/MwjQEK2vrGk5r 8XQ6+JMo7ps/6gzcUy28VUlNq7X3D+GmhyaF0qzhGreJIUyTYdhEMgfmB3vBjmZJ6iqF WqLHcptjqo9GpW36n7R+79vdr3FVFUmfy+OIbvJn3DP23SdGUQyKygr1PqPMsys6HUkC aqn2Iz5PqS3QP4QEEmCrQGPzFJLxDZJVtT6qvb+5GK4WvoG0E5iHIgZLDp08ouHtKcC3 Y6JQ== X-Gm-Message-State: AG10YOQ1+5Q6DWer+E88f5XvW7qykdV/40pXnTou1nSIYJ2HuJrIVbkvQxFjpKf7bd4gzw== X-Received: by 10.194.63.75 with SMTP id e11mr31856509wjs.79.1456216193023; Tue, 23 Feb 2016 00:29:53 -0800 (PST) Received: from localhost ([213.57.247.249]) by smtp.gmail.com with ESMTPSA id lh1sm28359222wjb.20.2016.02.23.00.29.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Feb 2016 00:29:52 -0800 (PST) From: Leon Romanovsky To: dledford@redhat.com, saeedm@mellanox.com Cc: linux-rdma@vger.kernel.org, Leon Romanovsky Subject: [PATCH rdma-next V1 6/8] IB/core: Add offload arithmetic operations support Date: Tue, 23 Feb 2016 10:25:26 +0200 Message-Id: <1456215928-9305-7-git-send-email-leon@leon.nu> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1456215928-9305-1-git-send-email-leon@leon.nu> References: <1456215928-9305-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 --- 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 {