Skip to contentSkip to conversation

ionic: update the queue count on open

PATCH Superseded Shannon Nelson 2 participants 3 messages Jun 25, 2020

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ionic: update the queue count on open

Let the network stack know the real number of queues that we are using.

Fixes 49d3b493673a ("ionic: disable the queues on link down")
---
 drivers/net/ethernet/pensando/ionic/ionic_lif.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/ethernet/pensando/ionic/ionic_lif.c +3 -0
index aaa00edd9d5b..62858c7afae0 100644
@@ -1673,6 +1673,9 @@ int ionic_open(struct net_device *netdev)
 	if (err)
 		goto err_out;
 
+	netif_set_real_num_tx_queues(netdev, lif->nxqs);
+	netif_set_real_num_rx_queues(netdev, lif->nxqs);
+
 	/* don't start the queues until we have link */
 	if (netif_carrier_ok(netdev)) {
 		err = ionic_start_queues(lif);
Signature · 1 line
2.17.1
maintainer
#1 lore raw
Quoted 14 lines · On Thu, 25 Jun 2020 13:12:15 -0700 Shannon Nelson wrote:

Let the network stack know the real number of queues that we are using.

Fixes 49d3b493673a ("ionic: disable the queues on link down")
---
 drivers/net/ethernet/pensando/ionic/ionic_lif.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/ethernet/pensando/ionic/ionic_lif.c +0 -0
index aaa00edd9d5b..62858c7afae0 100644

drivers/net/ethernet/pensando/ionic/ionic_lif.c int ionic_open(struct net_device *netdev) · line 1677

Quoted 5 lines
drivers/net/ethernet/pensando/ionic/ionic_lif.c +2 -0
@@ -1673,6 +1673,9 @@ int ionic_open(struct net_device *netdev)
 	if (err)
 		goto err_out;
 
+	netif_set_real_num_tx_queues(netdev, lif->nxqs);
+	netif_set_real_num_rx_queues(netdev, lif->nxqs);

These calls can fail.

#2 lore raw
Quoted 18 lines · Jakub Kicinski
Quoted 17 lines · On Thu, 25 Jun 2020 13:12:15 -0700 Shannon Nelson wrote:

Let the network stack know the real number of queues that we are using.

Fixes 49d3b493673a ("ionic: disable the queues on link down")
---
  drivers/net/ethernet/pensando/ionic/ionic_lif.c | 3 +++
  1 file changed, 3 insertions(+)
drivers/net/ethernet/pensando/ionic/ionic_lif.c +0 -0
index aaa00edd9d5b..62858c7afae0 100644
@@ -1673,6 +1673,9 @@ int ionic_open(struct net_device *netdev)
  	if (err)
  		goto err_out;
 
Quoted 3 lines

drivers/net/ethernet/pensando/ionic/ionic_lif.c int ionic_open(struct net_device *netdev) · line 1677

Quoted 2 lines
drivers/net/ethernet/pensando/ionic/ionic_lif.c +2 -0
+	netif_set_real_num_tx_queues(netdev, lif->nxqs);
+	netif_set_real_num_rx_queues(netdev, lif->nxqs);

These calls can fail.

Ah, yes they can.  I'll update this.

sln