<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
HI Stephen,</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
    You have posted the review comments of DPAA2 series. Will you please send the AI leftover comments of this particular series.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Regards</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Hemant</div>
<div id="appendonsend"></div>
<div><br>
<div style="font-family: Calibri; text-align: center; color: rgb(0, 0, 0); margin-left: 5pt; font-size: 10pt;">
NXP Confidential</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Stephen Hemminger <stephen@networkplumber.org><br>
<b>Sent:</b> Wednesday, September 30, 2026 9:37 PM<br>
<b>To:</b> Hemant Agrawal <hemant.agrawal@nxp.com><br>
<b>Cc:</b> thomas@monjalon.net <thomas@monjalon.net>; dev@dpdk.org <dev@dpdk.org><br>
<b>Subject:</b> Re: [PATCH v18 00/24] NXP DPAA driver enhancements and fixes</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">On Wed, 30 Sep 2026 11:54:13 +0530<br>
Hemant Agrawal <hemant.agrawal@nxp.com> wrote:<br>
<br>
> This series collects a set of fixes and enhancements for the NXP DPAA<br>
> bus, mempool, dma, crypto and net drivers targeting 26.11.<br>
> <br>
> It includes memory-leak and resource-cleanup fixes on the device<br>
> remove/close paths, more robust frame queue and congestion-group<br>
> shutdown, secondary-process safety guards, BPID and cgrid lifecycle<br>
> handling, and several new features: offline (O/H) port device support,<br>
> enhanced virtual storage profile (VSP) port support, fmcless Rx queue<br>
> configuration via devargs, Rx/Tx taildrop threshold devargs, non<br>
> fmX-macY shared Ethernet naming, and DMA scatter-gather and<br>
> errata-workaround devargs. Documentation and release notes are updated<br>
> accordingly.<br>
> <br>
> v18:<br>
> * Dropped the "net/dpaa: fix device remove" patch. It papered over the<br>
>   symptom in rte_dpaa_remove() instead of fixing the cause, and was<br>
>   replaced by the two fixes now at the head of the series.<br>
> * net/dpaa: fix the double dpaa_eth_dev_close() call and the eth_dev<br>
>   dereference before the NULL check in rte_dpaa_remove().<br>
> * net/dpaa: unwind rte_dpaa_probe() through cleanup labels so the Tx SG<br>
>   mempool failure path closes the device and releases the port instead of<br>
>   leaking the port, the queue arrays and the QMan FQID/CGRID ranges.<br>
<br>
[PATCH v5-S1 0/5] dpaa2 bus/dma/mempool fixes<br>
<br>
Series<br>
<br>
Info<br>
<br>
  cdefd2e980bd made the same scan/probe move for bus/dpaa, and that<br>
  bus has the problem this series fixes for fslmc.<br>
  rte_dpaa_bus_scan() calls rte_mbuf_set_platform_mempool_ops()<br>
  (memzone reserve) and dpaax_iova_table_populate() (rte_zmalloc)<br>
  before EAL runs rte_eal_memzone_init() and<br>
  rte_eal_malloc_heap_init(). Both return values are ignored.<br>
  bus/dpaa needs a matching fix.<br>
<br>
  Patch 1 reverses part of cdefd2e980bd (the move to generic probe).<br>
  Cc David Marchand.<br>
<br>
<br>
Patch 2/5: bus/fslmc: reduce probe-time logging and skip ignored<br>
devices<br>
<br>
Warning<br>
<br>
  The commit message says "clean up a redundant variable assignment<br>
  while there", but the fslmc_vfio.c hunk only changes the log<br>
  call. Drop the stale sentence.<br>
<br>
Warning<br>
<br>
  +             if (rte_bus_device_is_ignored(&rte_fslmc_bus, dev->device.name))<br>
  +                     continue;<br>
<br>
  This skip leaves ep_dev_type, ep_object_id and ep_name unset for<br>
  devices that stay on the bus. fslmc_vfio_process_group() only<br>
  removes devices with devargs->policy == RTE_DEV_BLOCKED. In<br>
  allowlist mode, unlisted devices stay on the list, still go<br>
  through fslmc_process_iodevices(), and can be attached later with<br>
  rte_dev_probe() because fslmc sets .probe_device. Such a dpni<br>
  keeps ep_dev_type == 0 (DPAA2_ETH, from the calloc() in<br>
  scan_one_fslmc_device()) and ep_object_id == 0. The loopback setup<br>
  in dpaa2_recycle.c then treats dpni.0 as self-connected, and a<br>
  DPMAC-connected port gets -ENOTSUP.<br>
<br>
  The commit message does not say what fails without the check. If<br>
  the problem is dprc_get_connection() failing for an ignored dpni<br>
  and aborting the whole DPRC, make that failure non-fatal: set<br>
  DPAA2_UNKNOWN and continue instead of skipping the query. If this<br>
  fixes a regression, add a Fixes tag.<br>
<br>
  The log level change and the ignore check are unrelated. Split<br>
  them into separate patches.<br>
<br>
Info<br>
<br>
  Pre-existing, not introduced by this patch:<br>
<br>
         sprintf(dev->ep_name, "%s.%d", endpoint2.type, endpoint2.id);<br>
<br>
  This runs for every device, but endpoint2 is only initialized in<br>
  the DPAA2_ETH branch. A non-ETH device ahead of the first dpni<br>
  formats uninitialized stack, and type[16] need not be NUL<br>
  terminated.<br>
<br>
Info<br>
<br>
  Pre-existing: net/dpaa2 never assigns priv->ep_dev_type,<br>
  priv->ep_object_id or priv->ep_name. The test<br>
  "if (priv->ep_dev_type != DPAA2_MAC)" in dpaa2_ethdev.c reads a<br>
  field nothing writes, and rte_pmd_dpaa2_ep_name() returns a buffer<br>
  nothing fills.<br>
<br>
<br>
Patch 3/5: dma/dpaa2: fix array-bounds warning and SG FD double-put<br>
<br>
Error<br>
<br>
  The SG FD change does not fix a bug. Before the patch, fle_sdd was<br>
  stored in fle_elem[] ahead of qdma_cntx_idx_ring_eq(). On -ENOSPC,<br>
  dpaa2_qdma_dequeue() clears pending, leaves the loop, and still<br>
  runs:<br>
<br>
         rte_mempool_put_bulk(qdma_vq->fle_pool,<br>
                 qdma_vq->fle_elem, fle_elem_nb);<br>
<br>
  So the FLE went back to the pool exactly once. After the patch it<br>
  also goes back exactly once, through rte_mempool_put(). There was<br>
  no double put. rte_mempool_free() does not free objects<br>
  individually, so the described "double-free when the pool was<br>
  later destroyed" cannot happen. The DPAA2_QDMA_FD_LONG branch just<br>
  above keeps the same store-before-enqueue order. Drop this half,<br>
  or reword it as a cleanup with no Fixes or stable tag.<br>
<br>
Warning<br>
<br>
  The array-bounds half does not name the compiler, version or<br>
  target, and does not quote the diagnostic. The pre-patch loop<br>
  builds clean on x86_64 with GCC 13.3 and 14.2 at -O3 -Werror<br>
  -Warray-bounds=2. The loop it replaces came from 07d679bceee3<br>
  ("dma/dpaa2: refactor driver"), not 388e888dc082, so the Fixes<br>
  tag does not cover it. Make it a separate patch with its own<br>
  Fixes tag and the warning text in the message.<br>
<br>
Info<br>
<br>
  Pre-existing: when dpaa2_qdma_dq_fd() returns -ENOSPC, the FD has<br>
  already been pulled from hardware. Its cntx_idx values never reach<br>
  the ring, so rte_dma_completed() never reports those jobs. The<br>
  early exit on<br>
<br>
         if (ret || free_space < RTE_DPAAX_QDMA_JOB_SUBMIT_MAX)<br>
                 pending = 0;<br>
<br>
  also abandons any later results already written to dq_storage,<br>
  because active_dqs is then switched to dq_storage1.<br>
<br>
<br>
Patch 4/5: dma/dpaa2: validate FLE pool IOVA mapping at vchan setup<br>
<br>
Info<br>
<br>
  The check confirms each chunk has an fslmc mapping. It does not<br>
  check the property the fast path relies on. Enqueue converts every<br>
  FLE with<br>
<br>
         fle_iova = (uint64_t)fle - qdma_vq->fle_iova2va_offset;<br>
<br>
  and that offset comes from fle_pool->mz. That memzone is the<br>
  mempool header (mp->mz in rte_mempool_create_empty()), not the<br>
  object chunks reserved in rte_mempool_populate_default(). The<br>
  callback already has memhdr->iova. Comparing<br>
  (uint64_t)memhdr->addr - memhdr->iova against the offset would<br>
  catch a pool spread over chunks with different VA/IOVA offsets<br>
  (IOVA as PA with fragmented hugepages). The offset handling itself<br>
  is pre-existing.<br>
<br>
Info<br>
<br>
  Pre-existing: later error paths still leave the stale pool that<br>
  the commit message describes. The two rte_mempool_get_bulk()<br>
  failures in silent mode and the ring_cntx_idx allocation failure<br>
  return without freeing fle_pool. The fle_elem rte_malloc() result<br>
  is never checked and is written in dpaa2_qdma_dq_fd().<br>
<br>
<br>
Patch 5/5: mempool/dpaa2: look up ops index locally in secondary<br>
<br>
Warning<br>
<br>
  This fixes a bug from de6a6e897fe6 ("mempool/dpaa2: add operation<br>
  index"), which shipped in 25.07 and is in 25.11 LTS. In a<br>
  secondary process, dpaa2_sec compares mb_pool->ops_index against<br>
  the sentinel and always takes the MAX_BPID path. Add:<br>
<br>
  Fixes: de6a6e897fe6 ("mempool/dpaa2: add operation index")<br>
  Cc: stable@dpdk.org<br>
</div>
</span></font></div>
</body>
</html>