From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9BDAAA0C44; Mon, 12 Apr 2021 17:04:00 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 30D63141233; Mon, 12 Apr 2021 17:04:00 +0200 (CEST) Received: from dal3relay121.mxroute.com (dal3relay121.mxroute.com [64.40.27.121]) by mails.dpdk.org (Postfix) with ESMTP id 39784141226 for ; Mon, 12 Apr 2021 17:03:58 +0200 (CEST) Received: from filter004.mxroute.com ([149.28.56.236] filter004.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by dal3relay121.mxroute.com (ZoneMTA) with ESMTPSA id 178c69c480f000770d.001 for (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256); Mon, 12 Apr 2021 15:03:54 +0000 X-Zone-Loop: 5866aaf0f59dc936fe3d4b7e163f537b39ad3f0b06c9 X-Originating-IP: [149.28.56.236] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ashroe.eu; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date: Message-ID:From:References:Cc:To:Subject:Sender:Reply-To: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=C2iMxTD4Kd9P8EivASh+cX9rRsYWgPFc2A9PLm/KZGU=; b=kvYsaQGcHMuK3bDrCdynBR8XGP an37D1N7NRS6w9VvK6rpO5XUvVAyl4tum8zND+BMjuea/kFyHuinhKZnXNRszUQkPo/ieDGznJxJC 6rwL80bqnpOYyYjlMIZEionz/MdJ4SZHyq2ZFZAmyFKwDs2PjdmHypoquK6PsaNXz4joDccBO4ITu 1FrBqPeuJkuVv3LHiAbTH97DM92tFMpkHtnlMtyPq4i6jZ4uyd/VL2ruePuPHLmBK7q6B2ci08t3x UldrMamkCsbtgqTjzMo2fG01al5wOmonzPzMGwTkoCmU2c1+soAq0tx3aRmax+mk+dYK3raymwg+o qIyeTvTw==; To: Thomas Monjalon Cc: dev@dpdk.org, hemant.agrawal@nxp.com, rosen.xu@intel.com, sthemmin@microsoft.com, longli@microsoft.com, jerinj@marvell.com, ferruh.yigit@intel.com, andrew.rybchenko@oktetlabs.ru, Matan Azrad , Shahaf Shuler , Viacheslav Ovsiienko , Maxime Coquelin , Chenbo Xia , xuemingl@nvidia.com, david.marchand@redhat.com References: <20210331224547.2217759-1-thomas@monjalon.net> <6233379.syC8zv91Vm@thomas> From: "Kinsella, Ray" Message-ID: <3c60c770-5447-a07e-12dd-bc82c7645465@ashroe.eu> Date: Mon, 12 Apr 2021 16:03:49 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: <6233379.syC8zv91Vm@thomas> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-AuthUser: mdr@ashroe.eu Subject: Re: [dpdk-dev] [PATCH] eal: move DMA mapping from bus-specific to generic driver X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 31/03/2021 23:53, Thomas Monjalon wrote: > 01/04/2021 00:45, Thomas Monjalon: >> The operations of DMA mapping and unmapping are controlled in some >> bus drivers, following rte_bus specification. >> If the device driver don't provide any specific mapping operation, >> the bus driver may have a fallback (VFIO case for PCI). >> >> The DMA mapping done by the device drivers are called >> from the bus drivers via function pointers in bus-specific structures: >> rte_vdev_driver and rte_pci_driver. >> >> The device driver DMA mapping is not specific to the bus, >> so it can be generalized to all device drivers, based on rte_device. >> That's why the function pointers dma_map and dma_unmap >> are moved to rte_driver, avoiding useless casts of device object. >> >> The function prototypes rte_dev_dma_map_t and rte_dev_dma_unmap_t >> are removed from rte_bus.h because the definition in rte_dev.h is enough, >> but they are still used in rte_bus for bus drivers, >> while being added in rte_driver for device drivers, >> and removed from rte_vdev_driver/rte_pci_driver. >> >> The impacted device drivers are mlx5 (PCI) and virtio_user (vdev). >> >> Signed-off-by: Thomas Monjalon >> --- >> Depends-on: series-16017 ("pci: add rte prefix") >> --- >> drivers/bus/pci/pci_common.c | 8 ++-- >> drivers/bus/pci/rte_bus_pci.h | 40 -------------------- >> drivers/bus/vdev/rte_bus_vdev.h | 40 -------------------- >> drivers/bus/vdev/vdev.c | 32 +++++----------- >> drivers/common/mlx5/mlx5_common_pci.c | 30 ++++++++------- >> drivers/net/mlx5/mlx5.c | 4 +- >> drivers/net/mlx5/mlx5_mr.c | 50 +++++++++++++------------ >> drivers/net/mlx5/mlx5_rxtx.h | 4 +- >> drivers/net/virtio/virtio_user_ethdev.c | 22 +++++------ >> lib/librte_eal/include/rte_bus.h | 42 --------------------- >> lib/librte_eal/include/rte_dev.h | 49 +++++++++++++++++++++++- >> 11 files changed, 117 insertions(+), 204 deletions(-) > > The ABI checker reports some issues on the driver interface. > It needs to be carefully analyzed, because driver interface > should not be part of the ABI compatibility contract. > The depends-on series-16017 is marked as superseded. This patch doesn't apply cleanly, even when the depends-on series is applied before it. Ray K