On 2/26/26 3:41 PM, David Marchand wrote:
> On Thu, 19 Feb 2026 at 15:39, Kevin Traynor <[email protected]> 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 <[email protected]>
> 
> 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.
> 

Sounds good to me. I think it's generic enough to be public, but as you
say the only known use at present is for mlx5, so let's keep internal so
we are less restricted if we wanted to change it etc.

> And on the name itself, maybe: rte_intr_active_event_flags() ?
> 

Fine for me, it adds a bit more description.

> [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()
> 
> 

Ack. I will update on next version. Thanks David.

Slava/Dariusz, does this address your concerns from previous version,
any other concerns/comments from mlx5 perspective?

Reply via email to