On Tue, Oct 25, 2022 at 05:33:31PM +0200, Maxime Coquelin wrote: > > > On 10/25/22 11:15, Hu, Jiayu wrote:
> > > I think that for Vhost PMD, the Virtio completions should either be > > > performed by DMA engine or by a dedicated thread. > > > > We cannot depend on DMA engine to do completion, as there is no > > ordering guarantee on the HW. For example, given the DMA engine > > issues two updates on the used ring's index, it is possible that the second > > write completes before the first one. > > I'm not sure for Intel hardware, but other vendors may offer ordering > guarantees, it should be exposed as a capability of the DMA device. If > the DMA device offers this capability, it could be used for Vhost. > While I haven't been following this discussion, this particular comment caught my eye. For jobs submitted via a single dmadev device, the "FENCE" flag is provided as part of the dmadev API[1]. Obviously, if the writes come from different dmadevs, then things are rather more complicated. /Bruce [1] https://doc.dpdk.org/api/rte__dmadev_8h.html#a3375e7b956b305505073c4ff035afe2f