From: Stephen Hemminger <stephen@networkplumber.org>
To: Alan Beadle <ab.beadle@gmail.com>
Cc: users@dpdk.org
Subject: Re: Questions about interrupts
Date: Sat, 15 Feb 2025 07:59:03 -0800 [thread overview]
Message-ID: <20250215075903.1424c0b0@hermes.local> (raw)
In-Reply-To: <CANTAOdytvC8v7Ar7DF387pOT1PkKNqRzRdYM9eR=XyGjnHtYeA@mail.gmail.com>
On Sat, 15 Feb 2025 10:55:45 -0500
Alan Beadle <ab.beadle@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.
prev parent reply other threads:[~2025-02-15 15:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-13 21:55 Alan Beadle
2025-02-13 22:26 ` Stephen Hemminger
2025-02-15 15:55 ` Alan Beadle
2025-02-15 15:59 ` Stephen Hemminger [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250215075903.1424c0b0@hermes.local \
--to=stephen@networkplumber.org \
--cc=ab.beadle@gmail.com \
--cc=users@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).