diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-08-03 06:05:27 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-08-04 10:05:13 +0100 |
commit | e874f4557b365fc07f960c0e5a224f9ecaedd838 (patch) | |
tree | ca67c02d5b39d10117e6f2caae0330b2ded15cb6 /drivers/net/ethernet/netronome/nfp/nfp_net_common.c | |
parent | net: add netif_set_real_num_queues() for device reconfig (diff) | |
download | linux-dev-e874f4557b365fc07f960c0e5a224f9ecaedd838.tar.xz linux-dev-e874f4557b365fc07f960c0e5a224f9ecaedd838.zip |
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: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/netronome/nfp/nfp_net_common.c')
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c index 15078f9dc9f1..5bfa22accf2c 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c +++ b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c @@ -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); } |