diff options
author | Stuart Hodgson <smhodgson@solarflare.com> | 2012-07-16 12:08:33 -0400 |
---|---|---|
committer | Ben Hutchings <bhutchings@solarflare.com> | 2012-09-07 16:13:38 -0400 |
commit | 79d68b370074044d7a9dd789ee103ffe5ef00bda (patch) | |
tree | e516dcdfd499499fa718ddb6bdf6b7c7210c30fc /drivers/net/ethernet/sfc/efx.c | |
parent | 220a60a425146b0e37998cc0b3082f0541aad866 (diff) |
sfc: Add explicit RX queue flag to channel
The PTP channel will have its own RX queue even though it's not
a regular traffic channel.
Original work by Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Stuart Hodgson <smhodgson@solarflare.com>
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/ethernet/sfc/efx.c')
-rw-r--r-- | drivers/net/ethernet/sfc/efx.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c index a606db43c5ba..342a1f31e5b8 100644 --- a/drivers/net/ethernet/sfc/efx.c +++ b/drivers/net/ethernet/sfc/efx.c | |||
@@ -1451,10 +1451,16 @@ static void efx_set_channels(struct efx_nic *efx) | |||
1451 | efx->tx_channel_offset = | 1451 | efx->tx_channel_offset = |
1452 | separate_tx_channels ? efx->n_channels - efx->n_tx_channels : 0; | 1452 | separate_tx_channels ? efx->n_channels - efx->n_tx_channels : 0; |
1453 | 1453 | ||
1454 | /* We need to adjust the TX queue numbers if we have separate | 1454 | /* We need to mark which channels really have RX and TX |
1455 | * queues, and adjust the TX queue numbers if we have separate | ||
1455 | * RX-only and TX-only channels. | 1456 | * RX-only and TX-only channels. |
1456 | */ | 1457 | */ |
1457 | efx_for_each_channel(channel, efx) { | 1458 | efx_for_each_channel(channel, efx) { |
1459 | if (channel->channel < efx->n_rx_channels) | ||
1460 | channel->rx_queue.core_index = channel->channel; | ||
1461 | else | ||
1462 | channel->rx_queue.core_index = -1; | ||
1463 | |||
1458 | efx_for_each_channel_tx_queue(tx_queue, channel) | 1464 | efx_for_each_channel_tx_queue(tx_queue, channel) |
1459 | tx_queue->queue -= (efx->tx_channel_offset * | 1465 | tx_queue->queue -= (efx->tx_channel_offset * |
1460 | EFX_TXQ_TYPES); | 1466 | EFX_TXQ_TYPES); |