There exists exit point between the reconfigure logic and the stroe logic of the VF initialization, this may lead one situation that value in the config bar is not same with the value stored in the data structure.
Fix this by move up the store statement. Fixes: 7f8e73201dae ("net/nfp: move VF functions into its own file") Cc: sta...@dpdk.org Signed-off-by: Chaoyong He <chaoyong...@corigine.com> Reviewed-by: Long Wu <long...@corigine.com> Reviewed-by: Peng Zhang <peng.zh...@corigine.com> --- drivers/net/nfp/nfp_ethdev_vf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/nfp/nfp_ethdev_vf.c b/drivers/net/nfp/nfp_ethdev_vf.c index b9cfb48021..2d08a07913 100644 --- a/drivers/net/nfp/nfp_ethdev_vf.c +++ b/drivers/net/nfp/nfp_ethdev_vf.c @@ -91,6 +91,8 @@ nfp_netvf_start(struct rte_eth_dev *dev) if (nfp_reconfig(hw, new_ctrl, update) != 0) return -EIO; + hw->ctrl = new_ctrl; + /* * Allocating rte mbufs for configured rx queues. * This requires queues being enabled before. @@ -100,8 +102,6 @@ nfp_netvf_start(struct rte_eth_dev *dev) goto error; } - hw->ctrl = new_ctrl; - for (i = 0; i < dev->data->nb_rx_queues; i++) dev->data->rx_queue_state[i] = RTE_ETH_QUEUE_STATE_STARTED; for (i = 0; i < dev->data->nb_tx_queues; i++) -- 2.39.1