From: Stephen Hemminger <stephen@networkplumber.org>
To: Gagandeep Singh <g.singh@nxp.com>
Cc: dev@dpdk.org, hemant.agrawal@nxp.com
Subject: Re: [PATCH v3 0/4] DPAA driver changes
Date: Wed, 4 Nov 2026 12:29:19 +0100 [thread overview]
Message-ID: <20261104122919.1642e887@stephen-xps.local> (raw)
In-Reply-To: <20261103093601.3736486-1-g.singh@nxp.com>
On Tue, 3 Nov 2026 15:05:57 +0530
Gagandeep Singh <g.singh@nxp.com> wrote:
> V3-Changes:
> - Updated rte_pmd_dpaa_oldev.h APIs as per DPDK compliance.
> - Added missing release not for OH port support.
> - Fixed dump_netcfg issue.
> - Added an API to release FQID.
> - moved the fman.h changes to first patch.
>
> V2-changes:
> - Fixed most of the AI comments.
> - added new patch:
> fix out-of-bounds read of mac_idx
> - removed drv_oldev, updated comments and notes.
> - fixes FQ shutdown
> - removed unwanted checks, updated open, updated snprintf.
> - updated commit messages.
>
> V1:
> - Adding OH port support.
> - Updates in shared ethernet code.
> - Congestion related code cleanup.
>
> Gagandeep Singh (2):
> bus/dpaa: fix out-of-bounds read of mac_idx array
> drivers: add offline (O/H) port device support
>
> Hemant Agrawal (1):
> net/dpaa: support non fmX-macY type of shared Ethernet name
>
> Jun Yang (1):
> drivers: add DPAA cgrid cleanup support
>
> doc/api/doxy-api-index.md | 1 +
> doc/guides/nics/dpaa.rst | 36 +
> doc/guides/rel_notes/release_26_11.rst | 10 +
> drivers/bus/dpaa/base/fman/fman.c | 19 +
> drivers/bus/dpaa/base/qbman/qman.c | 61 ++
> drivers/bus/dpaa/bus_dpaa_driver.h | 4 +-
> drivers/bus/dpaa/dpaa_bus.c | 68 +-
> drivers/bus/dpaa/dpaa_bus_base_symbols.c | 2 +
> drivers/bus/dpaa/include/fman.h | 6 +-
> drivers/bus/dpaa/include/fsl_qman.h | 28 +
> drivers/net/dpaa/dpaa_ethdev.c | 235 +++++-
> drivers/net/dpaa/dpaa_ethdev.h | 12 +
> drivers/net/dpaa/dpaa_flow.c | 5 +-
> drivers/net/dpaa/dpaa_oldev.c | 938 +++++++++++++++++++++++
> drivers/net/dpaa/meson.build | 11 +-
> drivers/net/dpaa/rte_pmd_dpaa_oldev.h | 198 +++++
> 16 files changed, 1603 insertions(+), 31 deletions(-)
> create mode 100644 drivers/net/dpaa/dpaa_oldev.c
> create mode 100644 drivers/net/dpaa/rte_pmd_dpaa_oldev.h
>
Still see AI reported errors
Review of [PATCH v3 0/4] DPAA offline port, shared MAC, cgrid cleanup
Applied to next-net for-main (3b51e2e2f0). Each commit builds with
-Dwerror=true.
Series
------
The rte_pmd_dpaa_ol_* functions now take a port_id, but it is only
used to look up which fd the ioctl goes to. The classification and LGW
payloads carry nothing from the port, and the kernel module consumes
them. My earlier objection stands: this is configuration API for the
out-of-tree cdx driver and does not belong in DPDK.
Patch 2/4 drivers: add offline (O/H) port device support
--------------------------------------------------------
Error
dpaa_oldev_init() opens /dev/cdx_ctrl through check_fd() in
dpaa_ol_tx_queue_init(). If a later step fails, for example the
mac_addrs allocation, the free_rx path does not close the fd:
free_rx:
dpaa_oldev_queues_release(dpaa_intf);
return ret;
dpaa_ol_probe() then calls rte_eth_dev_release_port(), which frees
dev_private and ol_fd with it. Close it on the error path:
free_rx:
dpaa_oldev_queues_release(dpaa_intf);
if (dpaa_intf->ol_fd >= 0) {
close(dpaa_intf->ol_fd);
dpaa_intf->ol_fd = -1;
}
return ret;
Warning
dpaa_oldev_queues_release() sends ASK_CTRL_RESET_DPDK_INFO and releases
the FQIDs only if that succeeds. It does this even when
ASK_CTRL_SET_DPDK_INFO was never issued: on the probe error path, and
on close of a port that was never started. In those cases the kernel
never had the FQIDs, so there is nothing to reset. If /dev/cdx_ctrl is
missing, probe fails in dpaa_ol_tx_queue_init(), the reset fails with
-ENODEV, and the Rx FQID allocated with QMAN_FQ_FLAG_DYNAMIC_FQID
leaks on every attempt. Track whether the kernel holds the FQIDs:
/* dpaa_ol_set_fq_info(), after ask_set_fq_info() succeeds */
dpaa_intf->ol_fq_info_set = true;
/* dpaa_oldev_queues_release() */
release_fqids = true;
if (dpaa_intf->ol_fq_info_set) {
if (ask_reset_fq_info(dpaa_intf, &fq_info) != 0)
release_fqids = false;
else
dpaa_intf->ol_fq_info_set = false;
}
Info
v3 replaced the atomic ask_fd with a plain dpaa_intf->ol_fd, but kept
the double-checked lock in check_fd(). The unlocked read of ol_fd now
races with the locked write if control calls can be concurrent. If they
cannot, the mutex is not needed. The fd is always opened during probe
by dpaa_ol_tx_queue_init(), so open it once in dpaa_oldev_init() and
drop fd_init_lock and the lazy open.
dpaa_ol_set_fq_info() copies bh_port_name with rte_memcpy(); this is
control path, use memcpy().
The blank line added after "/* Rx Statistics Counter */" in struct
dpaa_if_stats is unrelated.
next prev parent reply other threads:[~2026-11-04 11:29 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 ` Stephen Hemminger [this message]
2026-11-05 5:53 ` [PATCH v3 0/4] DPAA driver changes 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 ` [PATCH v4 0/4] DPAA driver changes Stephen Hemminger
2026-11-17 5:45 ` [PATCH v5 " 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=20261104122919.1642e887@stephen-xps.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.