From: Stephen Hemminger <stephen@networkplumber.org>
To: Gagandeep Singh <g.singh@nxp.com>
Cc: dev@dpdk.org, hemant.agrawal@nxp.com
Subject: Re: [PATCH v4 0/4] DPAA driver changes
Date: Mon, 16 Nov 2026 14:48:44 -0800 [thread overview]
Message-ID: <20261116144844.03348c93@phoenix.local> (raw)
In-Reply-To: <20261116062512.726405-1-g.singh@nxp.com>
On Mon, 16 Nov 2026 11:55:08 +0530
Gagandeep Singh <g.singh@nxp.com> wrote:
> V4-Changes:
> - Fixed ol_fd leak issue.
> - Fixed the FQID hold be kernel issue.
> - removed the not required locks.
> - fixed unwanted line and memcpy issue.
> - We want to have rte_pmd_dpaa_ol_* functions, the reason we sent over
> the email.
Still some findings from AI review
Subject: Re: [PATCH v4 0/4] DPAA offline port, shared MAC name, cgrid cleanup
Series applies to main and builds at every commit (bus/dpaa,
mempool/dpaa, net/dpaa, -Dwerror=true). Patches 1 and 3 have no
findings.
Patch 2/4 drivers: add offline (O/H) port device support
---------------------------------------------------------
Warning: FQ info set in dev_start but only reset in dev_close.
dpaa_ol_dev_start() sends ASK_CTRL_SET_DPDK_INFO on every start;
dpaa_ol_dev_stop() only swaps the Tx burst. After stop the kernel
keeps steering frames into the Rx FQ using buffers from the DPDK
pool, and a stop/start cycle issues a second SET with no RESET in
between. Pair them: reset in stop, set in start.
static int dpaa_ol_reset_fq_info(struct dpaa_if *dpaa_intf)
{
struct ask_ctrl_dpdk_fq_info_s fq_info = { 0 };
int ret;
if (!dpaa_intf->ol_fq_info_set)
return 0;
fq_info.tx_fq_id = dpaa_intf->tx_queues[0].fqid;
fq_info.rx_fq_id = dpaa_intf->rx_queues[0].fqid;
ret = ask_reset_fq_info(dpaa_intf, &fq_info);
if (ret == 0)
dpaa_intf->ol_fq_info_set = false;
return ret;
}
static int dpaa_ol_dev_stop(struct rte_eth_dev *dev)
{
dev->tx_pkt_burst = dpaa_eth_tx_drop_all;
return dpaa_ol_reset_fq_info(dev->data->dev_private);
}
dpaa_oldev_queues_release() can then call the same helper.
Warning: received mbufs carry the wrong port id.
dpaa_eth_fd_to_mbuf() sets mbuf->port = dpaa_intf->ifid. ifid is
never set for the offline port, so it stays 0 from rte_zmalloc().
The oldev sorts after all ETH devices on the bus, so port 0 is
always some other port. Set it in dpaa_oldev_init():
dpaa_intf->ifid = eth_dev->data->port_id;
Info: struct ask_ctrl_dpdk_fq_info_s is an ioctl ABI shared with an
out-of-tree module, but it uses bool members, implicit padding and
no version check. The public rte_pmd_dpaa_*_s structs are passed
straight to the same ioctls, so their layout is now frozen by the
CDX module rather than by DPDK. Consider fixed-width types and a
version query at probe so a mismatched cdx module fails cleanly.
Patch 4/4 drivers: add DPAA cgrid cleanup support
-------------------------------------------------
Warning: stale FQ scan runs at close, after the CGRs have been in
use for the whole run.
If a stale FQ from a previous run still references a CGRID handed
out at probe, it is a member of this port's CGR from the moment
qman_create_cgr() runs; its frames count against the tail-drop
thresholds for the life of the port. Removing it at close is too
late. Do the scan in dpaa_dev_init() right after
qman_alloc_cgrid_range(), before any CGR is created:
ret = qman_alloc_cgrid_range(&cgrid[0], num_rx_fqs, 1, 0);
...
if (!dpaa_cgr_stale_fq_cleanup(eth_dev, cgrid[0],
num_rx_fqs, "rx")) {
ret = -EBUSY;
goto free_rx;
}
and the same for cgrid_tx. Close then only needs to shut down the
port's own FQs.
Warning: dpaa_cgr_stale_fq_cleanup() returns true when max_loop is
exhausted.
The comment says true means the range was fully scanned. If the
loop runs out after cgrid_num * DPAA_CGR_STALE_FQ_MAX shutdowns,
more stale FQs may remain, yet cgrid_ok stays true and the CGRIDs
are released while still referenced. Fall out of the loop with
false:
start_fqid = fqid + 1;
}
DPAA_PMD_WARN("%s: stale %s FQ limit reached",
dev->data->name, dir);
return false;
Info: qman_pending_fq_by_cgrid_range() walks every implemented
FQID with up to two management commands each, and close runs it
twice per port (Rx and Tx). With several ports this is a
noticeable stall on shutdown. If the scan moves to probe as
suggested, one combined pass over all of the port's CGRIDs (Rx
and Tx are both known by then) would halve it.
next prev parent reply other threads:[~2026-11-16 22:48 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-28 8:55 [PATCH v1 0/3] DPAA driver changes Gagandeep Singh
2026-10-28 8:55 ` [PATCH v1 1/3] drivers: add offline (O/H) port device support Gagandeep Singh
2026-10-28 8:55 ` [PATCH v1 2/3] net/dpaa: support non fmX-macY type of shared Ethernet name Gagandeep Singh
2026-10-28 8:55 ` [PATCH v1 3/3] drivers: add DPAA cgrid cleanup support Gagandeep Singh
2026-10-28 14:41 ` [PATCH v1 0/3] DPAA driver changes Stephen Hemminger
2026-10-30 4:43 ` Gagandeep Singh
2026-10-30 4:43 ` [PATCH v2 0/4] " Gagandeep Singh
2026-10-30 4:43 ` [PATCH v2 1/4] bus/dpaa: fix out-of-bounds read of mac_idx array Gagandeep Singh
2026-10-30 4:43 ` [PATCH v2 2/4] drivers: add offline (O/H) port device support Gagandeep Singh
2026-10-30 4:43 ` [PATCH v2 3/4] net/dpaa: support non fmX-macY type of shared Ethernet name Gagandeep Singh
2026-10-30 4:43 ` [PATCH v2 4/4] drivers: add DPAA cgrid cleanup support Gagandeep Singh
2026-11-02 8:09 ` [PATCH v2 0/4] DPAA driver changes Stephen Hemminger
2026-11-02 13:23 ` Stephen Hemminger
2026-11-03 9:38 ` Gagandeep Singh
2026-11-03 9:35 ` [PATCH v3 " Gagandeep Singh
2026-11-03 9:35 ` [PATCH v3 1/4] bus/dpaa: fix out-of-bounds read of mac_idx array Gagandeep Singh
2026-11-03 9:35 ` [PATCH v3 2/4] drivers: add offline (O/H) port device support Gagandeep Singh
2026-11-03 9:36 ` [PATCH v3 3/4] net/dpaa: support non fmX-macY type of shared Ethernet name Gagandeep Singh
2026-11-03 9:36 ` [PATCH v3 4/4] drivers: add DPAA cgrid cleanup support Gagandeep Singh
2026-11-04 11:29 ` [PATCH v3 0/4] DPAA driver changes Stephen Hemminger
2026-11-05 5:53 ` Gagandeep Singh
2026-11-16 6:25 ` [PATCH v4 " Gagandeep Singh
2026-11-16 6:25 ` [PATCH v4 1/4] bus/dpaa: fix out-of-bounds read of mac_idx array Gagandeep Singh
2026-11-16 6:25 ` [PATCH v4 2/4] drivers: add offline (O/H) port device support Gagandeep Singh
2026-11-16 6:25 ` [PATCH v4 3/4] net/dpaa: support non fmX-macY type of shared Ethernet name Gagandeep Singh
2026-11-16 6:25 ` [PATCH v4 4/4] drivers: add DPAA cgrid cleanup support Gagandeep Singh
2026-11-16 22:48 ` Stephen Hemminger [this message]
2026-11-17 5:45 ` [PATCH v5 0/4] DPAA driver changes Gagandeep Singh
2026-11-17 5:45 ` [PATCH v5 1/4] bus/dpaa: fix out-of-bounds read of mac_idx array Gagandeep Singh
2026-11-17 5:45 ` [PATCH v5 2/4] drivers: add offline (O/H) port device support Gagandeep Singh
2026-11-17 5:45 ` [PATCH v5 3/4] net/dpaa: support non fmX-macY type of shared Ethernet name Gagandeep Singh
2026-11-17 5:45 ` [PATCH v5 4/4] drivers: add DPAA cgrid cleanup support Gagandeep Singh
2026-11-17 17:25 ` [PATCH v5 0/4] DPAA driver changes 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=20261116144844.03348c93@phoenix.local \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=g.singh@nxp.com \
--cc=hemant.agrawal@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