]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ionic: update the queue count on open
authorShannon Nelson <snelson@pensando.io>
Fri, 26 Jun 2020 05:58:37 +0000 (22:58 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 26 Jun 2020 19:19:51 +0000 (12:19 -0700)
Let the network stack know the real number of queues that
we are using.

v2: added error checking

Fixes: 887ed044aabb ("ionic: disable the queues on link down")
Signed-off-by: Shannon Nelson <snelson@pensando.io>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/pensando/ionic/ionic_lif.c

index aaa00edd9d5b088152375b85e69179cd33bce5cf..3c9dde31f3facc3d1163c7c23bf7241fe2f23a18 100644 (file)
@@ -1673,6 +1673,14 @@ int ionic_open(struct net_device *netdev)
        if (err)
                goto err_out;
 
+       err = netif_set_real_num_tx_queues(netdev, lif->nxqs);
+       if (err)
+               goto err_txrx_deinit;
+
+       err = netif_set_real_num_rx_queues(netdev, lif->nxqs);
+       if (err)
+               goto err_txrx_deinit;
+
        /* don't start the queues until we have link */
        if (netif_carrier_ok(netdev)) {
                err = ionic_start_queues(lif);