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 A524C46211 for ; Thu, 13 Feb 2025 11:01:22 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9FE9940287; Thu, 13 Feb 2025 11:01:22 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 05A3940287 for ; Thu, 13 Feb 2025 11:01:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1739440880; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2l2MRQHzikrvucT1yAfPzIXY4LnLfMCa+MCUgJ61xlU=; b=RX9a+lRzzIW3syO0F9rVq46sJdTmT8zAsQdgcHcrICaekHNQCQ8mkoBmLqHFbQJ4Qg9Gi1 h0sAkW5xngbe8hXvCX7SOMkbTPWs/y34b+ZJQYcrICwIa4S8VDEvPrHP5BCzzow1/hDnlH gbCpbjkcgjvxp3IX/MrHgfCTpxVdaDY= Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-288-sokUmJBLOael33QqHZi1kw-1; Thu, 13 Feb 2025 05:01:17 -0500 X-MC-Unique: sokUmJBLOael33QqHZi1kw-1 X-Mimecast-MFC-AGG-ID: sokUmJBLOael33QqHZi1kw_1739440875 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id BF32C18EB2C3; Thu, 13 Feb 2025 10:01:15 +0000 (UTC) Received: from rh.Home (unknown [10.45.224.21]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 89DC71800874; Thu, 13 Feb 2025 10:01:13 +0000 (UTC) From: Kevin Traynor To: Zerun Fu Cc: Chaoyong He , Long Wu , Peng Zhang , dpdk stable Subject: patch 'net/nfp: fix multiple PFs check from NSP' has been queued to stable release 24.11.2 Date: Thu, 13 Feb 2025 09:58:07 +0000 Message-ID: <20250213095933.362078-40-ktraynor@redhat.com> In-Reply-To: <20250213095933.362078-1-ktraynor@redhat.com> References: <20250213095933.362078-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: vCMoFVMLTAAjj6_dyJYrWamDsxNGlWefJPQuSEpmn2Y_1739440875 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true 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, FYI, your patch has been queued to stable release 24.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/17/25. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/7f3506343cd492b6ff54e0f2abec67bfbd9c000d Thanks. Kevin --- >From 7f3506343cd492b6ff54e0f2abec67bfbd9c000d Mon Sep 17 00:00:00 2001 From: Zerun Fu Date: Wed, 22 Jan 2025 09:28:15 +0800 Subject: [PATCH] net/nfp: fix multiple PFs check from NSP [ upstream commit c19d389f5b553b0a9dddbb22882750c17a6fa577 ] Fix multiple PFs check from NSP problem in the logic of PF initialization. Fixes: 8ad2cc8fec37 ("net/nfp: add flag for multiple PFs support") Signed-off-by: Zerun Fu Reviewed-by: Chaoyong He Reviewed-by: Long Wu Reviewed-by: Peng Zhang --- drivers/net/nfp/nfp_ethdev.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c index f54483822f..aad044a0f7 100644 --- a/drivers/net/nfp/nfp_ethdev.c +++ b/drivers/net/nfp/nfp_ethdev.c @@ -1750,9 +1750,9 @@ nfp_check_multi_pf_from_fw(uint32_t total_vnics) } -static inline bool +static inline int nfp_check_multi_pf_from_nsp(struct rte_pci_device *pci_dev, - struct nfp_cpp *cpp) + struct nfp_cpp *cpp, + bool *flag) { - bool flag; struct nfp_nsp *nsp; @@ -1760,12 +1760,13 @@ nfp_check_multi_pf_from_nsp(struct rte_pci_device *pci_dev, if (nsp == NULL) { PMD_DRV_LOG(ERR, "NFP error when obtaining NSP handle."); - return false; + return -EIO; } - flag = (nfp_nsp_get_abi_ver_major(nsp) > 0) && + *flag = (nfp_nsp_get_abi_ver_major(nsp) > 0) && (pci_dev->id.device_id == PCI_DEVICE_ID_NFP3800_PF_NIC); nfp_nsp_close(nsp); - return flag; + + return 0; } @@ -2433,6 +2434,11 @@ nfp_pf_init(struct rte_pci_device *pci_dev) } + ret = nfp_check_multi_pf_from_nsp(pci_dev, cpp, &pf_dev->multi_pf.enabled); + if (ret != 0) { + PMD_INIT_LOG(ERR, "Failed to check multi pf from NSP."); + goto eth_table_cleanup; + } + pf_dev->nfp_eth_table = nfp_eth_table; - pf_dev->multi_pf.enabled = nfp_check_multi_pf_from_nsp(pci_dev, cpp); pf_dev->multi_pf.function_id = function_id; pf_dev->total_phyports = nfp_net_get_phyports_from_nsp(pf_dev); -- 2.48.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-02-12 17:29:38.896473064 +0000 +++ 0040-net-nfp-fix-multiple-PFs-check-from-NSP.patch 2025-02-12 17:29:34.318945739 +0000 @@ -1 +1 @@ -From c19d389f5b553b0a9dddbb22882750c17a6fa577 Mon Sep 17 00:00:00 2001 +From 7f3506343cd492b6ff54e0f2abec67bfbd9c000d Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit c19d389f5b553b0a9dddbb22882750c17a6fa577 ] + @@ -9 +10,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index df5482f74a..58a5b1d94e 100644 +index f54483822f..aad044a0f7 100644 @@ -23 +24 @@ -@@ -1752,9 +1752,9 @@ nfp_check_multi_pf_from_fw(uint32_t total_vnics) +@@ -1750,9 +1750,9 @@ nfp_check_multi_pf_from_fw(uint32_t total_vnics) @@ -36 +37 @@ -@@ -1762,12 +1762,13 @@ nfp_check_multi_pf_from_nsp(struct rte_pci_device *pci_dev, +@@ -1760,12 +1760,13 @@ nfp_check_multi_pf_from_nsp(struct rte_pci_device *pci_dev, @@ -53 +54 @@ -@@ -2435,6 +2436,11 @@ nfp_pf_init(struct rte_pci_device *pci_dev) +@@ -2433,6 +2434,11 @@ nfp_pf_init(struct rte_pci_device *pci_dev)