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