From patchwork Thu Jul 13 08:09:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sagi Grimberg X-Patchwork-Id: 9837973 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8409E603F9 for ; Thu, 13 Jul 2017 08:10:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7A2FA286D1 for ; Thu, 13 Jul 2017 08:10:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6BBB828705; Thu, 13 Jul 2017 08:10:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0AC2628701 for ; Thu, 13 Jul 2017 08:10:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751394AbdGMIKF (ORCPT ); Thu, 13 Jul 2017 04:10:05 -0400 Received: from merlin.infradead.org ([205.233.59.134]:41264 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751257AbdGMIKD (ORCPT ); Thu, 13 Jul 2017 04:10:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=BviqCZ0NHGBFclxugnxciKNSEpGw8zjgOFo/RPiMNIE=; b=LoD2BpzzaH3juy/+wjOU7D2OC mTco7MVOddPxz/3Z6CSywz6y48tPzmh6bVH7sSxq0fPlClhyCjOxdwLiLdkF6LArkcS+W3j//vRzI ulRHnxnV6fBclWcILhBFpog6Hv1WYgLDcI0wmj6h71a0ee4ER/FZR5OdzP7ePd1z1w2+n4m+PrJLT QQrdchmldorbb+/LS6uG94lTOoGw4LWDVGSDy6BzrAOP3QxD20De5v2LiYs1NEzY2+JtRzOADQWnA lr4ir4yPpPRMTAoWslOobYknA/7rIvNLXTrVuVUkh8QV2dZmQoSXP8WBah1b020WgXSI/0Qu783Bz TyrQnxxog==; Received: from bzq-82-81-101-184.red.bezeqint.net ([82.81.101.184] helo=bombadil.infradead.org) by merlin.infradead.org with esmtpsa (Exim 4.87 #1 (Red Hat Linux)) id 1dVZC7-0001wt-MS; Thu, 13 Jul 2017 08:09:56 +0000 From: Sagi Grimberg To: Doug Ledford Cc: linux-rdma@vger.kernel.org, linux-nvme@lists.infradead.org, Christoph Hellwig , Leon Romanovsky , Saeed Mahameed Subject: [PATCH v8 5/7] mlx5: support ->get_vector_affinity Date: Thu, 13 Jul 2017 11:09:42 +0300 Message-Id: <1499933384-17407-6-git-send-email-sagi@grimberg.me> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1499933384-17407-1-git-send-email-sagi@grimberg.me> References: <1499933384-17407-1-git-send-email-sagi@grimberg.me> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Simply refer to the generic affinity mask helper. Reviewed-by: Christoph Hellwig Acked-by: Leon Romanovsky Signed-off-by: Sagi Grimberg --- drivers/infiniband/hw/mlx5/main.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c index 9ecc089d4529..2b09a3c69c26 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c @@ -3562,6 +3562,14 @@ static void mlx5_ib_free_rdma_netdev(struct net_device *netdev) return mlx5_rdma_netdev_free(netdev); } +const struct cpumask *mlx5_ib_get_vector_affinity(struct ib_device *ibdev, + int comp_vector) +{ + struct mlx5_ib_dev *dev = to_mdev(ibdev); + + return mlx5_get_vector_affinity(dev->mdev, comp_vector); +} + static void *mlx5_ib_add(struct mlx5_core_dev *mdev) { struct mlx5_ib_dev *dev; @@ -3692,6 +3700,7 @@ static void *mlx5_ib_add(struct mlx5_core_dev *mdev) dev->ib_dev.check_mr_status = mlx5_ib_check_mr_status; dev->ib_dev.get_port_immutable = mlx5_port_immutable; dev->ib_dev.get_dev_fw_str = get_dev_fw_str; + dev->ib_dev.get_vector_affinity = mlx5_ib_get_vector_affinity; if (MLX5_CAP_GEN(mdev, ipoib_enhanced_offloads)) { dev->ib_dev.alloc_rdma_netdev = mlx5_ib_alloc_rdma_netdev; dev->ib_dev.free_rdma_netdev = mlx5_ib_free_rdma_netdev;