aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/net_driver.h
diff options
context:
space:
mode:
authorStuart Hodgson <smhodgson@solarflare.com>2012-07-16 12:08:33 -0400
committerBen Hutchings <bhutchings@solarflare.com>2012-09-07 16:13:38 -0400
commit79d68b370074044d7a9dd789ee103ffe5ef00bda (patch)
treee516dcdfd499499fa718ddb6bdf6b7c7210c30fc /drivers/net/ethernet/sfc/net_driver.h
parent220a60a425146b0e37998cc0b3082f0541aad866 (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/net_driver.h')
-rw-r--r--drivers/net/ethernet/sfc/net_driver.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sfc/net_driver.h b/drivers/net/ethernet/sfc/net_driver.h
index 7ab1232494ef..24a78a35bddb 100644
--- a/drivers/net/ethernet/sfc/net_driver.h
+++ b/drivers/net/ethernet/sfc/net_driver.h
@@ -242,6 +242,8 @@ struct efx_rx_page_state {
242/** 242/**
243 * struct efx_rx_queue - An Efx RX queue 243 * struct efx_rx_queue - An Efx RX queue
244 * @efx: The associated Efx NIC 244 * @efx: The associated Efx NIC
245 * @core_index: Index of network core RX queue. Will be >= 0 iff this
246 * is associated with a real RX queue.
245 * @buffer: The software buffer ring 247 * @buffer: The software buffer ring
246 * @rxd: The hardware descriptor ring 248 * @rxd: The hardware descriptor ring
247 * @ptr_mask: The size of the ring minus 1. 249 * @ptr_mask: The size of the ring minus 1.
@@ -263,6 +265,7 @@ struct efx_rx_page_state {
263 */ 265 */
264struct efx_rx_queue { 266struct efx_rx_queue {
265 struct efx_nic *efx; 267 struct efx_nic *efx;
268 int core_index;
266 struct efx_rx_buffer *buffer; 269 struct efx_rx_buffer *buffer;
267 struct efx_special_buffer rxd; 270 struct efx_special_buffer rxd;
268 unsigned int ptr_mask; 271 unsigned int ptr_mask;
@@ -1047,7 +1050,7 @@ static inline bool efx_tx_queue_used(struct efx_tx_queue *tx_queue)
1047 1050
1048static inline bool efx_channel_has_rx_queue(struct efx_channel *channel) 1051static inline bool efx_channel_has_rx_queue(struct efx_channel *channel)
1049{ 1052{
1050 return channel->channel < channel->efx->n_rx_channels; 1053 return channel->rx_queue.core_index >= 0;
1051} 1054}
1052 1055
1053static inline struct efx_rx_queue * 1056static inline struct efx_rx_queue *