[dpdk-dev] [PATCH] examples/vhost: fix ioat ring space in callbacks

Thomas Monjalon thomas at monjalon.net
Wed Apr 7 10:43:36 CEST 2021


+Cc more people to start a discussion about a potential DMA API.
If you think it is interesting, we can start a fresh discussion thread.

07/04/2021 10:26, Thomas Monjalon:
> 07/04/2021 09:47, Maxime Coquelin:
> > 
> > On 3/17/21 6:40 AM, Cheng Jiang wrote:
> > > We use ioat ring space for determining if ioat callbacks can enqueue a
> > > packet to ioat device. But there is one slot can't be used in ioat
> > > ring due to the ioat driver design, so we need to reduce one slot in
> > > ioat ring to prevent ring size mismatch in ioat callbacks.
[...]
> > > --- a/examples/vhost/ioat.c
> > > +++ b/examples/vhost/ioat.c
> > > @@ -113,7 +113,7 @@ open_ioat(const char *value)
> > >  			goto out;
> > >  		}
> > >  		rte_rawdev_start(dev_id);
> > > -		cb_tracker[dev_id].ioat_space = IOAT_RING_SIZE;
> > > +		cb_tracker[dev_id].ioat_space = IOAT_RING_SIZE - 1;
> > 
> > That really comforts me in thinking we need a generic abstraction for
> > DMA devices. How is the application developer supposed to know that
> > the DMA driver has such weird limitations?
> 
> Having a generic DMA API may be interesting.
> Do you know any other HW candidate for such an API?
> Do you think rte_memcpy can be used as a SW driver?





More information about the dev mailing list