Skip to content

Commit

Permalink
sfc: Make efx_for_each_channel_rx_queue() more efficient
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ben Hutchings authored and Jeff Garzik committed Sep 3, 2008
1 parent 955f0a7 commit a258902
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/sfc/net_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a258902

Please sign in to comment.