summaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/net_driver.h
diff options
context:
space:
mode:
authorBen Hutchings2008-09-01 13:47:57 +0200
committerJeff Garzik2008-09-03 15:53:46 +0200
commita2589027ff0011077cdaf761be3a9a4ba40b5118 (patch)
treed39dd0c8ecb6b24246ffd6aeb683c3e0d75dfb00 /drivers/net/sfc/net_driver.h
parentsfc: Remove initialisation of RX_FILTER_CTL_REG.NUM_KER (diff)
downloadkernel-qcow2-linux-a2589027ff0011077cdaf761be3a9a4ba40b5118.tar.gz
kernel-qcow2-linux-a2589027ff0011077cdaf761be3a9a4ba40b5118.tar.xz
kernel-qcow2-linux-a2589027ff0011077cdaf761be3a9a4ba40b5118.zip
sfc: Make efx_for_each_channel_rx_queue() more efficient
Currently each channel can have at most one RX queue, so go straight to that one. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/sfc/net_driver.h')
-rw-r--r--drivers/net/sfc/net_driver.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/sfc/net_driver.h b/drivers/net/sfc/net_driver.h
index b5649b16cd43..74e934c7e6f8 100644
--- a/drivers/net/sfc/net_driver.h
+++ b/drivers/net/sfc/net_driver.h
@@ -853,9 +853,9 @@ struct efx_nic_type {
/* Iterate over all RX queues belonging to a channel */
#define efx_for_each_channel_rx_queue(_rx_queue, _channel) \
- for (_rx_queue = &_channel->efx->rx_queue[0]; \
- _rx_queue < &_channel->efx->rx_queue[EFX_MAX_RX_QUEUES]; \
- _rx_queue++) \
+ for (_rx_queue = &_channel->efx->rx_queue[_channel->channel]; \
+ _rx_queue; \
+ _rx_queue = NULL) \
if (_rx_queue->channel != _channel) \
continue; \
else