DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Kinsella, Ray" <mdr@ashroe.eu>
To: Thomas Monjalon <thomas@monjalon.net>
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 <matan@nvidia.com>,
	Shahaf Shuler <shahafs@nvidia.com>,
	Viacheslav Ovsiienko <viacheslavo@nvidia.com>,
	Maxime Coquelin <maxime.coquelin@redhat.com>,
	Chenbo Xia <chenbo.xia@intel.com>,
	xuemingl@nvidia.com, david.marchand@redhat.com
Subject: Re: [dpdk-dev] [PATCH] eal: move DMA mapping from bus-specific to generic driver
Date: Thu, 1 Apr 2021 09:40:25 +0100	[thread overview]
Message-ID: <392f5e00-a719-4419-bf3b-e781e2791649@ashroe.eu> (raw)
In-Reply-To: <6233379.syC8zv91Vm@thomas>



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 <thomas@monjalon.net>
>> ---
>> 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. 

  reply	other threads:[~2021-04-01  8:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-31 22:45 Thomas Monjalon
2021-03-31 22:53 ` Thomas Monjalon
2021-04-01  8:40   ` Kinsella, Ray [this message]
2021-04-12 15:03   ` Kinsella, Ray

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=392f5e00-a719-4419-bf3b-e781e2791649@ashroe.eu \
    --to=mdr@ashroe.eu \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=chenbo.xia@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=jerinj@marvell.com \
    --cc=longli@microsoft.com \
    --cc=matan@nvidia.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=rosen.xu@intel.com \
    --cc=shahafs@nvidia.com \
    --cc=sthemmin@microsoft.com \
    --cc=thomas@monjalon.net \
    --cc=viacheslavo@nvidia.com \
    --cc=xuemingl@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).