Questions about interrupts
Stephen Hemminger
stephen at networkplumber.org
Sat Feb 15 16:59:03 CET 2025
On Sat, 15 Feb 2025 10:55:45 -0500
Alan Beadle <ab.beadle at gmail.com> wrote:
> > After enabling interrupts, the application should do one more call to rx_burst
> > which will see if there any packets that raced in.
> > If it does get some packets, chances are you want to disable interrupts
> > and go back to polling mode.
>
> As I'm sure you are aware, polling one more time would not change the
> likelihood that additional packets arrive and disarm the interrupt
> before the thread suspends. A packet could still arrive between that
> polling round and the call to rte_epoll_wait(). Is there really no way
> to atomically arm the interrupt and suspend, guaranteeing that my
> thread will never suspend if packets have arrived prior to suspending?
The interrupts are edge-triggered so the state of the interrupt is recorded.
Using epoll, the device is reading the state out of the MSI-x register,
and before going to sleep epoll does a "do you you have anything" check
for all sources.
More information about the users
mailing list