aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/net_driver.h
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2008-09-01 07:47:48 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-09-03 09:53:46 -0400
commit8831da7b6c4b15c0be0ba849be4aea5eed3999c6 (patch)
tree6bdfd5433f9eb4358a67504d85fb903fe17fd9d9 /drivers/net/sfc/net_driver.h
parent64ee3120f73b9e904d97ba66386b1e8e93b81385 (diff)
sfc: Cleanup RX queue information
Rename efx_nic::rss_queues to the more obvious n_rx_queues Remove efx_rx_queue::used and other stuff that's redundant with it. 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.h16
1 files changed, 5 insertions, 11 deletions
diff --git a/drivers/net/sfc/net_driver.h b/drivers/net/sfc/net_driver.h
index 1fa134ab8eb8..b5649b16cd43 100644
--- a/drivers/net/sfc/net_driver.h
+++ b/drivers/net/sfc/net_driver.h
@@ -231,7 +231,6 @@ struct efx_rx_buffer {
231 * struct efx_rx_queue - An Efx RX queue 231 * struct efx_rx_queue - An Efx RX queue
232 * @efx: The associated Efx NIC 232 * @efx: The associated Efx NIC
233 * @queue: DMA queue number 233 * @queue: DMA queue number
234 * @used: Queue is used by net driver
235 * @channel: The associated channel 234 * @channel: The associated channel
236 * @buffer: The software buffer ring 235 * @buffer: The software buffer ring
237 * @rxd: The hardware descriptor ring 236 * @rxd: The hardware descriptor ring
@@ -265,7 +264,6 @@ struct efx_rx_buffer {
265struct efx_rx_queue { 264struct efx_rx_queue {
266 struct efx_nic *efx; 265 struct efx_nic *efx;
267 int queue; 266 int queue;
268 bool used;
269 struct efx_channel *channel; 267 struct efx_channel *channel;
270 struct efx_rx_buffer *buffer; 268 struct efx_rx_buffer *buffer;
271 struct efx_special_buffer rxd; 269 struct efx_special_buffer rxd;
@@ -628,7 +626,7 @@ union efx_multicast_hash {
628 * @tx_queue: TX DMA queues 626 * @tx_queue: TX DMA queues
629 * @rx_queue: RX DMA queues 627 * @rx_queue: RX DMA queues
630 * @channel: Channels 628 * @channel: Channels
631 * @rss_queues: Number of RSS queues 629 * @n_rx_queues: Number of RX queues
632 * @rx_buffer_len: RX buffer length 630 * @rx_buffer_len: RX buffer length
633 * @rx_buffer_order: Order (log2) of number of pages for each RX buffer 631 * @rx_buffer_order: Order (log2) of number of pages for each RX buffer
634 * @irq_status: Interrupt status buffer 632 * @irq_status: Interrupt status buffer
@@ -704,7 +702,7 @@ struct efx_nic {
704 struct efx_rx_queue rx_queue[EFX_MAX_RX_QUEUES]; 702 struct efx_rx_queue rx_queue[EFX_MAX_RX_QUEUES];
705 struct efx_channel channel[EFX_MAX_CHANNELS]; 703 struct efx_channel channel[EFX_MAX_CHANNELS];
706 704
707 int rss_queues; 705 int n_rx_queues;
708 unsigned int rx_buffer_len; 706 unsigned int rx_buffer_len;
709 unsigned int rx_buffer_order; 707 unsigned int rx_buffer_order;
710 708
@@ -850,19 +848,15 @@ struct efx_nic_type {
850/* Iterate over all used RX queues */ 848/* Iterate over all used RX queues */
851#define efx_for_each_rx_queue(_rx_queue, _efx) \ 849#define efx_for_each_rx_queue(_rx_queue, _efx) \
852 for (_rx_queue = &_efx->rx_queue[0]; \ 850 for (_rx_queue = &_efx->rx_queue[0]; \
853 _rx_queue < &_efx->rx_queue[EFX_MAX_RX_QUEUES]; \ 851 _rx_queue < &_efx->rx_queue[_efx->n_rx_queues]; \
854 _rx_queue++) \ 852 _rx_queue++)
855 if (!_rx_queue->used) \
856 continue; \
857 else
858 853
859/* Iterate over all RX queues belonging to a channel */ 854/* Iterate over all RX queues belonging to a channel */
860#define efx_for_each_channel_rx_queue(_rx_queue, _channel) \ 855#define efx_for_each_channel_rx_queue(_rx_queue, _channel) \
861 for (_rx_queue = &_channel->efx->rx_queue[0]; \ 856 for (_rx_queue = &_channel->efx->rx_queue[0]; \
862 _rx_queue < &_channel->efx->rx_queue[EFX_MAX_RX_QUEUES]; \ 857 _rx_queue < &_channel->efx->rx_queue[EFX_MAX_RX_QUEUES]; \
863 _rx_queue++) \ 858 _rx_queue++) \
864 if ((!_rx_queue->used) || \ 859 if (_rx_queue->channel != _channel) \
865 (_rx_queue->channel != _channel)) \
866 continue; \ 860 continue; \
867 else 861 else
868 862