On Mon, Jun 30, 2025 at 9:49 PM Pathak, Pravin <pravin.pat...@intel.com> wrote:
>
>
>
> > -----Original Message-----
> > From: Jerin Jacob <jerinjac...@gmail.com>
> > Sent: Monday, June 30, 2025 7:44 AM
> > To: Mattias Rönnblom <hof...@lysator.liu.se>
> > Cc: Pathak, Pravin <pravin.pat...@intel.com>; dev@dpdk.org;
> > jer...@marvell.com; Chen, Mike Ximing <mike.ximing.c...@intel.com>;
> > Richardson, Bruce <bruce.richard...@intel.com>; tho...@monjalon.net;
> > Marchand, David <david.march...@redhat.com>; nipun.gu...@amd.com;
> > chen...@nvidia.com; Sarkar, Tirthendu <tirthendu.sar...@intel.com>; Pavan
> > Nikhilesh <pbhagavat...@marvell.com>; Shijith Thotton
> > <sthot...@marvell.com>; Hemant Agrawal <hemant.agra...@nxp.com>;
> > Sachin Saxena <sachin.sax...@oss.nxp.com>; harry.ch...@intel.com;
> > Mattias Rönnblom <mattias.ronnb...@ericsson.com>
> > Subject: Re: [PATCH v1] event/dlb2: add dequeue interrupt mode support
> >
> > On Mon, Jun 30, 2025 at 4:47 PM Mattias Rönnblom <hof...@lysator.liu.se>
> > wrote:
> > >
> > > On 2025-06-30 11:19, Jerin Jacob wrote:
> > > > On Sat, Jun 28, 2025 at 11:17 AM Pravin Pathak
> > <pravin.pat...@intel.com> wrote:
> > > >>
> > > >> DLB2 port interrupt is implemented using DPDK interrupt framework.
> > > >> This allows eventdev dequeue API to sleep when the port queue is
> > > >> empty and gets wakeup when event arrives at the port. Port dequeue
> > > >> mode is configured using devargs argument port_dequeue_wait.
> > > >> Supported modes are polling and interrupt. Default mode is polling.
> > > >> This commit also adds code to handle device error interrupts and
> > > >> print alarm details.
> > > >>
> > > >> Signed-off-by: Pravin Pathak <pravin.pat...@intel.com>
> > > >> Signed-off-by: Tirthendu Sarkar <tirthendu.sar...@intel.com>
> > > >> ---
> > > >>   doc/guides/eventdevs/dlb2.rst              |  20 +
> > > >>   drivers/event/dlb2/dlb2.c                  | 236 +++++-
> > > >>   drivers/event/dlb2/dlb2_iface.c            |   7 +
> > > >>   drivers/event/dlb2/dlb2_iface.h            |   8 +
> > > >>   drivers/event/dlb2/dlb2_priv.h             |  18 +
> > > >>   drivers/event/dlb2/dlb2_user.h             | 112 +++
> > > >>   drivers/event/dlb2/pf/base/dlb2_hw_types.h |  70 ++
> > > >>   drivers/event/dlb2/pf/base/dlb2_osdep.h    |  46 ++
> > > >>   drivers/event/dlb2/pf/base/dlb2_regs.h     | 149 +++-
> > > >>   drivers/event/dlb2/pf/base/dlb2_resource.c | 825
> > +++++++++++++++++++++
> > > >>   drivers/event/dlb2/pf/base/dlb2_resource.h |   6 +
> > > >>   drivers/event/dlb2/pf/dlb2_pf.c            | 223 ++++++
> > > >>   12 files changed, 1711 insertions(+), 9 deletions(-)
> > > >>
> > > >> diff --git a/doc/guides/eventdevs/dlb2.rst
> > > >> b/doc/guides/eventdevs/dlb2.rst index 8ec7168f20..a4ba857351
> > 100644
> > > >> --- a/doc/guides/eventdevs/dlb2.rst
> > > >> +++ b/doc/guides/eventdevs/dlb2.rst
> > > >> @@ -477,6 +477,26 @@ Example command to use as meson option for
> > credit handling:
> > > >>
> > > >>          meson configure -Dc_args='-DDLB_SW_CREDITS_CHECKS=0 -
> > DDLB_HW_CREDITS_CHECKS=1'
> > > >>
> > > >> +Interrupt Mode Support
> > > >> +~~~~~~~~~~~~~~~~~~~~~~
> > > >> +DLB dequeue supports interrupt mode for the API
> > rte_event_dequeue_burst().
> > > >> +The default port dequeue mode is polling. Dequeue wait mode can be
> > > >> +configured on per eventdev port basis using devargs argument
> > > >> +'port_dequeue_wait'. In interrupt mode, if the port queue is
> > > >> +empty, the application thread will block on the interrupt until a
> > > >> +new event arrives. It enters blocking mode only after any
> > > >> +specified timeout. During the timeout, it will poll the port queue for
> > events as usual. Interrupt mode uses the DPDK interrupt support framework.
> > > >> +
> > > >> +    .. code-block:: console
> > > >> +
> > > >> +       --allow ea:00.0,port_dequeue_wait=all:interrupt
> > > >
> > > > Adding other eventdev PMD mainatainers.
> > > >
> > > > Looks like it can be a generic feature. i.e set this option is
> > > > dev_configure() If there is no objection, Please send a new patch around
> > that.
> > >
> > > I've considered implementing this in DSW, although in a different
> > > manner (with eventfds and poll()).
> > >
> > > The dequeue timeout will still be honored in "interrupt mode", correct?
> > > It wasn't obvious from the description.
> >
> > How is it in Intel PMD?
>
> It would be best if we configure it per port using RTE_EVENT_PORT_CFG_* 
> flags. Will it be, OK?

Yes

> The dequeue timeout will be honored, and the decision to block or return will 
> be made after the timeout.
> If not interrupt, it can be called blocking vs polling mode.  If the port 
> config is fine, I will create a new patch with it.
> Also, we should have this as a capability for eventdevs.

Yes

>
> >
> > >
> > > What's being configured should just be a threshold time at which the
> > > event device would go from busy-polling to blocking the thread.
> > >
> > > Maybe it should be called something with "blocking" or "sleeping",
> > > instead of "interrupt", since interrupts are never directly involved.
> >
> > Agree. or make it a power save mode or so.
> >
> > >
> > > Anyway, seems like a good candidate for a generic feature to me.
> > >

Reply via email to