From patchwork Mon Jul 10 07:17:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sagi Grimberg X-Patchwork-Id: 9832381 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 0D4A760318 for ; Mon, 10 Jul 2017 07:18:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA2BA27FB7 for ; Mon, 10 Jul 2017 07:18:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CF0812841C; Mon, 10 Jul 2017 07:18:00 +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 783EF283C4 for ; Mon, 10 Jul 2017 07:18:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751163AbdGJHR5 (ORCPT ); Mon, 10 Jul 2017 03:17:57 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:46912 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752276AbdGJHR4 (ORCPT ); Mon, 10 Jul 2017 03:17:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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=xci01NVYMhM1ZAvR0gP/WPbaFffzZXSNSgsU4wtCHoc=; b=kRHNxWSw69vRnDsQ31BBZzxlu Jah/Rkoi4F09ud8hy1VnQsfPuVNsDaJqr4EwKLYIQypQfgrTyoAsQm9uACVigTxIGkxyIq9R7DEnl cBgVb9BXEop8EwZTNphduD3CpCekRC7O4wX7WSyQKZR0KFmslM7QLlxqFgyE5hebul+Fb2GjFXunp qBVhHKFV8/xiRiW6V8CcJhOB4wGCV9qI2pehvwQp2AQheFyX+2TRjwpygdwNuG8E31u4Z+GL3oGYx jR7uuMBYT7EBmIwOJv8+Bke7JAhsGp5hz90R7EJLOS53NmPe2xkkTbd0K4Ap/pkk8obw1TNnhuJW6 1Tc4qf1EQ==; Received: from bzq-82-81-101-184.red.bezeqint.net ([82.81.101.184] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.87 #1 (Red Hat Linux)) id 1dUSx3-0008H4-FZ; Mon, 10 Jul 2017 07:17:49 +0000 From: Sagi Grimberg To: Doug Ledford , linux-rdma@vger.kernel.org Cc: linux-nvme@lists.infradead.org, Christoph Hellwig , Leon Romanovsky , Saeed Mahameed Subject: [PATCH v7 for-4.13 5/7] mlx5: support ->get_vector_affinity Date: Mon, 10 Jul 2017 10:17:32 +0300 Message-Id: <1499671054-23899-6-git-send-email-sagi@grimberg.me> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1499671054-23899-1-git-send-email-sagi@grimberg.me> References: <1499671054-23899-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 2a55372b7da2..8a02e39f5a32 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c @@ -3561,6 +3561,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; @@ -3691,6 +3699,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;