Commit 69a70496 authored by Edward Cree's avatar Edward Cree Committed by David S. Miller

sfc: commonise netif_set_real_num[tr]x_queues calls

While we're at it, also check them for failure.
Signed-off-by: default avatarEdward Cree <ecree@solarflare.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f9cac93e
...@@ -336,9 +336,6 @@ static int efx_probe_nic(struct efx_nic *efx) ...@@ -336,9 +336,6 @@ static int efx_probe_nic(struct efx_nic *efx)
sizeof(efx->rss_context.rx_hash_key)); sizeof(efx->rss_context.rx_hash_key));
efx_set_default_rx_indir_table(efx, &efx->rss_context); efx_set_default_rx_indir_table(efx, &efx->rss_context);
netif_set_real_num_tx_queues(efx->net_dev, efx->n_tx_channels);
netif_set_real_num_rx_queues(efx->net_dev, efx->n_rx_channels);
/* Initialise the interrupt moderation settings */ /* Initialise the interrupt moderation settings */
efx->irq_mod_step_us = DIV_ROUND_UP(efx->timer_quantum_ns, 1000); efx->irq_mod_step_us = DIV_ROUND_UP(efx->timer_quantum_ns, 1000);
efx_init_irq_moderation(efx, tx_irq_mod_usec, rx_irq_mod_usec, true, efx_init_irq_moderation(efx, tx_irq_mod_usec, rx_irq_mod_usec, true,
......
...@@ -856,6 +856,7 @@ int efx_set_channels(struct efx_nic *efx) ...@@ -856,6 +856,7 @@ int efx_set_channels(struct efx_nic *efx)
struct efx_channel *channel; struct efx_channel *channel;
struct efx_tx_queue *tx_queue; struct efx_tx_queue *tx_queue;
int xdp_queue_number; int xdp_queue_number;
int rc;
efx->tx_channel_offset = efx->tx_channel_offset =
efx_separate_tx_channels ? efx_separate_tx_channels ?
...@@ -894,7 +895,11 @@ int efx_set_channels(struct efx_nic *efx) ...@@ -894,7 +895,11 @@ int efx_set_channels(struct efx_nic *efx)
} }
} }
} }
return 0;
rc = netif_set_real_num_tx_queues(efx->net_dev, efx->n_tx_channels);
if (rc)
return rc;
return netif_set_real_num_rx_queues(efx->net_dev, efx->n_rx_channels);
} }
bool efx_default_channel_want_txqs(struct efx_channel *channel) bool efx_default_channel_want_txqs(struct efx_channel *channel)
......
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