net/nfp: set the correct control flag

Message ID 20250122013930.1705932-1-chaoyong.he@corigine.com (mailing list archive)
State Accepted, archived
Delegated to: Stephen Hemminger
Headers
Series net/nfp: set the correct control flag |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/intel-Functional success Functional PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-marvell-Functional success Functional Testing PASS
ci/iol-sample-apps-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-compile-amd64-testing success Testing PASS

Commit Message

Chaoyong He Jan. 22, 2025, 1:39 a.m. UTC
From: Peng Zhang <peng.zhang@corigine.com>

In the original logic of 'nfp_net_start()', we don't set the
'NFP_NET_CFG_CTRL_MULTI_PF' flag when using multi-pf firmware.

Fix it by adding the missing logic.

Fixes: 95f978efab42 ("net/nfp: enable multiple PF in application firmware")
Cc: stable@dpdk.org

Signed-off-by: Peng Zhang <peng.zhang@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
---
 drivers/net/nfp/nfp_ethdev.c | 3 +++
 1 file changed, 3 insertions(+)
  

Patch

diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
index f54483822f..b98eee6b90 100644
--- a/drivers/net/nfp/nfp_ethdev.c
+++ b/drivers/net/nfp/nfp_ethdev.c
@@ -472,6 +472,9 @@  nfp_net_start(struct rte_eth_dev *dev)
 	if ((cap_extend & NFP_NET_CFG_CTRL_FLOW_STEER) != 0)
 		ctrl_extend |= NFP_NET_CFG_CTRL_FLOW_STEER;
 
+	if ((cap_extend & NFP_NET_CFG_CTRL_MULTI_PF) != 0 && pf_dev->multi_pf.enabled)
+		ctrl_extend |= NFP_NET_CFG_CTRL_MULTI_PF;
+
 	update = NFP_NET_CFG_UPDATE_GEN;
 	if (nfp_ext_reconfig(hw, ctrl_extend, update) != 0)
 		return -EIO;