From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id CB4DA48B2D for ; Mon, 17 Nov 2025 09:31:41 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C3CE44027D; Mon, 17 Nov 2025 09:31:41 +0100 (CET) Received: from mail-qk1-f176.google.com (mail-qk1-f176.google.com [209.85.222.176]) by mails.dpdk.org (Postfix) with ESMTP id 4181F4027D for ; Mon, 17 Nov 2025 09:31:40 +0100 (CET) Received: by mail-qk1-f176.google.com with SMTP id af79cd13be357-8b2ed01b95dso71775985a.0 for ; Mon, 17 Nov 2025 00:31:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763368299; x=1763973099; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Vu7DLvLtGjdR3DKJFGu0E2mHMVOgKF1udE+mmQJMY9E=; b=ZKvqw1RE+gBi/uhUpDiwntGD47LwWoxx/w+fxhf55NE28mNtay6BzTSBEgPedDGruA u2WRcGERyKAAKQFdMXNb87I8SmR3cDJpG7DCSUDzAvaaVf2qWTFGoYuWl5yGmOKq/F95 y99R1I+DbqXb+Icnaf+fY/IjMcFULZ4yfvJrIwxBrxbxbGOLfDcff19FnHvbockTkJvg xty88UrnS01oTxFIgJuk2dZGDk1bdynT0A4ADzjWLnbl7ovNN8nb6XrVzmuSvCacljWy T+8N2o4/DS72w4+6QFI7O6NqCx7qajDLVC9E2hADMd4Dni6xVAL96sTX9QqDFy8urQsH 7khw== X-Forwarded-Encrypted: i=1; AJvYcCXW5TvoIk/4GRMl2E+hsuSZlRjVjf0moIKQYIZHySNo4hNcpp+eNpItr18ayY5h0KGhgCHrxTc=@dpdk.org X-Gm-Message-State: AOJu0YwW5vV8zGS9LM1BVMrQC/aIVOUpnqo8W6z7J6dskhU9ENBNrP4o t12h0y1bcrg19if+p+UfTQoXo2+kVMrmlmaDcZKZfXMlAAE3lUxMP2QxLS5xjrwoGpJEdtje11N f/5M96fcVAeTAxtAKmxQvRjWQgvuoPoA= X-Gm-Gg: ASbGncu/yfIP+a5CaMxGOWF6h6+lQv3gZUgFTFq89WP0sis8da0nsCkh4iTB7ZM93FR HDX7ZBZx34phmQFf8co4iCqcAAw6hdeVJNuZz+u2foBIyIhohqwdaRs9td0kzOQDcx3wLiIHTf5 kEvuqhLh/GHEyPdXwdbBXxOllOT9y3IuGRPy2/Mx1kASOhAYo3g7kJSCHlxT7TORtACLC5fpC4r ywoQAxUrRj0Jl460m5QAcTE4BPo3bl+DsygagU19oyqSF9+qCWbKWvOHrcBGQGaGyzW X-Google-Smtp-Source: AGHT+IHS3g7LShGqol9YqL2wQ9tAMUkKPtR4/vx26SnnzlYSlRdV7HFxItOBhwfJ5zXAn3Oc/KjdGpCqipyT+igJi8A= X-Received: by 2002:a05:620a:1a10:b0:8b2:767c:31d3 with SMTP id af79cd13be357-8b2c3145404mr1520744385a.6.1763368299481; Mon, 17 Nov 2025 00:31:39 -0800 (PST) MIME-Version: 1.0 References: <20251113114355.2027438-1-hemant.agrawal@nxp.com> <20251114062454.2731559-1-hemant.agrawal@nxp.com> <20251114062454.2731559-2-hemant.agrawal@nxp.com> In-Reply-To: <20251114062454.2731559-2-hemant.agrawal@nxp.com> From: Maxime Leroy Date: Mon, 17 Nov 2025 09:31:28 +0100 X-Gm-Features: AWmQ_bluvke1goGC_6mS9hCdJohnkMGg-RUUi9LuajPW6hYT--6QzxVwW-yAfco Message-ID: Subject: Re: [PATCH v5 2/4] net/dpaa2: clear active VDQ state when freeing Rx queues To: Hemant Agrawal Cc: dev@dpdk.org, stephen@networkplumber.org, david.marchand@redhat.com, jun.yang@nxp.com, stable@dpdk.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi Hemant, Le ven. 14 nov. 2025 =C3=A0 07:25, Hemant Agrawal = a =C3=A9crit : > > From: Maxime Leroy > > When using the prefetch Rx path (dpaa2_dev_prefetch_rx), the driver keeps > track of one outstanding VDQCR command per DPIO portal in the global > rte_global_active_dqs_list[] array. Each queue_storage_info_t also stores > the active result buffer and portal index: > > qs->active_dqs > qs->active_dpio_id > > Before issuing a new pull command, dpaa2_dev_prefetch_rx() checks for an > active entry and spins on qbman_check_command_complete() until the > corresponding VDQCR completes. > > On port close / hotplug remove, dpaa2_free_rx_tx_queues() frees all > per-lcore queue_storage_info_t structures and their dq_storage[] buffers, > but never clears the global rte_global_active_dqs_list[] entries. After a > detach/attach sequence (or "del/add" in grout), the prefetch Rx path > still sees an active entry for the portal and spins forever on a stale dq > buffer that has been freed and will never be completed by hardware. In > gdb, dq->dq.tok stays 0 and dpaa2_dev_prefetch_rx() loops in: > > while (!qbman_check_command_complete(get_swp_active_dqs(idx))) > ; > > Fix this by clearing the active VDQ state before freeing queue storage. > For each Rx queue and lcore, if qs->active_dqs is non-NULL, call > clear_swp_active_dqs(qs->active_dpio_id) and set qs->active_dqs to NULL. > Then dpaa2_queue_storage_free() can safely free q_storage and > dq_storage[]. > > After this change, a DPNI detach/attach sequence no longer leaves stale > entries in rte_global_active_dqs_list[], and the prefetch Rx loop does > not hang waiting for a completion from a previous device instance. > > Reproduction: > - grout: > grcli interface add port dpni.1 devargs fslmc:dpni.1 > grcli interface del dpni.1 > grcli interface add port dpni.1 devargs fslmc:dpni.1 > -> Rx was stuck in qbman_check_command_complete(), now works. > > - testpmd: > dpdk-testpmd -n1 -a fslmc:dpni.65535 -- -i --forward-mode=3Drxonly > testpmd> port attach fslmc:dpni.1 > testpmd> port start all > testpmd> start > testpmd> stop > testpmd> port stop all > testpmd> port detach 0 > testpmd> port attach fslmc:dpni.1 > testpmd> port start all > testpmd> start > -> Rx was hanging, now runs normal > > Fixes: 12d98eceb8ac ("bus/fslmc: enhance QBMAN DQ storage logic") > Cc: jun.yang@nxp.com > Cc: stable@dpdk.org > > Signed-off-by: Maxime Leroy > Acked-by: Hemant Agrawal > --- > .mailmap | 2 +- > drivers/net/dpaa2/dpaa2_ethdev.c | 23 +++++++++++++++++++++++ > 2 files changed, 24 insertions(+), 1 deletion(-) > > diff --git a/.mailmap b/.mailmap > index 10c37a97a6..d92d4fc24b 100644 > --- a/.mailmap > +++ b/.mailmap > @@ -1035,7 +1035,7 @@ Mauricio Vasquez B Mauro Annarumma > Maxime Coquelin > Maxime Gouin > -Maxime Leroy > +Maxime Leroy The order is incorrect. My new email address is maxime@leroys.fr, and it should appear first in the list. Thank you, Maxime Leroy