]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
nfp: use netif_set_real_num_queues()
authorJakub Kicinski <kuba@kernel.org>
Tue, 3 Aug 2021 13:05:27 +0000 (06:05 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 4 Aug 2021 09:05:13 +0000 (10:05 +0100)
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>
drivers/net/ethernet/netronome/nfp/nfp_net_common.c

index 15078f9dc9f18a041c13fc88dbc97266a3f5dc55..5bfa22accf2c99a9ae4db600201780f10845db26 100644 (file)
@@ -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);
 }