From patchwork Wed Jun 7 05:54:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sagi Grimberg X-Patchwork-Id: 9770565 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 AD63460393 for ; Wed, 7 Jun 2017 05:54:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9ACC21FF82 for ; Wed, 7 Jun 2017 05:54:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8FF59205A8; Wed, 7 Jun 2017 05:54:45 +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=-5.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, URIBL_BLACK 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 3A63320453 for ; Wed, 7 Jun 2017 05:54:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750940AbdFGFym (ORCPT ); Wed, 7 Jun 2017 01:54:42 -0400 Received: from merlin.infradead.org ([205.233.59.134]:40308 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751008AbdFGFyj (ORCPT ); Wed, 7 Jun 2017 01:54:39 -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=VfsPK9DfajqIbihGGiRIkamwcE8UYSujMe//AB382xg=; b=WqZsUofUfYKSJ563xq38KL3ik bJ0B3P1ImRVledGOICdu3FgHX1IrQB3h3XPYvVgmo8kpGbs93PKVvpyGc6N31rC4o7o4IopzH8Z8h 1VvuPnB0/HJQLk1H99exxqCSTeQgRNn7Gn6oO56sIt/cY3c+c8DvTdxyF7zFOBiNXI5jmxHofJZNO 5mxZSFGb+mxBW1Y25mcjUq8UIJYNbVRQ0a9YfBYIEC6YBS3AJi36gboqjjufcHLhliLxqmA/oUqk/ 548CiPnVNW6QPHEjsR4KA1rYNGvw9H2t5Y2t1exOKT9ee+DPRi7tSO5U2FfXnonWD1MY/F5YSxJe/ VDEozlZjg==; 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 1dITvS-00021m-Dc; Wed, 07 Jun 2017 05:54:38 +0000 From: Sagi Grimberg To: linux-rdma@vger.kernel.org Cc: linux-nvme@lists.infradead.org, Christoph Hellwig , Leon Romanovsky , Saeed Mahameed Subject: [PATCH v4 for-4.13 4/6] mlx5: support ->get_vector_affinity Date: Wed, 7 Jun 2017 08:54:26 +0300 Message-Id: <1496814868-22070-5-git-send-email-sagi@grimberg.me> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1496814868-22070-1-git-send-email-sagi@grimberg.me> References: <1496814868-22070-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 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c index d45772da0963..dc272ece106d 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c @@ -3550,6 +3550,15 @@ 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 pci_irq_get_affinity(dev->mdev->pdev, + MLX5_EQ_VEC_COMP_BASE + comp_vector); +} + static void *mlx5_ib_add(struct mlx5_core_dev *mdev) { struct mlx5_ib_dev *dev; @@ -3682,6 +3691,7 @@ static void *mlx5_ib_add(struct mlx5_core_dev *mdev) dev->ib_dev.get_dev_fw_str = get_dev_fw_str; dev->ib_dev.alloc_rdma_netdev = mlx5_ib_alloc_rdma_netdev; dev->ib_dev.free_rdma_netdev = mlx5_ib_free_rdma_netdev; + dev->ib_dev.get_vector_affinity = mlx5_ib_get_vector_affinity; if (mlx5_core_is_pf(mdev)) { dev->ib_dev.get_vf_config = mlx5_ib_get_vf_config; dev->ib_dev.set_vf_link_state = mlx5_ib_set_vf_link_state;