[PATCH 15/17] net/nfp: adapts the reverse sequence card

Chaoyong He chaoyong.he at corigine.com
Mon Jun 24 03:57:21 CEST 2024


From: Peng Zhang <peng.zhang at corigine.com>

The NFP chip-wide port index is 'eth_port->index'.
In the normal card, it uses 'eth_port->eth_index', but because
'eth_port->eth_index' and 'eth_port->index' have the same value,
it doesn't have any problem.
But in the reverse sequence card, the value is different,
so it will lead the 'nfp_eth_config_start()' failed.

In this commit, fix this bug by using 'eth_port->index'.

Fixes: e1124c4f8a45 ("net/nfp: add flower representor framework")
Cc: chaoyong.he at corigine.com
Cc: stable at dpdk.org

Signed-off-by: Peng Zhang <peng.zhang at corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he at corigine.com>
---
 drivers/net/nfp/flower/nfp_flower_representor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/nfp/flower/nfp_flower_representor.c b/drivers/net/nfp/flower/nfp_flower_representor.c
index 086dbc58e3..b1589cf78c 100644
--- a/drivers/net/nfp/flower/nfp_flower_representor.c
+++ b/drivers/net/nfp/flower/nfp_flower_representor.c
@@ -845,7 +845,7 @@ nfp_flower_repr_alloc(struct nfp_app_fw_flower *app_fw_flower,
 		eth_port = &nfp_eth_table->ports[id];
 		flower_repr.repr_type = NFP_REPR_TYPE_PHYS_PORT;
 		flower_repr.port_id = nfp_flower_get_phys_port_id(eth_port->index);
-		flower_repr.nfp_idx = eth_port->eth_index;
+		flower_repr.nfp_idx = eth_port->index;
 		flower_repr.vf_id = i + 1;
 
 		/* Copy the real mac of the interface to the representor struct */
-- 
2.39.1



More information about the dev mailing list