From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8ED1CA5FFF for ; Wed, 7 Oct 2026 07:25:28 +0000 (UTC) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 613C7427A5; Wed, 7 Oct 2026 09:24:52 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by mails.dpdk.org (Postfix) with ESMTP id AC58940A6F; Wed, 7 Oct 2026 09:24:44 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 913B2200007; Wed, 7 Oct 2026 09:24:44 +0200 (CEST) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 5CF7920000C; Wed, 7 Oct 2026 09:24:44 +0200 (CEST) Received: from lsv03583.swis.in-blr01.nxp.com (lsv03583.swis.in-blr01.nxp.com [92.120.146.12]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id D7BAF180023B; Wed, 7 Oct 2026 15:24:43 +0800 (+08) From: Hemant Agrawal To: stephen@networkplumber.org, thomas@monjalon.net, dev@dpdk.org Cc: stable@dpdk.org Subject: [PATCH v22 06/27] bus/dpaa: accept QDMA device name in devargs Date: Wed, 7 Oct 2026 12:54:18 +0530 Message-Id: <20261007072439.3135351-7-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20261007072439.3135351-1-hemant.agrawal@nxp.com> References: <20261006092703.2138929-1-hemant.agrawal@nxp.com> <20261007072439.3135351-1-hemant.agrawal@nxp.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV using ClamSMTP X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org rte_dpaa_bus_parse() recognises fmX-macY, fmX-ohY, fmX-onicY and dpaa_sec-N, but not the QDMA devices that dpaa_create_device_list() creates as "dpaa_qdma-%d". A QDMA name therefore falls through to the fm%u-mac%u sscanf(), which does not match, so the function returns -EINVAL. That makes the documented usage -a dpaa_bus:dpaa_qdma-1,dpaa_dma_err_check=1 fail in rte_devargs_parse() with "failed to parse device" and abort EAL initialization, so no dma/dpaa devarg can be passed at all. Parse dpaa_qdma-N as well, bounding the index by the number of QDMA devices the bus creates. Fixes: a63c6426fdfd ("dma/dpaa: add option for error checks") Cc: stable@dpdk.org Signed-off-by: Hemant Agrawal --- drivers/bus/dpaa/dpaa_bus.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c index 368c8eeb98..5442f8f893 100644 --- a/drivers/bus/dpaa/dpaa_bus.c +++ b/drivers/bus/dpaa/dpaa_bus.c @@ -521,6 +521,11 @@ rte_dpaa_bus_parse(const char *name, void *out) i < 1 || i > 4) return -EINVAL; max_name_len = sizeof("dpaa_sec-.") - 1; + } else if (strncmp("dpaa_qdma", &name[delta], 9) == 0) { + if (sscanf(&name[delta], "dpaa_qdma-%u", &i) != 1 || + i < 1 || i > RTE_DPAA_QDMA_DEVICES) + return -EINVAL; + max_name_len = sizeof("dpaa_qdma-.") - 1; } else if (strncmp("oh", &name[dev_delta], 2) == 0) { if (sscanf(&name[delta], "fm%u-oh%u", &i, &j) != 2 || i >= 2 || j >= 16) -- 2.25.1