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 7B0D7A034F; Thu, 1 Apr 2021 00:53:38 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F4207140F1E; Thu, 1 Apr 2021 00:53:37 +0200 (CEST) Received: from new2-smtp.messagingengine.com (new2-smtp.messagingengine.com [66.111.4.224]) by mails.dpdk.org (Postfix) with ESMTP id 349C840142 for ; Thu, 1 Apr 2021 00:53:36 +0200 (CEST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailnew.nyi.internal (Postfix) with ESMTP id A67C05808F5; Wed, 31 Mar 2021 18:53:35 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Wed, 31 Mar 2021 18:53:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm3; bh= A6iAhvoKbO/JU1zVhglmrukpNt2RV/jRZIDGRrrqnZQ=; b=o+ycWTzwUN5UOCga Xbw/rNNoNe2uUj8l9eXJszF33Yv+Vbtvp0I/G1SqZrfUeLeHr2XM2xgKUEM0iQez T8JIrlD/E1uv7tAMy6mCPfiafuoSv4lfLT1QCs7/tf+ncMiL8/dPUX6KcntrQ030 QcSU016xpjftjNV0NHQvzWGX/z2Df02QZhv1epQaGY75kTHR4CgQY+90PFcnSAL3 PeoZpLEixNct7qDbFP0mdDw5NFAEBSLlaLN0Ll4c+4M0MXZ8/pZtXFnO7fJtsEqS vR5f+vHZSo3hjIVapbjseVBVjeoUKnjPh6zbAKgjXANFLDdsvSdvLpNWZxc0kjNL OCpU9Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=A6iAhvoKbO/JU1zVhglmrukpNt2RV/jRZIDGRrrqn ZQ=; b=PcGKU3bGvXJNncghaNpJxoZKvzD2dLv5f7RNemysBF+Ul8U4GdzkvAteS YUghEa/Vf6PvA62LqjEUT8Scc5GlA2/rZ/z9A5wHIAk3tawNqBOjp/WrQv1lgZcC Hq4KyTlLv1DQHAyywxj2w1oF+sILRRW2hDuy+1kIeqe+rG1rBPRF7kJ9i5CV67U2 3MRPcbnG3f92GkUDzlaikkvRwD/JF+pRmLTxrSPjOMaLLV/+4Q9R6yBl0YaHi4x1 PxBJAUFqi2JuwQjLwvew4g82huyv/iyjqUi5CcZIZzw0qIWkmRxJPVfJgV0XjT+X unoynxlEn6OQXfRdT7iMnBlrgAg1Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudeifedgudefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepudeggfdvfeduffdtfeeglefghfeukefgfffhueejtdetuedtjeeu ieeivdffgeehnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl ohhnrdhnvght X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 941211080068; Wed, 31 Mar 2021 18:53:32 -0400 (EDT) From: Thomas Monjalon To: Ray Kinsella 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 Date: Thu, 01 Apr 2021 00:53:30 +0200 Message-ID: <6233379.syC8zv91Vm@thomas> In-Reply-To: <20210331224547.2217759-1-thomas@monjalon.net> References: <20210331224547.2217759-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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" 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.