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 EA707A034F; Thu, 1 Apr 2021 10:40:34 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B4C2C140ED6; Thu, 1 Apr 2021 10:40:34 +0200 (CEST) Received: from mail-109-mta72.mxroute.com (mail-109-mta72.mxroute.com [136.175.109.72]) by mails.dpdk.org (Postfix) with ESMTP id 09EB840142 for ; Thu, 1 Apr 2021 10:40:32 +0200 (CEST) Received: from filter004.mxroute.com ([149.28.56.236] filter004.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-109-mta72.mxroute.com (ZoneMTA) with ESMTPSA id 1788c9752b70004964.001 for (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256); Thu, 01 Apr 2021 08:40:30 +0000 X-Zone-Loop: 9073be2e7e25591051abcba4063e171465d11a772b28 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=qHvWATpsjxnsBul47xBizFMR+9r+sjjL0deSkuIfa5Y=; b=AvMOExgWSs559WNvq0WpiN3rEE ecRKe7aL8biqd2p9/Dwzo+Fc5Hfld4i5vHrH5/R49Cgs/+Wby1Tk9S352sZ1rStGIrdOKQ4y2h4v3 /nJwwoCjFr4cAjdFbtMsfsHHWGTTwIxoVlDgwqTN9wJ+Ua2GSO4Ff8lDGN8qzUN8yzj/35SlzbqnW 3t+HPeFDoZHvuTOZx1BGBkPwMpLgzPFEBWs4/zktq2BTSMyzAB8eBF3JPv44Vo0Qn2qJRIq6PkeUG gSxNmKM0NvxzsbiV88X5FPQ1Cg9VjF8abaaRd8JIElycB7M/fi5tP2k7Lmo4sSczXhk+qPZlbt2x4 OZ2v0M8Q==; 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: <392f5e00-a719-4419-bf3b-e781e2791649@ashroe.eu> Date: Thu, 1 Apr 2021 09:40:25 +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. > ok - I will take a look.