> -----Original Message-----
> From: David Marchand <[email protected]>
> Sent: Wednesday, February 9, 2022 3:05 PM
> To: Ilya Maximets <[email protected]>
> Cc: Kevin Traynor <[email protected]>; Pai G, Sunil
> <[email protected]>; Maxime Coquelin <[email protected]>;
> [email protected]; Mcnamara, John <[email protected]>; Hu, Jiayu
> <[email protected]>; Richardson, Bruce <[email protected]>
> Subject: Re: [ovs-dev] [PATCH RFC dpdk-latest v3 0/1] Enable vhost async
> API's in OvS.
> 
> On Wed, Feb 9, 2022 at 3:01 PM Ilya Maximets <[email protected]> wrote:
> > >> Why this process can't be lockless?
> > >> If we have to lock the device, maybe we can do both submission
> > >> and completion from the thread that polls corresponding Rx queue?
> > >> Tx threads may enqueue mbufs to some lockless ring inside the
> > >> rte_vhost_enqueue_burst.  Rx thread may dequeue them and submit
> > >> jobs to dma device and check completions.  No locks required.
> > >>
> > >
> > > This still means that Rx polling has to be taking place for OVS
> > > Tx to the device to operate.
> > >
> > > Isn't that a new dependency on OVS being pushed from the driver? and
> wouldn't it rule out OVS being able to switch to an interrupt mode, or
> reduce polling in the future if there was no/low packets to Rx.
> > >
> > > Of course, they could be mutually exclusive features that might have
> an opt-in, especially seen as one is performance related and the other is
> about power saving.
> >
> > AFAICT, vhost library doesn't handle interrupts, so OVS will need to
> > implement them, i.e. create private interrupt handle and register
> > all the kickfd descriptors there.  At this point, I think, we might
> > as well create a second private interrupt handle that will listen
> > on fds that Tx thread will kick every time after successful enqueue
> > if dma enqueue is enabled.  This all can happen solely in OVS and we
> > may even have a different wakeup mechanism since we're not bound to
> > use DPDK interrupts, which are just epolls anyway.
> 
> I agree, this is not a blocker for an interrupt mode.
> 
> Just a note, that the vhost library already provides kickfd as part of
> the vring structure.
> A api is available to request notifications from the guest on a specific
> vring.
> (And no experimental API for this!)
> 
> About the DPDK interrupt framework, OVS does not need the epoll stuff
> even for "normal" DPDK devices Rx interrupts.
> eventfds from vfio-pci / other kmods can already be retrieved from
> existing ethdev API without using DPDK interrupt thread/framework.
> 
> 
> >
> > In any case, some extra engineering will be required to support vhost
> > rx interrupts even without dma.
> 
> I have a PoC in my branches.
> I'll send a RFC on this topic, after 22.03-rc1/2.
> 
> 
> >
> > Also, is dma engine capable of generating interrupts?  Does DPDK API
> > support that anyhow?
> 
> Cc: Bruce who may know.
> At least, I see nothing in current dmadev API.
 
You are right, there is nothing in dmadev (yet) for interrupt support. However, 
if necessary, I'm sure it could be added.

/Bruce

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to