From: Peng Zhang <peng.zh...@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...@corigine.com
Cc: sta...@dpdk.org

Signed-off-by: Peng Zhang <peng.zh...@corigine.com>
Reviewed-by: Chaoyong He <chaoyong...@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

Reply via email to