DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Maxime Leroy <maxime@leroys.fr>
To: dev@dpdk.org
Cc: david.marchand@redhat.com, anatoly.burakov@intel.com,
	sivaprasad.tummala@amd.com, Maxime Leroy <maxime@leroys.fr>
Subject: [PATCH v2 0/6] examples/l3fwd-power: fix Rx interrupt mode for shared FD PMDs
Date: Wed,  9 Sep 2026 17:04:43 +0200	[thread overview]
Message-ID: <20260909150449.856295-1-maxime@leroys.fr> (raw)
In-Reply-To: <20260720080035.673782-1-maxime@leroys.fr>

l3fwd-power's Rx interrupt (one-shot) mode was written around NICs whose
interrupt fd is assigned per queue at setup, stays fixed and is
level-triggered, as on MSI-X hardware. PMDs that do not fit that model
never sleep on interrupts: they either fail to arm, watch an unbound fd,
or miss the wake, and the 10 ms poll timeout hides all of it.

dpaa2 is the motivating example: it delivers Rx interrupts through one
QBMan portal per lcore, so the queues of a lcore share a single fd that
is bound when the interrupt is enabled, not at queue setup; the
notification is edge-triggered on an empty to non-empty transition; and
arming a queue that already holds traffic returns -EAGAIN with the queue
left unarmed.

This series makes the interrupt and legacy loops handle those cases
while leaving MSI-X NICs unchanged:

  1/6 factor the duplicated arm/sleep/disarm block into a helper.
  2/6 check the arm return: on -EAGAIN poll and retry, on any other
      error drop interrupt mode for the lcore instead of sleeping on
      unarmed queues.
  3/6 register the fd in the epoll set after arming, not before, so a
      fd bound at enable time is watched only once it exists.
  4/6 accept -EEXIST when several queues share one fd.
  5/6 recheck the queues before sleeping so a packet that arrived during
      the arm window is not missed under edge-triggered interrupts.
  6/6 block indefinitely instead of on a 10 ms timeout, and wake the
      workers through an eventfd on exit, so a broken interrupt path no
      longer hides behind periodic polling.

v2:
  - 3/6: keep the registration state in struct lcore_conf instead of
    passing it to rx_interrupt_wait(), and restore the "RX interrupt
    won't enable." notice, now logged from the arm error path
    (David Marchand)

Maxime Leroy (6):
  examples/l3fwd-power: factor out Rx interrupt sleep path
  examples/l3fwd-power: check Rx interrupt enable errors
  examples/l3fwd-power: enable Rx interrupt before epoll add
  examples/l3fwd-power: accept shared Rx interrupt FD
  examples/l3fwd-power: recheck Rx queues before sleeping
  examples/l3fwd-power: block until Rx interrupt or exit

 examples/l3fwd-power/main.c | 187 +++++++++++++++++++++++++++++-------
 1 file changed, 153 insertions(+), 34 deletions(-)


base-commit: d55ccd4e6de64e3f797f60de9e81f1d60f849775
-- 
2.43.0


  parent reply	other threads:[~2026-09-09 15:04 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-20  8:00 [PATCH 0/6] examples/l3fwd-power: fix Rx interrupt mode for shared FD PMDs Maxime Leroy
2026-07-20  8:00 ` [PATCH 1/6] examples/l3fwd-power: factor out Rx interrupt sleep path Maxime Leroy
2026-07-20  8:00 ` [PATCH 2/6] examples/l3fwd-power: check Rx interrupt enable errors Maxime Leroy
2026-07-20  8:00 ` [PATCH 3/6] examples/l3fwd-power: enable Rx interrupt before epoll add Maxime Leroy
2026-09-04  9:15   ` David Marchand
2026-07-20  8:00 ` [PATCH 4/6] examples/l3fwd-power: accept shared Rx interrupt FD Maxime Leroy
2026-07-20  8:00 ` [PATCH 5/6] examples/l3fwd-power: recheck Rx queues before sleeping Maxime Leroy
2026-09-04  9:20   ` David Marchand
2026-09-04 20:25     ` Maxime Leroy
2026-07-20  8:00 ` [PATCH 6/6] examples/l3fwd-power: block until Rx interrupt or exit Maxime Leroy
2026-08-25  8:07 ` [PATCH 0/6] examples/l3fwd-power: fix Rx interrupt mode for shared FD PMDs Maxime Leroy
2026-09-04  9:30 ` David Marchand
2026-09-04 21:10   ` Maxime Leroy
2026-09-09 15:04 ` Maxime Leroy [this message]
2026-09-09 15:04   ` [PATCH v2 1/6] examples/l3fwd-power: factor out Rx interrupt sleep path Maxime Leroy
2026-09-09 15:04   ` [PATCH v2 2/6] examples/l3fwd-power: check Rx interrupt enable errors Maxime Leroy
2026-09-09 15:04   ` [PATCH v2 3/6] examples/l3fwd-power: enable Rx interrupt before epoll add Maxime Leroy
2026-09-09 15:04   ` [PATCH v2 4/6] examples/l3fwd-power: accept shared Rx interrupt FD Maxime Leroy
2026-09-09 15:04   ` [PATCH v2 5/6] examples/l3fwd-power: recheck Rx queues before sleeping Maxime Leroy
2026-09-09 15:04   ` [PATCH v2 6/6] examples/l3fwd-power: block until Rx interrupt or exit Maxime Leroy

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=20260909150449.856295-1-maxime@leroys.fr \
    --to=maxime@leroys.fr \
    --cc=anatoly.burakov@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=sivaprasad.tummala@amd.com \
    /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