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 07E61E98DF9 for ; Mon, 23 Feb 2026 07:58:46 +0000 (UTC) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C46864065B; Mon, 23 Feb 2026 08:58:00 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id D813C40150; Sat, 21 Feb 2026 03:45:47 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1202) id A7E8420B6F00; Fri, 20 Feb 2026 18:45:47 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com A7E8420B6F00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1771641947; bh=2GBwX7YnE3bX5P5s28DesJ6PHXeRZCXzGaxN2djrIqo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Xz6rBZg9mzx+rnHNdrciPjOeu4XzMRwBdZJUcyoq40WDTbxlDMPIQOAEmOlK5p5Un MiEGVtbnuBIP/mhL3R2rj6CK6ZPVa+78kOgAU8SmFU7fOAhNbOR1+YyNokF4Fi7b4f tjwX5J5AQz7HsNlTLFUEwYr4aE6CCsC1IKGD0W3k= From: longli@linux.microsoft.com To: dev@dpdk.org, Wei Hu , Stephen Hemminger , stable@dpdk.org, Dariusz Sosnowski , Viacheslav Ovsiienko , Bing Zhao , Ori Kam , Suanming Mou , Matan Azrad Cc: Long Li Subject: [PATCH v2 6/8] net/mana: fix fast-path ops setup in secondary process Date: Fri, 20 Feb 2026 18:45:25 -0800 Message-ID: <20260221024540.659098-6-longli@linux.microsoft.com> X-Mailer: git-send-email 2.43.7 In-Reply-To: <20260221024540.659098-1-longli@linux.microsoft.com> References: <20260221024540.659098-1-longli@linux.microsoft.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Mon, 23 Feb 2026 08:57:51 +0100 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 From: Long Li On hotplug, the secondary process is not able to set rte_eth_fp_ops because the primary process has not finished setting up the device for datapath. Fix this by properly setting up rte_eth_fp_ops in the secondary process when the primary requests to start datapath. Set both rxq.data and txq.data to point to the device's RX/TX queue arrays, enabling the fast-path operations to access queues correctly. Also update rte_eth_fp_ops burst function pointers in the STOP_RXTX handler. Without this, the secondary's rte_eth_fp_ops retains stale burst function pointers after stop, since rte_eth_fp_ops is process-local and eth_dev_fp_ops_reset() in rte_eth_dev_stop() only affects the primary. Without this fix, the secondary process cannot transmit or receive packets because the fast-path queue data pointers are NULL. Fixes: 62724d1a3981 ("net/mana: start/stop device") Cc: stable@dpdk.org Signed-off-by: Long Li --- drivers/net/mana/mp.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/mana/mp.c b/drivers/net/mana/mp.c index 5467d385ce..7c5c0fa88f 100644 --- a/drivers/net/mana/mp.c +++ b/drivers/net/mana/mp.c @@ -145,6 +145,9 @@ mana_mp_secondary_handle(const struct rte_mp_msg *mp_msg, const void *peer) dev->tx_pkt_burst = mana_tx_burst; dev->rx_pkt_burst = mana_rx_burst; + rte_eth_fp_ops[param->port_id].rxq.data = dev->data->rx_queues; + rte_eth_fp_ops[param->port_id].txq.data = dev->data->tx_queues; + rte_mb(); res->result = 0; @@ -154,6 +157,9 @@ mana_mp_secondary_handle(const struct rte_mp_msg *mp_msg, const void *peer) case MANA_MP_REQ_STOP_RXTX: DRV_LOG(INFO, "Port %u stopping datapath", dev->data->port_id); + rte_eth_fp_ops[param->port_id].rx_pkt_burst = mana_rx_burst_removed; + rte_eth_fp_ops[param->port_id].tx_pkt_burst = mana_tx_burst_removed; + dev->tx_pkt_burst = mana_tx_burst_removed; dev->rx_pkt_burst = mana_rx_burst_removed; -- 2.43.0