Commit e874f455 authored by Jakub Kicinski's avatar Jakub Kicinski Committed by David S. Miller

nfp: use netif_set_real_num_queues()

Avoid reconfig problems due to failures in netif_set_real_num_tx_queues()
by using netif_set_real_num_queues().
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 271e5b7d
......@@ -3281,17 +3281,12 @@ static int nfp_net_dp_swap_enable(struct nfp_net *nn, struct nfp_net_dp *dp)
for (r = 0; r < nn->max_r_vecs; r++)
nfp_net_vector_assign_rings(&nn->dp, &nn->r_vecs[r], r);
err = netif_set_real_num_rx_queues(nn->dp.netdev, nn->dp.num_rx_rings);
err = netif_set_real_num_queues(nn->dp.netdev,
nn->dp.num_stack_tx_rings,
nn->dp.num_rx_rings);
if (err)
return err;
if (nn->dp.netdev->real_num_tx_queues != nn->dp.num_stack_tx_rings) {
err = netif_set_real_num_tx_queues(nn->dp.netdev,
nn->dp.num_stack_tx_rings);
if (err)
return err;
}
return nfp_net_set_config_and_enable(nn);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment