DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Maxime Leroy <maxime@leroys.fr>
Cc: dev@dpdk.org, hemant.agrawal@nxp.com, sachin.saxena@nxp.com,
	david.marchand@redhat.com
Subject: Re: [PATCH v3 0/6] net/dpaa2: NAPI-style Rx queue interrupts
Date: Fri, 3 Jul 2026 09:03:45 -0700	[thread overview]
Message-ID: <20260703090345.3e4099cd@phoenix.local> (raw)
In-Reply-To: <20260630144329.457643-1-maxime@leroys.fr>

On Tue, 30 Jun 2026 16:43:23 +0200
Maxime Leroy <maxime@leroys.fr> wrote:

> This series lets a dpaa2 worker sleep on a queue's data-availability
> notification instead of busy-polling, exposed through the generic
> rte_eth_dev_rx_intr_* API (NAPI-style: poll while frames keep coming,
> arm the interrupt and sleep when the queue runs dry).
> 
> Why it is not a trivial .rx_queue_intr_enable
> ----------------------------------------------
> A worker wakes on its software portal's DQRI, which fires when the
> portal's DQRR holds frames. The default dpaa2 Rx burst pulls frames
> from the FQ with a volatile dequeue and cannot be interrupt-driven; to
> wake on the DQRI the FQ must instead be pushed to the portal's DQRR.
> 
> The natural dpni_set_queue with a notification destination would have to
> target the worker's portal, but that portal is only known once a worker
> affines, after dev_start, and that MC command holds the global MC lock
> long enough to wedge the firmware while traffic runs. So the bind cannot
> be done late, against the polling lcore.
> 
> Design
> ------
> Each Rx FQ is bound to its own DPCON channel, statically, at dev_start
> while the dpni is still disabled (no knowledge of the polling lcore). A
> worker later subscribes its own ethrx portal to the channel and arms the
> DQRI in rx_queue_intr_enable, a one-shot per-portal op, never the wedging
> set_queue. On a wakeup the worker drains each of its queues by a volatile
> dequeue on the queue's own DPCON channel (one FQ per channel, so no
> per-frame demux); it polls all its queues, the same scheduling contract
> as plain DPDK polling. A queue can be re-homed to another lcore at
> runtime with no set_queue and no port stop.
> 
> This reuses the event PMD's pushed/DQRR model but with one DPCON per FQ
> and static affinity (no QBMan scheduling), so the DPCON allocator is
> moved from the event driver to the fslmc bus and shared.
> 
> Patch 1 disables the DPCON channel before closing it, an event/dpaa2 fix
> the shared allocator depends on. Patches 2 to 4 move the DPCON allocator
> to the fslmc bus, make the portal DQRI epoll optional, and add the
> dpcon_set_notification MC command. Patch 5 adds the interrupt support
> proper; patch 6 pins each DPIO's MSI to the lcore that arms it, a latency
> optimisation.
> 
> Tested on LX2160A (lx2160acex7).
> 
> v3:
> - Reworked the Rx drain. Both versions bind one DPCON per FQ, but v2
>   drained the shared portal DQRR and demuxed frames to their FQ by
>   fqd_ctx, stashing foreign frames in a per-queue FIFO. v3 drains each
>   queue with a volatile dequeue on its own channel (one FQ per channel),
>   which drops the demux and stash code.
> - Dropped the rx_queue_count fix; it is applied to main.
> - Dropped the software VLAN strip patch; an independent net/dpaa2 cleanup,
>   sent standalone and now applied to next-net.
> - Dropped the Depends-on: the ethdev fast-path ops fix is now in main.
> - Split the dpcon_set_notification MC command into its own patch.
> - Added an event/dpaa2 fix to disable the DPCON channel before close,
>   needed once the allocator is shared.
> - Dropped the DQRI holdoff-tuning patch; the immediate-DQRI holdoff is now
>   set inline in the arm path.
> - Added a patch reusing the event driver's MSI-affinity helper (exposed
>   from its RTE_EVENT_DPAA2 guard) to pin the portal MSI to the lcore that
>   arms it, so a CDAN wake lands on the worker's own core.
> 
> v2:
> - Dropped the RSS RETA patch, an independent net/dpaa2 change the
>   interrupt path does not require; it will be sent as its own series.
> - Dropped the ethdev fast-path ops fix; it is now a standalone series.
> - Dropped the eal/interrupts -EEXIST fix, applied to main by David
>   Marchand.
> - Declared qbman_swp_interrupt_set_inhibit and qbman_swp_dqrr_size
>   __rte_internal (David Marchand).
> - Minor formatting cleanup in the Rx interrupt setup.
> 
> Maxime Leroy (6):
>   event/dpaa2: disable channel before closing it
>   bus/fslmc: move DPCON management from event driver to bus
>   bus/fslmc/dpio: make the portal DQRI epoll optional
>   bus/fslmc/mc: implement dpcon_set_notification
>   net/dpaa2: support Rx queue interrupts
>   net/dpaa2: pin Rx queue interrupt to the polling core
> 
>  doc/guides/nics/dpaa2.rst                     |  21 +
>  doc/guides/nics/features/dpaa2.ini            |   1 +
>  doc/guides/rel_notes/release_26_07.rst        |   1 +
>  drivers/bus/fslmc/mc/dpcon.c                  |  31 ++
>  drivers/bus/fslmc/mc/fsl_dpcon.h              |  18 +
>  drivers/bus/fslmc/meson.build                 |   1 +
>  .../fslmc/portal}/dpaa2_hw_dpcon.c            |  17 +-
>  drivers/bus/fslmc/portal/dpaa2_hw_dpio.c      | 112 ++++--
>  drivers/bus/fslmc/portal/dpaa2_hw_dpio.h      |  12 +
>  drivers/bus/fslmc/portal/dpaa2_hw_pvt.h       |  12 +
>  .../fslmc/qbman/include/fsl_qbman_portal.h    |   5 +
>  drivers/bus/fslmc/qbman/qbman_portal.c        |   5 +
>  drivers/event/dpaa2/dpaa2_eventdev.h          |   3 -
>  drivers/event/dpaa2/meson.build               |   1 -
>  drivers/net/dpaa2/dpaa2_ethdev.c              | 372 +++++++++++++++++-
>  drivers/net/dpaa2/dpaa2_ethdev.h              |   4 +
>  drivers/net/dpaa2/dpaa2_rxtx.c                | 104 +++--
>  17 files changed, 649 insertions(+), 71 deletions(-)
>  rename drivers/{event/dpaa2 => bus/fslmc/portal}/dpaa2_hw_dpcon.c (88%)
> 
> 
> base-commit: 030328f5f920a87dabde54dacd4f5ac411ddcac9

Looks good, applied to net-next

  parent reply	other threads:[~2026-07-03 16:03 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-11 15:49 [PATCH 0/9] net/dpaa2: NAPI-style Rx queue interrupts Maxime Leroy
2026-06-11 15:49 ` [PATCH 1/9] net/dpaa2: implement RSS RETA query and update Maxime Leroy
2026-06-11 15:49 ` [PATCH 2/9] eal/interrupts: keep real errno on epoll error Maxime Leroy
2026-06-16  8:02   ` David Marchand
2026-06-16  9:29     ` David Marchand
2026-06-11 15:49 ` [PATCH 3/9] bus/fslmc: move DPCON management from event driver to bus Maxime Leroy
2026-06-11 15:49 ` [PATCH 4/9] bus/fslmc/dpio: make the portal DQRI epoll optional Maxime Leroy
2026-06-11 15:49 ` [PATCH 5/9] net/dpaa2: support Rx queue interrupts Maxime Leroy
2026-06-16  8:05   ` David Marchand
2026-06-11 15:49 ` [PATCH 6/9] bus/fslmc/dpio: tune DQRI interrupt coalescing holdoff Maxime Leroy
2026-06-11 15:49 ` [PATCH 7/9] net/dpaa2: fix Rx queue count for primary process Maxime Leroy
2026-06-11 15:49 ` [PATCH 8/9] ethdev: keep fast-path ops valid after port stop Maxime Leroy
2026-06-11 16:01   ` Morten Brørup
2026-06-11 18:39     ` Maxime Leroy
2026-06-12 15:00       ` Thomas Monjalon
2026-06-14 19:30   ` Stephen Hemminger
2026-06-15  9:26   ` David Marchand
2026-06-16  9:23     ` Maxime Leroy
2026-06-16  9:33       ` David Marchand
2026-06-11 15:49 ` [PATCH 9/9] net/dpaa2: drop the fake software VLAN strip offload Maxime Leroy
2026-06-11 15:56   ` Morten Brørup
2026-06-11 16:13     ` Morten Brørup
2026-06-11 16:58     ` Maxime Leroy
2026-06-11 17:30   ` Stephen Hemminger
2026-06-12  5:42     ` Maxime Leroy
2026-06-16 10:27 ` [PATCH v2 0/6] net/dpaa2: NAPI-style Rx queue interrupts Maxime Leroy
2026-06-16 10:27   ` [PATCH v2 1/6] bus/fslmc: move DPCON management from event driver to bus Maxime Leroy
2026-06-16 10:27   ` [PATCH v2 2/6] bus/fslmc/dpio: make the portal DQRI epoll optional Maxime Leroy
2026-06-16 10:27   ` [PATCH v2 3/6] net/dpaa2: support Rx queue interrupts Maxime Leroy
2026-06-18  8:46     ` David Marchand
2026-06-16 10:27   ` [PATCH v2 4/6] bus/fslmc/dpio: tune DQRI interrupt coalescing holdoff Maxime Leroy
2026-06-16 10:27   ` [PATCH v2 5/6] net/dpaa2: fix Rx queue count for primary process Maxime Leroy
2026-06-16 10:27   ` [PATCH v2 6/6] net/dpaa2: drop the fake software VLAN strip offload Maxime Leroy
2026-06-16 14:11     ` Stephen Hemminger
2026-06-16 15:40       ` Hemant Agrawal
2026-06-21  4:33   ` [PATCH v2 0/6] net/dpaa2: NAPI-style Rx queue interrupts Hemant Agrawal
2026-06-29 13:13     ` Maxime Leroy
2026-06-30 14:43   ` [PATCH v3 " Maxime Leroy
2026-06-30 14:43     ` [PATCH v3 1/6] event/dpaa2: disable channel before closing it Maxime Leroy
2026-07-03 17:21       ` Hemant Agrawal
2026-07-06  9:11         ` Maxime Leroy
2026-06-30 14:43     ` [PATCH v3 2/6] bus/fslmc: move DPCON management from event driver to bus Maxime Leroy
2026-06-30 14:43     ` [PATCH v3 3/6] bus/fslmc/dpio: make the portal DQRI epoll optional Maxime Leroy
2026-06-30 14:43     ` [PATCH v3 4/6] bus/fslmc/mc: implement dpcon_set_notification Maxime Leroy
2026-06-30 14:43     ` [PATCH v3 5/6] net/dpaa2: support Rx queue interrupts Maxime Leroy
2026-07-03 17:21       ` Hemant Agrawal
2026-07-06 10:36         ` Maxime Leroy
2026-06-30 14:43     ` [PATCH v3 6/6] net/dpaa2: pin Rx queue interrupt to the polling core Maxime Leroy
2026-07-03 16:03     ` Stephen Hemminger [this message]
2026-07-03 18:56       ` [PATCH v3 0/6] net/dpaa2: NAPI-style Rx queue interrupts Maxime Leroy
2026-07-03 20:26         ` Stephen Hemminger

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=20260703090345.3e4099cd@phoenix.local \
    --to=stephen@networkplumber.org \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=hemant.agrawal@nxp.com \
    --cc=maxime@leroys.fr \
    --cc=sachin.saxena@nxp.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