From patchwork Mon Oct 26 11:18:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 298592 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5520FC55178 for ; Mon, 26 Oct 2020 11:20:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0475F2464E for ; Mon, 26 Oct 2020 11:20:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603711226; bh=qk8PmsDBuQCH8e0JRhhBr0jHNe14EM3J0vorow/ddL8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=K4N+/FJoYbP2Shc1o7GcUsrPxsbwuD/Hk0CZIg1vp6Vu2owjwkiFYD9UufWHCQ3vF wTwvmkTJ80yDbnqjPCTxuhynGLTWr7CqUSW6kB31HFHRfTF74fs+vHsQLed0UcsoQi OMx+CgZsghxMtH/mPgQuJ8ilgn55JckV22dRAWi0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1773490AbgJZLUV (ORCPT ); Mon, 26 Oct 2020 07:20:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:48052 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1773319AbgJZLTM (ORCPT ); Mon, 26 Oct 2020 07:19:12 -0400 Received: from localhost (unknown [213.57.247.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 56E1822403; Mon, 26 Oct 2020 11:19:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603711151; bh=qk8PmsDBuQCH8e0JRhhBr0jHNe14EM3J0vorow/ddL8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XLs6d8Mf5LX6XFU31dV/4/bDbXn33Z42d2Ah4RJkXbB6UcGjLa05Lmfc4RxJoSmSI /EHigOIQLe1vrOEB2DqTOxLB7MWB4bzAmVlIginBv8eyv2L1UKur3TdyoWkr+OUchn 2wJRMI7RdeUXqv+mKJCTN59l23Em6gSy/QhgCHaE= From: Leon Romanovsky To: Doug Ledford , Jason Gunthorpe Cc: Leon Romanovsky , Jakub Kicinski , Jason Wang , linux-rdma@vger.kernel.org, "Michael S. Tsirkin" , netdev@vger.kernel.org, Parav Pandit , Roi Dayan , Saeed Mahameed , virtualization@lists.linux-foundation.org, alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, "David S . Miller" , ranjani.sridharan@linux.intel.com, pierre-louis.bossart@linux.intel.com, fred.oh@linux.intel.com, shiraz.saleem@intel.com, dan.j.williams@intel.com, kiran.patil@intel.com, linux-kernel@vger.kernel.org Subject: [PATCH mlx5-next 04/11] vdpa/mlx5: Make hardware definitions visible to all mlx5 devices Date: Mon, 26 Oct 2020 13:18:42 +0200 Message-Id: <20201026111849.1035786-5-leon@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201026111849.1035786-1-leon@kernel.org> References: <20201026111849.1035786-1-leon@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Leon Romanovsky Move mlx5_vdpa IFC header file to the general include folder, so mlx5_core will be able to reuse it to check if VDPA is supported prior to creating an auxiliary device. As part of this move, update the header file name to mlx5 general naming scheme. Reviewed-by: Parav Pandit Signed-off-by: Leon Romanovsky --- drivers/vdpa/mlx5/net/main.c | 2 +- drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 +- .../mlx5_vdpa_ifc.h => include/linux/mlx5/mlx5_ifc_vdpa.h | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) rename drivers/vdpa/mlx5/core/mlx5_vdpa_ifc.h => include/linux/mlx5/mlx5_ifc_vdpa.h (97%) -- 2.26.2 diff --git a/drivers/vdpa/mlx5/net/main.c b/drivers/vdpa/mlx5/net/main.c index 838cd98386ff..4dd3f00f2306 100644 --- a/drivers/vdpa/mlx5/net/main.c +++ b/drivers/vdpa/mlx5/net/main.c @@ -4,7 +4,7 @@ #include #include #include -#include "mlx5_vdpa_ifc.h" +#include #include "mlx5_vnet.h" MODULE_AUTHOR("Eli Cohen "); diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c index 1fa6fcac8299..6c218b47b9f1 100644 --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c @@ -9,8 +9,8 @@ #include #include #include +#include #include "mlx5_vnet.h" -#include "mlx5_vdpa_ifc.h" #include "mlx5_vdpa.h" #define to_mvdev(__vdev) container_of((__vdev), struct mlx5_vdpa_dev, vdev) diff --git a/drivers/vdpa/mlx5/core/mlx5_vdpa_ifc.h b/include/linux/mlx5/mlx5_ifc_vdpa.h similarity index 97% rename from drivers/vdpa/mlx5/core/mlx5_vdpa_ifc.h rename to include/linux/mlx5/mlx5_ifc_vdpa.h index f6f57a29b38e..97784098a992 100644 --- a/drivers/vdpa/mlx5/core/mlx5_vdpa_ifc.h +++ b/include/linux/mlx5/mlx5_ifc_vdpa.h @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */ /* Copyright (c) 2020 Mellanox Technologies Ltd. */ -#ifndef __MLX5_VDPA_IFC_H_ -#define __MLX5_VDPA_IFC_H_ +#ifndef __MLX5_IFC_VDPA_H_ +#define __MLX5_IFC_VDPA_H_ #include @@ -165,4 +165,4 @@ struct mlx5_ifc_modify_virtio_net_q_out_bits { struct mlx5_ifc_general_obj_out_cmd_hdr_bits general_obj_out_cmd_hdr; }; -#endif /* __MLX5_VDPA_IFC_H_ */ +#endif /* __MLX5_IFC_VDPA_H_ */