[PATCH v4 2/3] eal/interrupt: add interrupt event info
David Marchand
david.marchand at redhat.com
Thu Feb 26 16:41:50 CET 2026
On Thu, 19 Feb 2026 at 15:39, Kevin Traynor <ktraynor at redhat.com> wrote:
>
> Add RTE_INTR_EVENT_* defines and a new API rte_intr_active_events()
> in order to retrieve them.
>
> As the events are in the context of the current interrupt,
> rte_intr_active_events() must be called from the context of
> an interrupt callback.
>
> Signed-off-by: Kevin Traynor <ktraynor at redhat.com>
I have mixed feelings about letting this API in the open.
We only have one user (the mlx5 driver), so I would mark it internal
for now, and open later if some external user asks for it.
And on the name itself, maybe: rte_intr_active_event_flags() ?
[snip]
> diff --git a/lib/eal/include/rte_interrupts.h b/lib/eal/include/rte_interrupts.h
> index 1b9a0b2a78..bff4f98f85 100644
> --- a/lib/eal/include/rte_interrupts.h
> +++ b/lib/eal/include/rte_interrupts.h
> @@ -40,4 +40,10 @@ struct rte_intr_handle;
> #define RTE_INTR_VEC_RXTX_OFFSET 1
>
> +/** Interrupt event flags returned by rte_intr_active_events() */
> +#define RTE_INTR_EVENT_IN (1 << 0) /**< Data available to read */
> +#define RTE_INTR_EVENT_ERR (1 << 1) /**< Error condition on fd */
> +#define RTE_INTR_EVENT_HUP (1 << 2) /**< Hang up / disconnect */
> +#define RTE_INTR_EVENT_RDHUP (1 << 3) /**< Read Hang up / disconnect */
Nit: RTE_BIT32()
--
David Marchand
More information about the dev
mailing list