[dpdk-dev] [EXT] Re: [PATCH] bus/pci: fix IOVA as VA mode selection
Jerin Jacob Kollanukkaran
jerinj at marvell.com
Mon Jul 8 21:13:28 CEST 2019
See below,
Please send the email as text to avoid formatting issue.(No HTML)
From: David Marchand <david.marchand at redhat.com>
Sent: Tuesday, July 9, 2019 12:09 AM
To: Jerin Jacob Kollanukkaran <jerinj at marvell.com>
Cc: dev <dev at dpdk.org>; Thomas Monjalon <thomas at monjalon.net>; Ben Walker <benjamin.walker at intel.com>; Burakov, Anatoly <anatoly.burakov at intel.com>
Subject: [EXT] Re: [dpdk-dev] [PATCH] bus/pci: fix IOVA as VA mode selection
________________________________________
On Mon, Jul 8, 2019 at 4:25 PM <mailto:jerinj at marvell.com> wrote:
From: Jerin Jacob <mailto:jerinj at marvell.com>
Existing logic fails to select IOVA mode as VA
if driver request to enable IOVA as VA.
IOVA as VA has more strict requirement than other modes,
so enabling positive logic for IOVA as VA selection.
This patch also updates the default IOVA mode as PA
for PCI devices as it has to deal with DMA engines unlike
the virtual devices that may need only IOVA as DC.
We have three cases:
- driver/hw supports IOVA as PA only
[Jerin] It is not driver cap, it is more of system cap(IOMMU vs non IOMMU). We are already addressing that case
- driver/hw supports IOVA as both VA and PA
- driver/hw supports IOVA as VA only
[Jerin] We left with only two options, So one bit from driver is enough to advertise the capability.
Looking at the header:
/** Device driver supports IOVA as VA */
#define RTE_PCI_DRV_IOVA_AS_VA 0X0040
[Jerin] I agree, The name can be RTE_PCI_DRV_NEED_IOVA_AS_VA if there is confusion.
It clearly states that the driver supports IOVA as VA, and not requires.
With only one flag, we can't decide on those three cases and we might want to introduce a new flag for your usecase.
[Jerin] See above.
But, in any case, this is too short for -rc1.
I prefer to nak this patch for now.
[Jerin] Anyway the current patch is wrong with existing definition also i.e If drivers support IOVA as VA it is switching to DC?
Then why do we need IOVA_AS_VA flag from driver. Moreover, from PCI device point of view, Setting default to PA is
More appropriate than DC as Typical PCIe devices we deal in DPDK are bus master which deal with PA or VA.
You can still set --iova-mode=va and we can try to find a solution for -rc2.
[Jerin] The automatic scripts etc will fail on that case. More over, I failed to understand the issue with this patch.
I agree that we can update the logic etc in rc2. But why to break the stuff for rc1 for no reason.
--
David Marchand
More information about the dev
mailing list